mixedModelFixedDf: Mixed Model for Imputation with Fixed DF

Description Usage Arguments Details Value

Description

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

Usage

1
2
mixedModelFixedDf(data, df = 1, weights = NULL, modelFormula,
  imputationParameters)

Arguments

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.

Details

Note: this function will return the same result as defaultMixedModel if a modelFormula is specified (to both functions).

Value

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


SWS-Methodology/faoswsImputation documentation built on May 9, 2019, 11:48 a.m.