conTestC {restriktor} | R Documentation |
one-sided t-test for iht
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
## S3 method for class 'restriktor'
conTestC(object, ...)
Arguments
object |
an object of class |
... |
no additional arguments for now. |
Details
Hypothesis test Type C:
Test H0: at least one restriction false ("<") against HA: all constraints strikty true (">"). This test is based on the intersection-union principle. Note that, this test only makes sense in case of no equality constraints.
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 |
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
Examples
## 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 < GroupNo '
iht(fit1.lm, myConstraints1, type = "C")
# another way is to first fit the restricted model
fit.restr1 <- restriktor(fit1.lm, constraints = myConstraints1)
iht(fit.restr1, type = "C")
# 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)
iht(fit1.con, type = "C")