Score.mnr: Multivariate Regression Score Test

Description Usage Arguments Value Examples

View source: R/Score.R

Description

For an outcome of interest among Y, tests the hypothesis that a subset of the regression coefficients for that outcome are fixed at the reference value b10. In particular, suppose β denotes the regression coefficient for the target outcome. Partition β=(β_{1},β_{2}). Score.bnem performs a score test of H_{0}:β_{1}=β_{10}.

Usage

1
2
Score.mnr(Y, j = 1, X, L, b10 = NULL, maxit = 100, eps = 1e-08,
  report = F)

Arguments

Y

Outcome matrix.

j

Column number of the outcome of interest. By default, j=1.

X

List of model matrices, one for each outcome.

L

Logical vector, with as many entires as columns in the target design matrix, indicating which columns design are fixed under the null.

b10

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

maxit

Maximum number of parameter updates.

eps

Minimum acceptable improvement in log likelihood.

report

Report model fitting progress? Default is FALSE.

Value

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
# See `? rMNR` for data generation
# See vignette for test description
# Test b13 = 0, which is FALSE
Score.mnr(Y=Y,j=1,X=X,L=c(F,F,T));
# Test b24 = 0, which is TRUE
Score.mnr(Y=Y,j=2,X=X,L=c(F,F,F,T));
# Test b32 = ... = b35 = 0, which is FALSE
Score.mnr(Y=Y,j=3,X=X,L=c(F,T,T,T,T));
# Test b32 = b34 = 0.1, which is TRUE
Score.mnr(Y=Y,j=3,X=X,b10=c(0.1,0.1),L=c(F,T,F,T,F));

## End(Not run)

zrmacc/MNR documentation built on May 17, 2019, 8:47 p.m.