Learn R Programming

supportInt (version 1.1)

glmLikSI: Profile support intervals for glm coefficients

Description

Calculates profile likelihood intervals using data returned from the 'ProfileLikelihood' package for each coefficient of a glm.

Usage

glmLikSI(glm.mod, level)

Arguments

glm.mod
A fit glm object.
level
Desired level of support interval (1/level).

Value

Examples

Run this code
set.seed(10)
x <- rnorm(50, 0 , 5)
expit <- function(z) exp(z)/(1+exp(z))
p <- expit(.1+ .4*x)
y <- sapply(1:length(p), function(z) rbinom(1,1, p[z]))
glm.obj <- glm(y~x, family="binomial")
glmLikSI(glm.obj, 8)

Run the code above in your browser using DataLab