model.frame.lmm | R Documentation |
Contruct a data frame containing all the variables involved in a Linear Mixed Model.
## S3 method for class 'lmm'
model.frame(
formula,
newdata = NULL,
type = NULL,
add.index = FALSE,
na.rm = TRUE,
...
)
formula |
a |
newdata |
[data.frame] dataset relative to which the model frame should be constructed. |
type |
[character] by default returns the processed dataset used to fit the Linear Mixed Model ( |
add.index |
[logical] should columns indexing the row number from the original dataset, time variable, cluster variable, strata variable be added to the output? |
na.rm |
[logical] should rows containing missing values for the variables used in the linear mixed model be removed?
Not relevant when argument type is |
... |
not used. For compatibility with the generic method. |
Column "XXindexXX"
refers to the row of the original dataset (i.e. passed to argument data
when calling lmm
).
When adding rows relative to missing repetitions, since there is no row in the original dataset, a negative sign is used.
data("armd.wide", package = "nlmeU")
e.lmH <- lmm(visual52 ~ lesion, structure = IND(~treat.f), data = armd.wide)
model.frame(e.lmH)
model.frame(e.lmH, add.index = TRUE)
model.frame(e.lmH, type = "unique")
data("gastricbypassL", package = "LMMstar")
dfL.NNA <- na.omit(gastricbypassL)
e.lmm <- lmm(glucagonAUC ~ time, repetition = ~visit|id, data = dfL.NNA, df = FALSE)
model.frame(e.lmm, type = "unique")
model.frame(e.lmm, type = c("unique","correlation"))
model.frame(e.lmm, type = "add.NA", add.index = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.