coef.lmm | R Documentation |
Extract coefficients from a linear mixed model.
## S3 method for class 'lmm'
coef(
object,
effects = NULL,
p = NULL,
transform.sigma = "none",
transform.k = "none",
transform.rho = "none",
transform.names = TRUE,
...
)
object |
a |
effects |
[character] Should all coefficients be output ( |
p |
[numeric vector] value of the model coefficients to be used. Only relevant if differs from the fitted values. |
transform.sigma |
[character] Transformation used on the variance coefficient for the reference level. One of |
transform.k |
[character] Transformation used on the variance coefficients relative to the other levels. One of |
transform.rho |
[character] Transformation used on the correlation coefficients. One of |
transform.names |
[logical] Should the name of the coefficients be updated to reflect the transformation that has been used? |
... |
Not used. For compatibility with the generic method. |
transform.sigma:
"none"
ouput residual standard error.
"log"
ouput log-transformed residual standard error.
"square"
ouput residual variance.
"logsquare"
ouput log-transformed residual variance.
transform.k:
"none"
ouput ratio between the residual standard error of the current level and the reference level.
"log"
ouput log-transformed ratio between the residual standard errors.
"square"
ouput ratio between the residual variances.
"logsquare"
ouput log-transformed ratio between the residual variances.
"sd"
ouput residual standard error of the current level.
"logsd"
ouput residual log-transformed standard error of the current level.
"var"
ouput residual variance of the current level.
"logvar"
ouput residual log-transformed variance of the current level.
transform.rho:
"none"
ouput correlation coefficient.
"atanh"
ouput correlation coefficient after tangent hyperbolic transformation.
"cov"
ouput covariance coefficient.
When using a (pure) compound symmetry covariance structure (structure = "CS"
),
estimated random effects can be extracted by setting argument effects
to "ranef"
.
A vector with the value of the model coefficients.
confint.lmm
or model.tables.lmm
for a data.frame containing estimates with their uncertainty.
## simulate data in the long format
set.seed(10)
dL <- sampleRem(100, n.times = 3, format = "long")
## fit linear mixed model
eUN.lmm <- lmm(Y ~ X1 + X2 + X5, repetition = ~visit|id, structure = "UN", data = dL, df = FALSE)
## output coefficients
coef(eUN.lmm)
coef(eUN.lmm, effects = "mean")
coef(eUN.lmm, transform.sigma = "none", transform.k = "none", transform.rho = "none")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.