apply_model: Apply a model equation to a time series

Description Usage Arguments Value

View source: R/apply_models.R

Description

Apply a model equation to a time series

Usage

1
2
3
apply_model(model_equation, time_series, flow = NULL,
  retransformation = NULL, bias_correction_factor = 1,
  conversion_factor = 1)

Arguments

model_equation

the model equation to apply see modelEquation

time_series

the time series to use the model with. This should have headings corresponding the variables in model_equation. Otherwise, a vector of NAs will be returned with a warning

flow

a vector of flow values, if calculating load. Otherwise leave as default NA

retransformation

a function used to retransform the model calculations before using them to calculate the load

bias_correction_factor

the bias correction factor to multiply model calculations by after retransforming the model, if applicable

conversion_factor

any conversion factor to multiply the model calculated values

Value

a vector of model calculations, the same length as the number of rows in time_series. NAs will be returned for any missing data points or if the model variables are not present in the time series.


PatrickEslick/MixedModelLoads documentation built on Nov. 10, 2019, 4:48 p.m.