Learn R Programming

⚠️There's a newer version (0.6-10) of this package.Take me there.

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

1,584

Version

0.5-80

License

GPL (>= 2)

Maintainer

Leonard Vanbrabant

Last Published

July 6th, 2024

Functions in restriktor (0.5-80)

conTestWald

Wald-bar test for robust iht
ZelazoKolb1972

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

Dataset for illustrating the conTest_conLavaan function.
AngerManagement

Reduction of aggression levels Dataset (4 treatment groups)
Hurricanes

The Hurricanes Dataset
conTestC

one-sided t-test for iht
conTestScore

Score-bar test for iht
conTestLRT

Likelihood-ratio-bar test for iht
Exam

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

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

Bootstrapping a Lavaan Model
conTest_ceq

Tests for iht with equality constraints only
goric

Generalized Order-Restricted Information Criterion (Approximation) Weights
conTest_summary

function for computing all available hypothesis tests
conTestF

F-bar test for iht
iht-methods

Methods for iht
calculate_IC_weights

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

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

Benchmark Functions for GORIC(A) Analysis
evSyn

GORIC(A) Evidence synthesis
restriktor-methods

Methods for restriktor
iht

function for informative hypothesis testing (iht)
myLLs

An example of log likelihood (LL) values
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
myGORICs

An example of IC values