Learn R Programming

CUB (version 0.1)

probcubpq: Probability distribution of a CUB model with covariates for both feeling and uncertainty

Description

Compute the probability distribution of a CUB model with covariates for both the feeling and the uncertainty components.

Usage

probcubpq(m, ordinal, Y, W, bet, gama)

Arguments

m
Number of ordinal categories
ordinal
Vector of ordinal responses
Y
Matrix of covariates for explaining the uncertainty component
W
Matrix of covariates for explaining the feeling component
bet
Vector of parameters for the uncertainty component, whose length equals NCOL(Y) + 1 to include an intercept term in the model (first entry)
gama
Vector of parameters for the feeling component, whose length equals NCOL(W)+1 to include an intercept term in the model (first entry)

Value

A vector of the same length as ordinal, whose i-th component is the probability of the i-th rating according to a CUB distribution with given covariates for both feeling and uncertainty, and specified coefficients vectors

References

Piccolo D. (2006). Observed Information Matrix for MUB Models, Quaderni di Statistica, 8, 33--78 Piccolo D. and D'Elia A. (2008). A new approach for modelling consumers' preferences, Food Quality and Preference, 18, 247--259 Iannario M. and Piccolo D. (2012). CUB models: Statistical methods and empirical evidence, in: Kenett R. S. and Salini S. (eds.), Modern Analysis of Customer Surveys: with applications using R, J. Wiley and Sons, Chichester, 231--258

See Also

bitgama, probcub00, probcubp0, probcub0q

Examples

Run this code
m<-8
n<-100
ordinal<-sample(1:m,n,replace=TRUE)
Y<-sample(c(0,1),n,replace=TRUE)
W<-sample(c(0,1,2),n,replace=TRUE)
bet<-c(0.3,-0.4)
gama<-c(0.1,-1.5)
probi<-probcubpq(m, ordinal, Y, W, bet, gama)

Run the code above in your browser using DataLab