Score: Standard Score Test

Description Usage Arguments Value Examples

Description

Tests the hypothesis that a subset of the regression coefficients are fixed at a reference value. Specifically, let β denote the regression coefficient. Partition β=(β_{1},β_{2}). Suppose that interest lies in testing that β_{1} is fixed at β_{10}. Score performs a score test of H_{0}:β_{1}=β_{10}. The test is specified using a logical vector L, with as many entries as columns in the model matrix X. The values of L set to T are constrained under the null, while values of L set to F are estimated under the null.

Usage

1
2
Score(y, X, L, b10 = NULL, method = "asymptotic", B = 1000,
  parallel = F)

Arguments

y

Numeric response vector.

X

Numeric model matrix.

L

Logical vector, with as many entires as columns in the model matrix, indicating which columns have fixed coefficients under the null.

b10

Value of the regression coefficient for the selected columns under the null. Defaults to zero.

method

Either "asymptotic" or "perturbation".

B

Score perturbations.

parallel

Run in parallel? Must reigster parallel backend first.

Value

A numeric vector containing the score statistic, the degrees of freedom, and a p-value.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
# See Vignette for Data Generation.
# Hypothesis test
L = c(F,F,F,F,T);
# Asymptotic p-value
Score(y=y,X=X,L=L,method="asymptotic");
# Perturbation p-value
Score(y=y,X=X,L=L,method="perturbation");

## End(Not run)

zrmacc/LiST documentation built on May 9, 2019, 8:20 a.m.