Learn R Programming

NBPSeq (version 0.1.8)

test.coefficient: Large-sample Test for a Regression Coefficient in an Negative Binomial Regression Model

Description

test.coefficient performs large-sample tests (higher-order asymptotic test, likelihood ratio test, and/or Wald tests) for testing one of the regression coefficient in an NB regression model.

Usage

test.coefficient(nb, dispersion, x, beta0, tests,
    alternative = "two.sided", subset = 1:m,
    print.level = 1)

Arguments

nb
an NB data object, output from prepare.nb.data.
dispersion
dispersion estimates, output from estimate.disp.
x
an $n$ by $p$ design matrix describing the treatment structure
beta0
a $p$-vector specifying the null hypothesis. Non-NA components specify the parameters to test and their null values. (Currently, only one-dimensional test is implemented, so only one non-NA component is allowed).
tests
a character string vector specifying the tests to be performed, can be any subset of "HOA" (higher-order asymptotic test), "LR" (likelihoo ratio test), and "Wald" (Wald test).
alternative
a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less".
subset
an index vector specifying on which rows should be tests be performed
print.level
a number controlling the amount of messages printed: 0 for suppressing all messages, 1 (default) for basic progress messages, and 2 to 5 for increasingly more detailed message.

Value

  • a list containig the following components:
  • beta.hatan $m$ by $p$ matrix of regression coefficient under the full model
  • mu.hatan $m$ by $n$ matrix of fitted mean frequencies under the full model
  • beta.tildean $m$ by $p$ matrix of regression coefficient under the null model
  • mu.tildean $m$ by $n$ matrix of fitted mean frequencies under the null model.
  • HOA, LR, Waldeach is a list of two $m$-vectors, p.values and q.values, giving p-values and q-values of the corresponding tests when that test is included in tests.

Details

test.coefficient performs large-sample tests for a one-dimensional ($q=1$) component $\psi$ of the $p$-dimensional regression coefficient $\beta$. The hypothesized value $\psi_0$ of $\psi$ is specified by the non-NA component of the vector beta0 in the input.

The likelihood ratio statistic, $$\lambda = 2 (l(\hat\beta) - l(\tilde\beta)),$$ converges in distribution to a chi-square distribution with $1$ degree of freedom. The signed square root of the likelihood ratio statistic $\lambda$, also called the directed deviance, $$r = sign (\hat\psi - \psi_0) \sqrt \lambda$$ converges to a standard normal distribution.

For testing a one-dimensional parameter of interest, Barndorff-Nielsen (1986, 1991) showed that a modified directed $$r^* = r - \frac{1}{r} \log(z)$$ is, in wide generality, asymptotically standard normally distributed to a higher order of accuracy than the directed deviance $r$ itself, where $z$ is an adjustment term. Tests based on high-order asymptotic adjustment to the likelihood ratio statistic, such as $r^*$ or its approximation, are referred to as higher-order asymptotic (HOA) tests. They generally have better accuracy than corresponding unadjusted likelihood ratio tests, especially in situations where the sample size is small and/or when the number of nuisance parameters ($p-q$) is large. The implementation here is based on Skovgaard (2001). See Di et al. 2012 for more details.

References

Barndorff-Nielsen, O. (1986): "Infereni on full or partial parameters based on the standardized signed log likelihood ratio," Biometrika, 73, 307-322

Barndorff-Nielsen, O. (1991): "Modified signed log likelihood ratio," Biometrika, 78, 557-563.

Skovgaard, I. (2001): "Likelihood asymptotics," Scandinavian Journal of Statistics, 28, 3-32.