Description Usage Arguments Details Value Author(s) References See Also Examples
This function performs likelihood ratio test (LRT) to test regression paramters in the mean model and frailty variance paramter nu.
1 |
model1 |
a result of the nested model which is returned by |
model2 |
a result of the full model which is returned by |
TestNu |
logic value: If TRUE, the frailty variance paramter will be tested. Otherwise, the regression parameters will be tested. The default is TRUE. |
Siglevel |
a value: significance level. The default is 0.05. |
Under the null hypothesis of frailty variance parameter nu=0
, the test statistic converges to a mixture of chi-squared distribution. For regression parameters, under the null hypothesis beta=0
, the test statistic converges to chi-squared distribution. Please refer to Kang et al.(2015) for more details.
statistic |
a value: test statistic. |
df |
a value: degree of freedom. |
pvalue |
the p-value. |
Bin Yao, Ying Huang and Chaeryon Kang
Kang, C., Huang, Y., and Miller, C. (2015). A discrete-time survival model with random effects for designing and analyzing repeated low-dose challenge experiments. Biostatistics, 16(2): 295-310.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #test frailty variance parameter
data(SampleData)
newdata <- transdata(data = SampleData, ndlevel = 3, nexposure = c(10, 10, 2))
fitout1 <- rld(formula = survival::Surv(time, delta)~factor(trt)+factor(dose), data = newdata,
frailty = FALSE)
fitout2 <- rld(formula = survival::Surv(time, delta)~factor(trt)+factor(dose), data = newdata,
frailty = TRUE)
testnu <- lrtest(model1 = fitout1, model2 = fitout2, TestNu=TRUE)
## Not run:
#test regression parameters
fitout3 <- rld(formula = survival::Surv(time, delta)~factor(dose), data = newdata,
frailty = TRUE)
fitout4 <- rld(formula = survival::Surv(time, delta)~factor(trt)+factor(dose), data = newdata,
frailty = TRUE)
testbeta <- lrtest(model1 = fitout3, model2 = fitout4, TestNu=FALSE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.