step_baro_least_squares
step_baro_least_squares.Rd
Least squares solution for calculating barometric efficiency
Usage
step_baro_least_squares(
.rec,
water_level,
barometric_pressure,
lag_space = 1L,
inverse = FALSE,
differences = FALSE,
role = "augment",
...
)
Arguments
- .rec
the R6 recipe object.
- water_level
numeric vector
of the dependent variable (ie:water level)- barometric_pressure
numeric vector
of the independent variable (ie:barometric pressure)- lag_space
integer
spacing for lags, useful for higher frequency monitoring- inverse
logical
whether the barometric relationship is inverse- differences
numeric vector
number of samples between differences- role
character - the name of the role
- ...
additional arguments
See also
Other barometric:
step_baro_clark()
,
step_baro_harmonic()
Examples
data(kennel_2020)
least_squares <- recipe(wl~., kennel_2020) |>
step_baro_least_squares(wl, baro) |> # 1 minutes (every minute differences)
step_baro_least_squares(wl, baro, lag_space = 1440, differences = TRUE) |>
prep() |>
bake()
least_squares$get_step_data("barometric_efficiency")
#> [[1]]
#> [[1]]$be
#> [1] 0.8273019
#>
#>
#> [[2]]
#> [[2]]$be
#> [1] 0.8410913
#>
#>