wald.test {eba}R Documentation

Testing Linear Hypotheses

Description

Tests linear hypotheses of the form Cp = 0 in EBA models using the Wald test.

Usage

wald.test(eba, C, u.scale = TRUE)

Arguments

eba an object of class eba, typically the result of a call to OptiPt
C a matrix of contrasts, specifying the linear hypotheses
u.scale logical, if TRUE the test is performed on the u-scale, if FALSE the test is performed on the EBA parameters directly

Details

The test statistic is W = (Cp)' [C cov(p) C']^{-1} (Cp). It is approximately chi2 distributed with rk(C) degrees of freedom.

C is usually of full rank and must have as many columns as there are parameters in p.

Value

C the matrix of contrasts, specifying the linear hypotheses
W the Wald test statistic
df the degrees of freedom (rk(C))
pval the p-value of the test

See Also

OptiPt, group.test, cov.u.

Examples

data(celebrities)  # absolute choice frequencies
A <- list(c(1,10), c(2,10), c(3,10), c(4,11), c(5,11), c(6,11),
          c(7,12), c(8,12), c(9,12))  # the structure of aspects
eba <- OptiPt(celebrities, A)  # Fit a preference tree

# Test whether JU, CY, and AJF have equal preference scale values
C1 <- matrix(c(0,0,0,1,-1,0,0,0,0,
               0,0,0,1,0,-1,0,0,0), 2, 9, TRUE)
wald.test(eba, C1)

# Test whether the three branch parameters are different
C2 <- matrix(c(0,0,0,0,0,0,0,0,0,1,-1,0,
               0,0,0,0,0,0,0,0,0,1,0,-1), 2, 12, TRUE)
wald.test(eba, C2, u.scale = FALSE)

[Package eba version 1.4-1 Index]