LRT {blm}R Documentation

Performs likelihood-ratio test for lexpit and BLM models of cohort data

Description

Computes the likelihood ratio test for the significance of the specified variable in a lexpit or BLM model fit to cohort data. This method is only valid for study designs that use simple random sampling.

Usage

LRT(object, var)

Arguments

object

a model of the lexpit or blm class.

var

character name of term.label to be tested

Value

A matrix with the LRT statistic and p-value for the test of the significance of the specified variable given all other variables in the model.

Author(s)

S. Kovalchik s.a.kovalchik@gmail.com

See Also

constrOptim

Examples



cohort <- data.frame(
	x1 = runif(500),
	x2 = runif(500)
)

cohort$event <- rbinom(n=nrow(cohort),size=1,
			prob=0.25+0.1*cohort$x1+.1*cohort$x2)

fit <- blm(event~x1+x2, data=cohort)

summary(fit)

LRT(fit, "x1")
LRT(fit, "x2")


[Package blm version 2022.0.0.1 Index]