confint.glmmTMB: Calculate confidence intervals

Description Usage Arguments Details Examples

Description

Calculate confidence intervals

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## 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,
  parallel = c("no", "multicore", "snow"),
  ncpus = getOption("profile.ncpus", 1L),
  cl = NULL,
  full = FALSE,
  ...
)

Arguments

object

glmmTMB fitted object.

parm

which parameters to profile, specified

  • by index (position) [after component selection for confint, if any]

  • by name (matching the row/column names of vcov(object,full=TRUE))

  • as "theta_" (random-effects variance-covariance parameters), "beta_" (conditional and zero-inflation parameters), or "disp_" or "sigma" (dispersion parameters)

Parameter indexing by number may give unusual results when some parameters have been fixed using the map argument: please report surprises to the package maintainers.

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 ?

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 profile.merMod or tmbroot

Details

Available methods are

"wald"

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.

"profile"

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.

"uniroot"

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 (see the

Examples

1
2
3
4
5
6
7
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")

Example output

Warning message:
In checkMatrixPackageVersion() : Package version inconsistency detected.
TMB was built with Matrix version 1.2.15
Current Matrix version is 1.2.17
Please re-install 'TMB' from source using install.packages('TMB', type = 'source') or ask CRAN for a binary version of 'TMB' matching CRAN's 'Matrix' package
                                      2.5 %    97.5 %  Estimate
cond.(Intercept)                 232.773351 270.03687 251.40511
cond.Days                          8.895919  12.03866  10.46729
Subject.cond.Std.Dev.(Intercept)  25.357090  51.14415  36.01204
sigma                             27.707999  34.44951  30.89542
       2.5 %   97.5 % Estimate
sigma 27.708 34.44951 30.89542
               2.5 %   97.5 %
(Intercept) 231.9922 270.8178

glmmTMB documentation built on July 20, 2021, 9:06 a.m.