Description Usage Arguments Value Author(s) References See Also Examples
conTest_ceq
tests linear equality restricted hypotheses for
(robust) linear models by F, Wald, and scoretests. It can be used directly
and is called by the conTest
function if all restrictions are equalities.
1 2 3 4 5 6 7 8 9 10 11 12 13 14  ## S3 method for class 'conLM'
conTest_ceq(object, test = "F", boot = "no",
R = 9999, p.distr = rnorm, parallel = "no",
ncpus = 1L, cl = NULL, seed = 1234, verbose = FALSE, ...)
## S3 method for class 'conRLM'
conTest_ceq(object, test = "F", boot = "no",
R = 9999, p.distr = rnorm, parallel = "no",
ncpus = 1L, cl = NULL, seed = 1234, verbose = FALSE, ...)
## S3 method for class 'conGLM'
conTest_ceq(object, test = "F", boot = "no",
R = 9999, p.distr = rnorm, parallel = "no",
ncpus = 1L, cl = NULL, seed = 1234, verbose = FALSE, ...)

object 
an object of class 
test 
test statistic; for information about the nulldistribution see details.

boot 
if 
R 
integer; number of bootstrap draws for 
p.distr 
the p.distr function is specified by this function. For
all available distributions see 
parallel 
the type of parallel operation to be used (if any). If missing, the default is set "no". 
ncpus 
integer: number of processes to be used in parallel operation: typically one would chose this to the number of available CPUs. 
cl 
an optional parallel or snow cluster for use if parallel = "snow". If not supplied, a cluster on the local machine is created for the duration of the conTest call. 
seed 
seed value. The default value is set to 1234. 
verbose 
logical; if TRUE, information is shown at each bootstrap draw. 
... 
additional arguments to be passed to the p.distr function. 
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 righthand side elements. 
meq 
number of equality constraints. 
test 
same as input. 
Ts 
teststatistic value. 
df.residual 
the residual degrees of freedom. 
pvalue 
tail probability for 
b_unrestr 
unrestricted regression coefficients. 
b_restr 
restricted regression coefficients. 
R2_org 
unrestricted Rsquared. 
R2_reduced 
restricted Rsquared. 
Leonard Vanbrabant and Yves Rosseel
Silvapulle, M. (1992a). Robust tests of inequality constraints and onesided hypotheses in the linear model. Biometrika, 79, 621–630.
Silvapulle, M. (1996) Robust bounded influence tests against onesided hypotheses in general parametric models. Statistics & probability letters, 31, 45–50.
Silvapulle, M. (1992b). Robust WaldType Tests of OneSided Hypotheses in the Linear Model. Journal of the American Statistical Association, 87, 156–161.
Silvapulle, M. (1996) Robust bounded influence tests against onesided hypotheses in general parametric models. Statistics & probability letters, 31, 45–50.
quadprog,
conTest
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  ## 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)
# another way is to first fit the restricted model
fit_restr1 < restriktor(fit1.lm, constraints = myConstraints1)
conTest(fit_restr1)
## Not run:
# Or in matrix notation.
Amat1 < rbind(c(1, 0, 1),
c( 0, 1, 1))
myRhs1 < rep(0L, nrow(Amat1))
myNeq1 < 2
conTest(fit1.lm, constraints = Amat1,
rhs = myRhs1, neq = myNeq1)
## End(Not run)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.