confint.glmmTMB | R Documentation |
Calculate confidence intervals
## S3 method for class 'glmmTMB'
confint(
object,
parm = NULL,
level = 0.95,
method = c("wald", "Wald", "profile", "uniroot"),
component = c("all", "cond", "zi", "other"),
estimate = TRUE,
include_nonest = FALSE,
parallel = c("no", "multicore", "snow"),
ncpus = getOption("profile.ncpus", 1L),
cl = NULL,
full = FALSE,
...
)
object |
|
parm |
which parameters to profile, specified
Parameter indexing by number may give unusual results when
some parameters have been fixed using the |
level |
Confidence level. |
method |
'wald', 'profile', or 'uniroot': see Details function) |
component |
Which of the three components 'cond', 'zi' or 'other' to select. Default is to select 'all'. |
estimate |
(logical) add a third column with estimate ? |
include_nonest |
include dummy rows for non-estimated (mapped, rank-deficient) parameters? |
parallel |
method (if any) for parallel computation |
ncpus |
number of CPUs/cores to use for parallel computation |
cl |
cluster to use for parallel computation |
full |
CIs for all parameters (including dispersion) ? |
... |
arguments may be passed to |
Available methods are
These intervals are based on the standard errors calculated for parameters on the scale of their internal parameterization depending on the family. Derived quantities such as standard deviation parameters and dispersion parameters are back-transformed. It follows that confidence intervals for these derived quantities are typically asymmetric.
This method computes a likelihood profile
for the specified parameter(s) using profile.glmmTMB
;
fits a spline function to each half of the profile; and
inverts the function to find the specified confidence interval.
This method uses the uniroot
function to find critical values of one-dimensional profile
functions for each specified parameter.
At present, "wald" returns confidence intervals for variance
parameters on the standard deviation/correlation scale, while
"profile" and "uniroot" report them on the underlying ("theta")
scale: for each random effect, the first set of parameter values
are standard deviations on the log scale, while remaining parameters
represent correlations on the scaled Cholesky scale. For a random
effects model with two elements (such as a random-slopes model,
or a random effect of factor with two levels), there is a single
correlation parameter \theta
; the correlation is
equal to \rho = \theta/\sqrt{1+\theta^2}
.
For random-effects terms with more than two elements, the mapping
is more complicated: see https://github.com/glmmTMB/glmmTMB/blob/master/misc/glmmTMB_corcalcs.ipynb
data(sleepstudy, package="lme4")
model <- glmmTMB(Reaction ~ Days + (1|Subject), sleepstudy)
model2 <- glmmTMB(Reaction ~ Days + (1|Subject), sleepstudy,
dispformula= ~I(Days>8))
confint(model) ## Wald/delta-method CIs
confint(model,parm="theta_") ## Wald/delta-method CIs
confint(model,parm=1,method="profile")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.