Learn R Programming

CUB (version 0.1)

ihgcov: Main function for IHG models with covariates

Description

Estimate and validate an IHG model for given ordinal responses, with covariates to explain the preference parameter.

Usage

ihgcov(m, ordinal, U, makeplot, summary)

Arguments

m
Number of ordinal categories
ordinal
Vector of ordinal responses
U
Matrix of selected covariates for the preference parameter
makeplot
Logical: if TRUE and if only one dichotomous covariate is included in the model, with levels (0,1), the function returns a graphical plot comparing the distributions of the responses conditioned to the value of the covariate
summary
Logical: if TRUE, summary results of the fitting procedure are displayed on screen

Value

An object of the class "IHG"An object of the class "IHG"

Details

The optimization procedure is run via "optim", option method="Brent" for constrained optimization (lower bound = 0, upper bound=1).