| conTest_ceq | R Documentation | 
conTest_ceq tests linear equality restricted hypotheses for
(robust) linear models by F-, Wald-, and score-tests. It can be used directly 
and is called by the conTest function if all restrictions are equalities.
## 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 null-distribution 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 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. | 
| R2_org | unrestricted R-squared. | 
| R2_reduced | restricted R-squared. | 
Leonard Vanbrabant and Yves Rosseel
Silvapulle, M. (1992a). Robust tests of inequality constraints and one-sided hypotheses in the linear model. Biometrika, 79, 621–630.
Silvapulle, M. (1996) Robust bounded influence tests against one-sided hypotheses in general parametric models. Statistics and probability letters, 31, 45–50.
Silvapulle, M. (1992b). Robust Wald-Type Tests of One-Sided Hypotheses in the Linear Model. Journal of the American Statistical Association, 87, 156–161.
Silvapulle, M. (1996) Robust bounded influence tests against one-sided hypotheses in general parametric models. Statistics and probability letters, 31, 45–50.
quadprog, 
iht
## 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)
# another way is to first fit the restricted model
fit_restr1 <- restriktor(fit1.lm, constraints = myConstraints1)
iht(fit_restr1)
 
# Or in matrix notation.
Amat1 <- rbind(c(-1, 0,  1),
               c( 0, 1, -1))
myRhs1 <- rep(0L, nrow(Amat1)) 
myNeq1 <- 2
iht(fit1.lm, constraints = Amat1,
    rhs = myRhs1, neq = myNeq1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.