coef.lmm | R Documentation |
Extract estimated parameters from a linear mixed model.
## S3 method for class 'lmm'
coef(
object,
effects = NULL,
p = NULL,
transform.sigma = NULL,
transform.k = NULL,
transform.rho = "none",
transform.names = TRUE,
simplify = 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.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? |
simplify |
[logical] Omit from the output the attribute containing the type of each parameter (mu/sigma/k/rho) and the corresponding variance parameters (sigma/k.x/k.y). |
... |
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.
A vector with the value of the model coefficients.
When using simplify=FALSE
the character strings in attribute "type"
refer to:
"mu"
: mean parameters.
"sigma"
: standard deviation parameters,
"k"
: ratio between standard deviation,
"rho"
: correlation parameter
The character strings in attribute "sigma"
refer, for each parameter, to a possible corresponding standard deviation parameter.
Those in attribute "k.x"
and "k.y"
refer to the ratio parameter.
NA
indicates no corresponding standard deviation or ratio parameter.
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 = "variance", transform.k = "sd")
coef(eUN.lmm, effects = "all", simplify = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.