score.lmm {LMMstar} | R Documentation |
Extract The Score From a Linear Mixed Model
Description
Extract or compute the first derivative of the log-likelihood of a linear mixed model.
Usage
## S3 method for class 'lmm'
score(
x,
effects = "mean",
newdata = NULL,
p = NULL,
indiv = FALSE,
transform.sigma = NULL,
transform.k = NULL,
transform.rho = NULL,
transform.names = TRUE,
...
)
Arguments
x |
a |
effects |
[character] Should the score relative to all coefficients be output ( |
newdata |
[data.frame] dataset relative to which the score should be computed. Only relevant if differs from the dataset used to fit the model. |
p |
[numeric vector] value of the model coefficients at which to evaluate the score. Only relevant if differs from the fitted values. |
indiv |
[logical] Should the contribution of each cluster to the score be output? Otherwise output the sum of all clusters of the derivatives. |
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. |
Details
For details about the arguments transform.sigma, transform.k, transform.rho, see the documentation of the coef.lmm function.
Value
When argument indiv is FALSE
, a vector with the value of the score relative to each coefficient.
When argument indiv is TRUE
, a matrix with the value of the score relative to each coefficient (in columns) and each cluster (in rows).