ConTestC: one-sided t-test for iht

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

conTestC tests linear inequality restricted hypotheses for (robust) linear models by a one-sided t-test. This method is based on the union-intersection principle. It is called by the conTest function if all restrictions are equalities. For more information see details.

Usage

1
2
## S3 method for class 'restriktor'
conTestC(object, ...)

Arguments

object

an object of class restriktor.

...

no additional arguments for now.

Details

Hypothesis test Type C:

The null-distribution of hypothesis test Type C is based on a t-distribution (one-sided). Its power can be poor in case of many inequalty constraints. Its main role is to prevent wrong conclusions from significant results from hypothesis test Type A.

Value

An object of class conTest, for which a print is available. More specifically, it is a list with the following items:

CON

a list with useful information about the constraints.

Amat

constraints matrix.

bvec

vector of right-hand side elements.

meq

number of equality constraints.

test

same as input.

Ts

test-statistic value.

df.residual

the residual degrees of freedom.

pvalue

tail probability for Ts.

b.unrestr

unrestricted regression coefficients.

b.restr

restricted regression coefficients.

Sigma

variance-covariance matrix of unrestricted model.

R2.org

unrestricted R-squared.

R2.reduced

restricted R-squared.

boot

"no", not used (yet).

model.org

original model.

Author(s)

Leonard Vanbrabant and Yves Rosseel

References

Silvapulle, M.J. and Sen, P.K. (2005, chapter 5.). Constrained Statistical Inference. Wiley, New York

See Also

quadprog, conTest

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
## example 1:
# the data consist of ages (in months) at which an 
# infant starts to walk alone.

# prepare data
DATA1 <- subset(ZelazoKolb1972, Group != "Control")

# fit unrestricted linear model
fit1.lm <- lm(Age ~ -1 + Group, data = DATA1)

# the variable names can be used to impose constraints on
# the corresponding regression parameters.
coef(fit1.lm)

# constraint syntax: assuming that the walking 
# exercises would not have a negative effect of increasing the 
# mean age at which a child starts to walk. 
myConstraints1 <- ' GroupActive  < GroupPassive; 
                    GroupPassive < GroupNo '

conTest(fit1.lm, myConstraints1, type = "C")


# another way is to first fit the restricted model
fit.restr1 <- restriktor(fit1.lm, constraints = myConstraints1)

conTest(fit.restr1, type = "C")

## Not run:  
  # Or in matrix notation.
  Amat1 <- rbind(c(-1, 0,  1),
                 c( 0, 1, -1))
  myRhs1 <- rep(0L, nrow(Amat1)) 
  myNeq1 <- 0
  
  fit1.con <- restriktor(fit1.lm, constraints = Amat1,
                         rhs = myRhs1, neq = myNeq1)
  conTest(fit1.con, type = "C")

## End(Not run)            

restriktor documentation built on Feb. 25, 2020, 5:08 p.m.