Description Usage Arguments Details Value

View source: R/defaultMixedModel.R

The default functionality of this model is to fit a linear mixed model to the data. time and intercept are assumed to be fixed effects, and the random effects are specified by the byKey parameter of imputationParameters. So, for example, byKey may reference the variable containing country data. In that case, a model is fit which assumes a linear relationship between production (or whatever dependent variable the user has specified) and time. However, the intercept and slope of this fit varies from country to country, and so country is considered a random effect.

1 2 |

`data` |
The data.table object containing the data. |

`df` |
The number of degrees of freedom for the spline. |

`weights` |
The weights for the observations. |

`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). |

`imputationParameters` |
A list of the parameters for the imputation algorithms. See defaultImputationParameters() for a starting point. |

Moreover, the model fit is not a simple linear regression, but rather a spline regression (using the bs function from the splines package). The fit of this model will therefore depend on the number of degrees of freedom of this spline model (and, if the degrees of freedom is 1, then the simple linear regression model is used).

Returns a vector of the estimated/imputed values. If a value existed in the original data, then an NA is returned in that location.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.