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

933

Version

0.6-10

License

GPL (>= 2)

Maintainer

Leonard Vanbrabant

Last Published

December 19th, 2024

Functions in restriktor (0.6-10)

conTest_ceq

Tests for iht with equality constraints only
conTestWald

Wald-bar test for robust iht
conTestScore

Score-bar test for iht
conTest_summary

function for computing all available hypothesis tests
evSyn

GORIC(A) Evidence synthesis
iht-methods

Methods for iht
goric

Generalized Order-Restricted Information Criterion (Approximation) Weights
iht

function for informative hypothesis testing (iht)
benchmark_functions

Benchmark Functions for GORIC(A) Analysis
myGORICs

An example of IC values
restriktor-package

Package for equality and inequality restricted estimation, model selection and hypothesis testing
restriktor-methods

Methods for restriktor
restriktor

Estimating linear regression models with (in)equality restrictions
myLLs

An example of log-likelihood (LL) values
conTestF

F-bar test for iht
conTestLRT

Likelihood-ratio-bar test for iht
myPTs

An example of penalty (PT) values
FacialBurns

Dataset for illustrating the conTest_conLavaan function.
Exam

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

Reduction of aggression levels Dataset (4 treatment groups)
calculate_IC_weights

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

one-sided t-test for iht
bootstrapD

Bootstrapping a Lavaan Model
Burns

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

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

The Hurricanes Dataset
con_weights_boot

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