confint() returns confidence intervals for a fitted drmTMB model. Wald
intervals are fast and are returned for fixed-effect coefficients by default.
Profile-likelihood intervals are slower because nuisance parameters are
re-optimized; this first public profile path supports explicit fixed-effect,
constant distributional-scale, random-effect standard-deviation,
random-effect correlation, the first bivariate phylogenetic mean-mean
correlation, and constant residual-correlation targets.
For predictor-dependent scale, residual-correlation, or currently supported
corpair() formulae, supply newdata with parm = "sigma",
parm = "rho12", or the fitted corpair(...) dpar to profile the fitted
response-scale value for each supplied row.
Arguments
- object
A
drmTMBfit.- parm
Optional character or integer vector selecting interval targets.
NULLselects all fixed effects for Wald intervals. Profile intervals require explicit target names.- level
Confidence level.
- method
Interval method:
"wald"or"profile". Parametric bootstrap intervals are not implemented yet. Ifnewdatais supplied andmethodis omitted,method = "profile"is used.- newdata
Optional data frame for response-scale profile intervals for predictor-dependent
sigma,sigma1,sigma2,rho12, or fittedcorpair()values. Each row is profiled separately by profiling its fixed-effect linear predictor and then transforming the interval to the response scale.- trace
Logical; passed to
TMB::tmbprofile()for profile intervals.- ...
Additional arguments passed to
TMB::tmbprofile()whenmethod = "profile".drmTMBsupplies the profiledobj,name,lincomb, andtracearguments internally; set the profile target withparm.
Value
A data frame with columns parm, level, lower, upper,
scale, transformation, tmb_parameter, index, method, and
conf.status, profile.boundary, and profile.message. Successful rows
currently use conf.status = "wald" or conf.status = "profile";
profile rows mark intervals that land near a lower SD boundary or
correlation boundary.
Details
Target names follow the profile target namespace. For fixed effects, use
names such as "fixef:mu:x", "fixef:sigma:(Intercept)", or
"fixef:rho12:w". Compact coefficient labels from summary(fit), such as
"mu:x", are also accepted. Random-effect SD intervals are reported on the
SD scale, and random-effect correlation intervals are reported on the
correlation scale. For bivariate Gaussian fits with constant residual
correlation, parm = "rho12" profiles the residual correlation and reports
the interval on the response correlation scale. For fits with constant
sigma, sigma1, or sigma2, parm = "sigma" and friends report
response-scale intervals.
Examples
dat <- data.frame(y = c(0.2, 0.5, 1.1, 1.4), x = c(-1, 0, 1, 2))
fit <- drmTMB(bf(y ~ x, sigma ~ 1), data = dat)
confint(fit)
#> parm level lower upper scale transformation
#> 1 fixef:mu:(Intercept) 0.95 0.5179863 0.6620137 link linear_predictor
#> 2 fixef:mu:x 0.95 0.3612011 0.4787990 link linear_predictor
#> 3 fixef:sigma:(Intercept) 0.95 -3.3947905 -2.0088865 link linear_predictor
#> tmb_parameter index method conf.status profile.boundary profile.message
#> 1 beta_mu 1 wald wald NA <NA>
#> 2 beta_mu 2 wald wald NA <NA>
#> 3 beta_sigma 1 wald wald NA <NA>