glmint: Confidence intervals for the estimated expected response of...

View source: R/glmint.R

glmintR Documentation

Confidence intervals for the estimated expected response of generalized linear models (experimental).

Description

This function computes the estimated expected response and the confidence interval for the expected response for (generalized) linear models.

Usage

glmint(object, newdata, df, level = 0.95)

Arguments

object

Model object of class glm.

newdata

An optional data frame in which to look for variables with which to predict. If omitted the data frame used in creating the model object is used.

df

Degrees of freedom for the confidence interval. If omitted it is extracted from the model object.

level

Confidence level in (0,1).

Details

This function simplifies the process of computing the endpoints of the confidence interval for the expected response on the scale of the response variable for generalized linear models using the predict function with se.fit = TRUE. It computes the Wald confidence interval on the scale of the linear predictor and then uses the inverse of the link function to map the interval to the scale of the response variable.

Examples

m <- glm(cbind(y,total-y) ~ density + species, family = quasibinomial, data = rotifer)
d <- expand.grid(density = seq(1.01, 1.07, by = 0.01), species = c("kc","pm"))
glmint(m, newdata = d)


trobinj/trtools documentation built on Jan. 28, 2024, 3:20 a.m.