Description Usage Arguments Details Value References See Also Examples

Fit finite mixtures of Bradley-Terry models for paired comparisons data via maximum likelihood with the EM algorithm.

1 2 3 4 5 6 7 8 | ```
btmix(formula, data, k, subset, weights,
nrep = 3, cluster = NULL, control = NULL,
verbose = TRUE, drop = TRUE, unique = FALSE, which = NULL,
type = c("loglin", "logit"), ref = NULL, undecided = NULL,
position = NULL, ...)
FLXMCbtreg(formula = . ~ ., type = c("loglin", "logit"), ref = NULL,
undecided = NULL, position = NULL, ...)
``` |

`formula` |
Symbolic description of the model (of type |

`data, subset` |
Arguments controlling formula processing. |

`k` |
A vector of integers indicating the number of components of
the finite mixture; passed in turn to the |

`weights` |
An optional vector of weights to be used in the fitting
process; passed in turn to the |

`nrep` |
Number of runs of the EM algorithm. |

`cluster` |
Either a matrix with |

`control` |
An object of class |

`verbose` |
A logical; if |

`drop` |
A logical; if |

`unique` |
A logical; if |

`which` |
number of model to get if |

`type` |
Character. Should an auxiliary log-linear Poisson model or logistic binomial be employed for estimation? The latter is only available if not undecided effects are estimated. |

`ref` |
Character or numeric. Which object parameter should be the reference category, i.e., constrained to zero? |

`undecided` |
Logical. Should an undecided parameter be estimated? |

`position` |
Logical. Should a position effect be estimated? |

`...` |
Currently not used. |

Internally `stepFlexmix`

is called with suitable arguments to fit the finite mixture model with
the EM algorithm.

`FLXMCbtreg`

is the `flexmix`

-driver for
Bradley-Terry mixture models.

The interface is designed along the same lines as `raschmix`

which is introduced in detail in Frick et al. (2012). However, the
`btmix`

function has not yet been fully tested and may change in
future versions.

Either an object of class `"btmix"`

containing the best model
with respect to the log-likelihood (if `k`

is a scalar) or the
one selected according to `which`

(if specified and `k`

is a
vector of integers longer than 1) or an object of class
`"stepBTmix"`

(if `which`

is not specified and `k`

is a
vector of integers longer than 1).

Bradley, R.A., and Terry, M.E. (1952). Rank Analysis of Incomplete
Block Designs. I. The Method of Paired Comparisons. *Biometrika*,
**39**(3/4), 324–345.

Dörr, M. (2011). Bradley Terry Mixture Models: Theory, Implementation in R and Validation. Diploma Thesis, Ludwig-Maximilians-Universität München.

Frick, H., Strobl, C., Leisch, F., and Zeileis, A. (2012).
Flexible Rasch Mixture Models with Package psychomix.
*Journal of Statistical Software*, **48**(7), 1–25.
http://www.jstatsoft.org/v48/i07/.

Grün, B., and Leisch, F. (2008). FlexMix Version 2: Finite Mixtures
with Concomitant Variables and Varying and Constant Parameters.
*Journal of Statistical Software*, **28**(4), 1–35.
http://www.jstatsoft.org/v28/i04/.

Leisch, F. (2004). FlexMix: A General Framework for Finite Mixture
Models and Latent Class Regression in R.
*Journal of Statistical Software*, **11**(8), 1–18.
http://www.jstatsoft.org/v11/i08/.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | ```
## Data
data("GermanParties2009", package = "psychotools")
## omit single observation with education = 1
gp <- subset(GermanParties2009, education != "1")
gp$education <- factor(gp$education)
## Bradley-Terry mixture models
suppressWarnings(RNGversion("3.5.0"))
set.seed(1)
## fit models for k = 1, ..., 4 with concomitant variables
cm <- btmix(preference ~ gender + education + age + crisis,
data = gp, k = 1:4, nrep = 3)
## inspect results
plot(cm)
## select model
cm4 <- getModel(cm, which = "4")
## inspect mixture and effects
library("lattice")
xyplot(cm4)
effectsplot(cm4)
effectsplot(cm4, selection = "education")
## vis effects package directly
if(require("effects")) {
eff4 <- allEffects(cm4)
plot(eff4)
}
``` |

psychomix documentation built on May 8, 2019, 1:05 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.