Description Usage Arguments Details References See Also Examples

Generic function for visualizing the effects of concomitant variables in finite mixture models.

1 | ```
effectsplot(object, ...)
``` |

`object` |
Fitted model object. |

`...` |
Arguments passed to |

`effectsplot`

is set up to be both an S3 and S4 generic.
The idea is that it provides the glue needed to extract the concomitant
part from a mixture model: First, the concomitant model is
refitted as a `multinom`

object or `glm`

object (in case of
a mixture with two components). Second, `effect`

or `allEffects`

from the effects package
is called to extract the effects of the concomitants. Third,
the corresponding `plot`

methods from the effects
package create the display.

Currently, this is implemented for `raschmix`

,
`btmix`

, and `mptmix`

objects. The interface is not
yet fully tested and may change in future versions.

Fox, J. (2003). Effect Displays in R for Generalised Linear Models.
*Journal of Statistical Software*, **8**(15), 1–27.
http://www.jstatsoft.org/v08/i15/

Fox, J., and Hong, J. (2009). Effect Displays in R for Multinomial
and Proportional-Odds Logit Models: Extensions to the effects Package.
*Journal of Statistical Software*, **32**(1), 1–24.
http://www.jstatsoft.org/v32/i01/

`effect`

, `allEffects`

,
`multinom`

, `glm`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ```
## data on party preferences in Germany
## (omit single observation with education = 1)
data("GermanParties2009", package = "psychotools")
gp <- subset(GermanParties2009, education != "1")
gp$education <- factor(gp$education)
## fit Bradley-Terry mixture, see ?btmix for more details
## and a fully-worked example
suppressWarnings(RNGversion("3.5.0"))
set.seed(2)
cm4 <- btmix(preference ~ gender + education + age + crisis, data = gp, k = 4, nrep = 1)
## inspect mixture and effects
library("lattice")
xyplot(cm4)
effectsplot(cm4)
## vis effects package directly
if(require("effects")) {
eff4 <- allEffects(cm4)
plot(eff4)
}
``` |

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.