LRT function

Likelihood ratio test using a mean-shifted model

Likelihood ratio test using a mean-shifted model

Implementing the likelihood ratio tests using the mean-shifted model for the DerSimonian-Laird-type random-effects model. The bootstrap p-values are provided.

LRT(y, v, B=2000, alpha=0.05)

Arguments

  • y: A vector of the outcome measure estimates (e.g., MD, SMD, log OR, log RR, RD)
  • v: A vector of the variance estimate of y
  • B: The number of bootstrap resampling (default: 2000)
  • alpha: The significance level (default: 0.05)

Returns

Results of the likelihood ratio tests involving bootstrap p-values. The outputs are ordered by the p-values.

  • id: ID of the study.
  • LR: The likelihood ratio statistic for based on the mean-shifted model.
  • Q: 1-alphath percentile for the bootstrap distribution of the likelihood ratio statistic.
  • P: The bootstrap p-value for the likelihood ratio statistic.

Examples

require(metafor) data(SMT) edat2 <- escalc(m1i=m1,sd1i=s1,n1i=n1,m2i=m2,sd2i=s2,n2i=n2,measure="MD",data=SMT) LRT(edat2$yi, edat2$vi, B=10) # This is an example command for illustration. B should be >= 1000.
  • Maintainer: Hisashi Noma
  • License: GPL-3
  • Last published: 2023-05-22

Useful links