profile.lmm | R Documentation |
Evaluate the (restricted) log-likelihood around Maximum Likelihood Estimate (MLE) of a linear mixed model. It will vary one parameter and either keep the other parameters constant or set the other parameters at their MLE (profile likelihood). Since a locally quadratic log-likelihood with an Hessian equivariant in law implies normally distributed estimates (Geyer 2013) it can help trusting confidence intervals and p-values in small samples with a non-normally distributed outcome.
## S3 method for class 'lmm'
profile(
fitted,
effects = NULL,
profile.likelihood = FALSE,
maxpts = NULL,
level = 0.95,
trace = FALSE,
transform.sigma = NULL,
transform.k = NULL,
transform.rho = NULL,
transform.names = TRUE,
...
)
fitted |
a |
effects |
[character vector] name of the parameters who will be constrained.
Alternatively can be the type of parameters, e.g. |
profile.likelihood |
[logical] should the other parameters be set to the value maximizing the constrained likelihood or stay at their MLE value? |
maxpts |
[integer, >0] number of points use to discretize the likelihood, |
level |
[numeric, 0-1] the confidence level of the confidence intervals used to decide about the range of values for each parameter. |
trace |
[logical] Show the progress of the execution of the function. |
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. |
Each parameter defined by the argument effets
is treated separately:
the confidence interval of a parameter is discretized with maxpt
points,
this parameter is set to each discretization value.
the other parameters are either set to the (unconstrained) MLE (profile.likelihood=FALSE
)
or to constrained MLE (profile.likelihood=TRUE
). The latter case is much more computer intensive as it implies re-running the estimation procedure.
the (restricted) log-likelihood is evaluated.
A data.frame object containing the log-likelihood for various parameter values.
Geyer, C. J. (2013). Asymptotics of maximum likelihood without the lln or clt or sample size going to infinity. In Advances in Modern Statistical Theory and Applications: A Festschrift in honor of Morris L. Eaton, pages 1–24. Institute of Mathematical Statistics.
data(gastricbypassW, package = "LMMstar")
e.lmm <- lmm(weight2 ~ weight1 + glucagonAUC1,
data = gastricbypassW, control = list(optimizer = "FS"))
## profile logLiklihood
## Not run:
e.pro <- profile(e.lmm, effects = "all", maxpts = 10, profile.likelihood = TRUE)
head(e.pro)
plot(e.pro)
## End(Not run)
## along a single parameter axis
e.sliceNone <- profile(e.lmm, effects = "all", maxpts = 10, transform.sigma = "none")
plot(e.sliceNone)
e.sliceLog <- profile(e.lmm, effects = "all", maxpts = 10, transform.sigma = "log")
plot(e.sliceLog)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.