Computes confidence intervals for one or more parameters in a fitted model.

# S3 method for izip
confint(object, parm, level = 0.95, ...)

# S3 method for tsizip
confint(object, parm, level = 0.95, ...)

Arguments

object

an object class 'izip' or 'tsizip', obtained from a call to glm.izip or tsglm.izip.

parm

a specification of which parameters are to be given confidence intervals, either a vector of numbers or a vector of names (comparing to those provided by coef()) . If missing, all parameters are considered.

level

the confidence level required.

...

other arguments passed to or from other methods (currently unused).

Value

A matrix (or vector) with columns giving lower and upper confidence limits for each parameter. These will be labelled as (1-level)/2 and 1 - (1-level)/2 in % (by default 2.5% and 97.5%).

Examples

data(bioChemists) M_bioChem <- glm.izip(art ~ ., data = bioChemists) confint(M_bioChem)
#> 2.5 % 97.5 % #> (Intercept) 0.09261810 0.55651638 #> femWomen -0.35207646 -0.10516958 #> marMarried 0.02051290 0.29726928 #> kid5 -0.28028826 -0.09879790 #> phd -0.04917707 0.06941332 #> ment 0.02042481 0.02894963
# 90% CI for 'ment' only confint(M_bioChem, parm = "ment", level = 0.9)
#> 5 % 95 % #> ment 0.02111009 0.02826435
data(arson) M_arson <- tsglm.izip(arson ~ 1, past_mean_lags = 1, past_obs_lags = c(1, 2)) confint(M_arson)
#> Called from: confint.tsizip(M_arson) #> debug: cf <- coef(object) #> debug: ses <- object$stderr #> debug: pnames <- names(ses) <- names(cf) #> debug: if (missing(parm)) { #> parm <- pnames #> } else if (is.numeric(parm)) { #> parm <- pnames[parm] #> } #> debug: parm <- pnames #> debug: a <- (1 - level)/2 #> debug: a <- c(a, 1 - a) #> debug: fac <- qnorm(a) #> debug: pct <- format.perc(a, 3) #> debug: ci <- array(NA_real_, dim = c(length(parm), 2L), dimnames = list(parm, #> pct)) #> debug: ci[] <- cf[parm] + ses[parm] %o% fac #> debug: ci
#> 2.5 % 97.5 % #> (Intercept) -0.109465665 1.7724965 #> beta_1 -0.137404909 0.1901232 #> beta_2 0.001429144 0.3497717 #> alpha_1 -0.913769353 0.9137694