Creates a deviance function for a fitted model object, using θ and sigma as the parameters.
1 2 3
A fitted merMod object from
The built-in function(s) in lme4 for generating deviance function are not exported and rely on C++ code. This function is mainly used to obtain Hessian and asymptotic covariance matrix of the random effects.
A deviance function with one argument
th_sig that takes input
of a numeric vector corresponding to the some estimated values of
θ and σ. For
devfun_mer2, a function with
theta that profiles out σ and only takes
input of elements for θ.
Bates, D., M\"achler, M., Bolker, B. M., & Walker, S. C. Fitting linear mixed-effects models using lme4. Retrieved from https://cran.r-project.org/web/packages/lme4/vignettes/lmer.pdf
Implementation in lme4pureR: https://github.com/lme4/lme4pureR/blob/master/R/pls.R
1 2 3 4 5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.