LRT: Likelihood ratio test

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Computes the likelihood ratio test.

Usage

1
LRT(fits, fitg)

Arguments

fits

an object that stores the results of curereg fit of the model under the null hypothesis.

fitg

an object that stores the results of curereg fit of the model under the alternative hypothesis.

Details

The objects fitg and fits are obtained using the usual options passed to the curereg function.

Value

LRS

the value of the likelihood ratio statistic.

pvalue

the p value of test under null hypothesis chi-square distribution.

Author(s)

Rumenick Pereira da Silva rumenickps@gmail.com

See Also

curereg, plot.curereg, lines.curereg

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# ?rmoeevsm
df <- rmoeevsm(n = 500, mu = 0, sigma = 1, alpha = 1, theta = .2, control = 15)

# Model under the null hypothesis (sigma = 1)
fits <- curereg(Surv(time, status) ~ 1, cureformula = ~ 1,
data = df, timedist = "moee", ncausedist = "bernoulli",
method = "BFGS")

# Model under the alternative hypothesis (sigma != 1)
fitg <- curereg(Surv(time, status) ~ 1, cureformula = ~ 1,
data = df, timedist = "moeev", ncausedist = "bernoulli",
method = "BFGS")
LRT(fits, fitg)

Rumenick/flexcure documentation built on May 9, 2019, 10:37 a.m.