Restriktor is developed for applied users. This means that we have tried to come up with a user-friendly constraint syntax. In R, categorical predictors are represented by 'factors'. For example, the ‘Group’ variable with three factor levels: 'Low', 'Medium', and 'High'. Then, the constraints can be specified using the factor level names. In case of a continuous variable the constraints can be specified using the variable name. For example, the categorical variable 'Group' and one continuous predictor 'x1' the constraint syntax might look as follows:
myConstraints <- ' GroupLow < GroupMedium
GroupMedium < GroupHigh
x1 > 0 '
In addition, we have tried to provide all the necessary tools and output to
evaluate the order-constrained hypothesis. The main tools are the restriktor()
function and the iht()
function. The restriktor() function is
used for estimating the restricted estimates and the iht() function is for
testing the informative hypothesis. For example, the output of the
restriktor() function might look as follows:
Restriktor: restricted linear model:
Residuals:
Min 1Q Median 3Q Max
-2.877222 -0.773776 0.005096 0.755305 2.978666
Coefficients:
Estimate Std. Error t value Pr(>|t|)
group1 0.945747 0.075464 12.533 < 2.2e-16 ***
group2 0.945747 0.075464 12.533 < 2.2e-16 ***
group3 1.058034 0.106722 9.914 < 2.2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 1.0672 on 297 degrees of freedom
Standard errors: standard
Multiple R-squared reduced from 0.4656 to 0.4623
Generalized Order-Restricted Information Criterion:
Loglik Penalty Goric
-443.6900 2.8333 893.0466