QT1: Calculating p-value for bootstrap-adjusted likelihood ratio...

Description Usage Arguments Details Value References Examples

View source: R/QT1.r

Description

Calculating p-value for bootstrap-adjusted likelihood ratio statistic

Usage

1
QT1(x, x0)

Arguments

x

A vector of bootstrap samples of likelihood ratio statistic.

x0

The value of the ordinary likelihood ratio statistic.

Details

Please see Noma et al. (2017) for details.

Value

Caluculated p-value for the adjusted test.

References

Noma, H., Nagashima, K., Maruo, K., Gosho, M., Furukawa, T. A. (2017). Bartlett-type corrections and bootstrap adjustments of likelihood-based inference methods for network meta-analysis. ISM Research Memorandum 1205.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
dae <- data.aug.edit(smoking)
y <- dae$y
S <- dae$S

beta1e <- 0.80

C <- 0.95
alpha <- 1 - C

ml1 <- ML(y, S)

a1 <- ml1$Coefficients[, 1]
a2 <- (ml1$`Between-studies_SD`)^2
a3 <- a2*(ml1$`Between-studies_COR`)
a4 <- c(a1, a2, a3)

mu13 <- ml1$Coefficients[1, 1]
ci3 <- ml1$Coefficients[1, 3:4]

R <- qchisq(C, df=1)

beta1 <- log(beta1e)
mlike0 <- .5*ml1$Loglikelihood

bcb1 <- PBS0.LR(y, S, ml0 = a4, mu0 = beta1, B = 400)

mlike1 <- .5*RML(y, S, ml0 = a4, mu0 = beta1)
LR0 <- -2*(mlike1 - mlike0)

QT1(bcb1, LR0)  # adjusted p-value

nshi-stat/netiim3 documentation built on May 6, 2019, 10:51 p.m.