Description Usage Arguments Details Value Slots Constraints See Also Examples
lmer
performs mixed model on FLTable objects.
1 2 |
formula |
A symbolic description of model to be fitted |
data |
An object of class FLTable. |
The DB Lytix function called is FLLinMixedModel. The mixed model extends the linear model by allowing correlation and heterogeneous variances in the covariance matrix of the residuals. Fit a linear mixed-effects model (LMM) to data, FLLinMixedModel estimates the coefficients and covariance matrix of the mixed model via the expectations.
lmer
returns an object of class FLMix
or FLMixUDT
results
cache list of results computed
table
Input data object
DBLytix currently supports one Fixed and upto 2 Random Effect variables with intercept. For non-categorical Fixed Effect, only one Random Effect is supported. Specify if Fixed Effect is categorical using categoricalFixedEffect logical input to the function. The intercept coefficient returned is the mean value for different Random Effects.
lmer
for R reference implementation.
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## One Random Effect.
fltbl <- FLTable(getTestTableName("tblMixedModel"), "ObsID")
colnames(fltbl) <- tolower(colnames(fltbl))
flmod <- lmer(yval ~ fixval + (1 | ranval), data = fltbl)
flpred <- predict(flmod)
## One Categorical Fixed Effect and Two Random Effects.
fltbl <- FLTable(getTestTableName("tblMixedModelInt"), "ObsID")
colnames(fltbl) <- tolower(colnames(fltbl))
flmod <- lmer(yval ~ fixval + (1 | ranval1) + (1 | ranval2 ), fltbl, categoricalFixedEffect=TRUE)
flpred <- predict(flmod)
## One Categorical Fixed Effect and One Random Effect.
flmod <- lmer(yval ~ fixval + (1 | ranval1), data = fltbl, categoricalFixedEffect=TRUE)
flpred <- predict(flmod)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.