README.md

Travis build
status lifecycle

GORICA: Evaluation of Inequality Constrained Hypotheses Using Generalized AIC

Implements the generalized order-restricted information criterion approximation (GORICA). The GORICA can be utilized to evaluate (in)equality constrained hypotheses. The GORICA is applicable not only to normal linear models, but also to generalized linear models (GLMs), generalized linear mixed models (GLMMs), and structural equation models (SEMs). In addition, the GORICA can be utilized in the context of contingency tables for which (in)equality constrained hypotheses do not necessarily contain linear restrictions on cell probabilities, but instead often contain non-linear restrictions on cell probabilities.

Installation

You can install gorica from GitHub with:

# install.packages("devtools")
devtools::install_github("cjvanlissa/gorica")

Workflow

Add gorica to your existing R workflow, and evaluate informative hypotheses for your familiar R analyses! Here is an example for testing an informative hypothesis about mean differences in an ANOVA:

res <- lm(Sepal.Length ~ -1 + Species, data = iris)
gorica(res, "Speciessetosa < Speciesversicolor = Speciesvirginica; Speciessetosa < Speciesversicolor < Speciesvirginica")
#> Informative hypothesis test for an object of class lm:
#> 
#>    loglik  penalty gorica gorica_weights
#> H1 -14.948 1.499   32.894 0.000         
#> H2 5.103   1.834   -6.538 0.762         
#> Hu 5.103   3.000   -4.206 0.238         
#> 
#> Hypotheses:
#>   H1: Speciessetosa<Speciesversicolor=Speciesvirginica
#>   H2: Speciessetosa<Speciesversicolor<Speciesvirginica 
#>   Hu: Unconstrained hypothesis
#> 


Try the gorica package in your browser

Any scripts or data that you put into this service are public.

gorica documentation built on Jan. 9, 2020, 1:12 a.m.