View source: R/lexpit.lrt.R View source: R/blm.cohort.R
LRT | R Documentation |
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.
LRT(object, var)
object |
a model of the |
var |
character name of |
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.
S. Kovalchik s.a.kovalchik@gmail.com
constrOptim
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.