probihgcovn function

Probability distribution of an IHG model with covariates

Probability distribution of an IHG model with covariates

Given a vector of nn ratings over mm categories, it returns a vector of length nn whose i-th element is the probability of observing the i-th rating for the corresponding IHG model with parameter θi\theta_i, obtained via logistic link with covariates and coefficients.

probihgcovn(m,ordinal,U,nu)

Arguments

  • m: Number of ordinal categories
  • ordinal: Vector of ordinal responses
  • U: Matrix of selected covariates for explaining the preference parameter
  • nu: Vector of coefficients for covariates, whose length equals NCOL(U)+1 to include an intercept term in the model (first entry)

Details

The matrix UU is expanded with a vector with entries equal to 1 in the first column to include an intercept term in the model.

Examples

n<-100 m<-7 theta<-0.30 ordinal<-simihg(n,m,theta) U<-sample(c(0,1),n,replace=TRUE) nu<-c(0.12,-0.5) pr<-probihgcovn(m,ordinal,U,nu)

See Also

probihg

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

Useful links