chi2cub function

Pearson X2X^2 statistic

Pearson X2X^2 statistic

Compute the X2X^2 statistic of Pearson for CUB models with one or two discrete covariates for the feeling component.

chi2cub(m,ordinal,W,pai,gama)

Arguments

  • m: Number of ordinal categories
  • ordinal: Vector of ordinal responses
  • W: Matrix of covariates for the feeling component
  • pai: Uncertainty parameter
  • gama: Vector of parameters for the feeling component, with length equal to NCOL(W)+1 to account for an intercept term (first entry of gama)

Returns

A list with the following components: - df: Degrees of freedom

  • chi2: Value of the Pearson fitting measure

  • dev: Deviance indicator

Details

No missing value should be present neither for ordinal nor for covariate matrices: thus, deletion or imputation procedures should be preliminarily run.

Examples

data(univer) m<-7 pai<-0.3 gama<-c(0.1,0.7) ordinal<-univer$informat; W<-univer$gender; pearson<-chi2cub(m,ordinal,W,pai,gama) degfree<-pearson$df statvalue<-pearson$chi2 deviance<-pearson$dev

References

Tutz, G. (2012). Regression for Categorical Data, Cambridge University Press, Cambridge

  • Maintainer: Rosaria Simone
  • License: GPL-2 | GPL-3
  • Last published: 2024-02-23

Useful links