Description Usage Arguments Details Value
This function imputes missing values through a linear mixed model. It differs from defaultMixedModel in that it only fits a model with one value for the degree of freedom (defaultMixedModel currently fits multiple models and uses bootstrapping to pick the optimal one). However, if models are eventually combined into an ensemble using leave-one-out cross-validation, such bootstrapping shouldn't be necessary (but it may be reasonable to include several mixed models with varying degrees of freedom).
1 2 | mixedModelFixedDf(data, df = 1, weights = NULL, modelFormula,
imputationParameters)
|
data |
The data.table object containing the data. |
df |
The degrees of freedom for the spline. |
weights |
The weights for the observation, if NULL each observation has the same weight. |
modelFormula |
Formula specifying how the dependent variable (value) depends on the other columns of data. Should be a valid mixed model formula, as it will be passed to lmer (R's mixed model function). If missing, a spline on the year will be used. |
imputationParameters |
A list of the parameters for the imputation algorithms. See defaultImputationParameters() for a starting point. |
Note: this function will return the same result as defaultMixedModel if a modelFormula is specified (to both functions).
Returns a vector of the estimated/imputed values. If a value existed in the original data, then an NA is returned in that location.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.