Learn R Programming

restrikor

Restriktor is a free, open source R package for linear equality and inequality constrained statistical estimation, inference and evaluation for linear models.

Install R

Restriktor is implemented as an R package. This means that before installing restriktor, you should have installed a recent version (>= 4.0.0) of R. You can download the latest version of R from the R-project website.

Install Graphical User Interface (GUI)

R is a command line driven program. This means that it does not have a graphical user interface (GUI). Luckily, there are many good GUI's to make life easier, for example Rstudio, R Commander and RKWard.

Install restriktor

Once you have installed R, the next step is to install restriktor. This can be done by typing in R:

install.packages("restriktor", dependencies = TRUE)

To check if the installation was successful, you can load the restriktor package and try for example:

library(restriktor)

# construct constraint syntax based on the factor level names
constraints <- 'GroupActive < GroupPassive < GroupControl < GroupNo'

Fit the unrestricted linear model, where "Age" is the response variable and "Group" a factor with four treatment groups.

fit.ANOVA <- lm(Age ~ -1 + Group, data = ZelazoKolb1972)

# fit the restricted model
restr.ANOVA <- restriktor(fit.ANOVA, constraints = constraints)


# summary of the restricted parameter estimates
summary(restr.ANOVA)


# informative hypothesis tests
iht(restr.ANOVA)

# Generalized Order-Restricted Information Criterion (GORIC)
goric(restr.ANOVA, comparison = "complement")

If you can see the output, everything is set up and ready.

For more information see the restriktor website.

Copy Link

Version

Install

install.packages('restriktor')

Monthly Downloads

947

Version

0.5-90

License

GPL (>= 2)

Last Published

September 11th, 2024

Functions in restriktor (0.5-90)

iht-methods

Methods for iht
conTest_summary

function for computing all available hypothesis tests
conTestWald

Wald-bar test for robust iht
benchmark_functions

Benchmark Functions for GORIC(A) Analysis
conTestScore

Score-bar test for iht
conTestF

F-bar test for iht
conTest_ceq

Tests for iht with equality constraints only
evSyn

GORIC(A) Evidence synthesis
conTestLRT

Likelihood-ratio-bar test for iht
goric

Generalized Order-Restricted Information Criterion (Approximation) Weights
restriktor-methods

Methods for restriktor
restriktor-package

Package for equality and inequality restricted estimation, model selection and hypothesis testing
myPTs

An example of penalty (PT) values
restriktor

Estimating linear regression models with (in)equality restrictions
iht

function for informative hypothesis testing (iht)
myLLs

An example of log likelihood (LL) values
myGORICs

An example of IC values
ZelazoKolb1972

"Walking" in the newborn (4 treatment groups)
Hurricanes

The Hurricanes Dataset
Burns

Relation between the response variable PTSS and gender, age, TBSA, guilt and anger.
AngerManagement

Reduction of aggression levels Dataset (4 treatment groups)
con_weights_boot

function for computing the chi-bar-square weights based on Monte Carlo simulation.
FacialBurns

Dataset for illustrating the conTest_conLavaan function.
Exam

Relation between exam scores and study hours, anxiety scores and average point scores.
bootstrapD

Bootstrapping a Lavaan Model
calculate_IC_weights

Calculating IC weights based on IC values (AIC, ORIC, GORIC(A), BIC, SIC, ...)
conTestC

one-sided t-test for iht