prefmod-package: 'prefmod': Utilities to Fit Paired Comparison Models for...

Description Details Author(s) References Examples

Description

Generates design matrix for analysing real paired comparisons and derived paired comparison data (Likert-type items/ratings or rankings) using a loglinear approach. Fits loglinear Bradley-Terry model (LLBT) exploiting an eliminate feature. Computes pattern models for paired comparisons, rankings, and ratings. Some treatment of missing values (MCAR and MNAR). Fits pattern mixture models using a non-parametric ML approach.

Details

Package:prefmod
Type: Package
Version:NA
Date: NA
License:NA

Author(s)

Reinhold Hatzinger, Marco J. Maier

Maintainer: Marco J. Maier ([email protected])

References

Hatzinger, R., & Dittrich, R. (2012). prefmod: An R Package for Modeling Preferences Based on Paired Comparisons, Rankings, or Ratings. Journal of Statistical Software, 48(10), 1–31. http://www.jstatsoft.org/v48/i10/

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# mini example with three Likert items and two subject covariates

# using example data "xmpl" in the package
dsgnmat <- patt.design(xmpl, nitems = 3, resptype = "rating",
    ia = TRUE, cov.sel = "ALL")
head(dsgnmat)

# fit of Critchlov & Fligner (1991) Salad Dressings Data
pattR.fit(salad, nitems = 4)

# alternatively use glm() with patt.design()
sal <- patt.design(salad, nitems = 4, resptype = "ranking")
glm(y ~ A+B+C+D, data = sal, family = poisson)

Example output

Loading required package: gnm
Loading required package: colorspace
  y I1 I2 I3 u12 u13 u23 I12.13 I12.23 I13.23 SEX EDU
1 2  0  0  0   1   1   1      0      0      0   1   1
2 4  1  1 -2   1   0   0      0      0      1   1   1
3 2  1 -2  1   0   1   0      0     -1      0   1   1
4 2  2 -1 -1   0   0   1      1      0      0   1   1
5 1  2  0 -2   0   0   0      1      1      1   1   1
6 2  2 -2  0   0   0   0      1     -1     -1   1   1

Results of pattern model for rankings 

Call:
pattR.fit(obj = salad, nitems = 4) 

Deviance:  22.24863 
log likelihood:  -77.44574 

no of iterations:  10  (Code: 1 )

  estimate      se      z p-value
A -0.27742 0.12453 -2.228  0.0259
B  0.59125 0.14330  4.126  0.0000
C  0.18879 0.11143  1.694  0.0903

Call:  glm(formula = y ~ A + B + C + D, family = poisson, data = sal)

Coefficients:
(Intercept)            A            B            C            D  
    -0.8018      -0.2774       0.5913       0.1888           NA  

Degrees of Freedom: 23 Total (i.e. Null);  20 Residual
Null Deviance:	    70.75 
Residual Deviance: 22.25 	AIC: 60.99

prefmod documentation built on May 2, 2019, 4:59 p.m.