Description Usage Arguments Value Examples
View source: R/latent_scores.R
EAP estimates of latent preferences for either hltm
or hgrm
models.
1 | latent_scores(x, digits = 3)
|
x |
An object of class |
digits |
The number of significant digits to use when printing |
A data frame of EAP estimates of latent preferences and their approximate standard errors.
1 2 3 4 5 6 7 8 | y <- nes_econ2008[, -(1:3)]
x <- model.matrix( ~ party * educ, nes_econ2008)
z <- model.matrix( ~ party, nes_econ2008)
nes_m1 <- hgrm(y, x, z)
pref <- latent_scores(nes_m1)
require(ggplot2)
ggplot(data = nes_econ2008) +
geom_density(aes(x = pref$post_mean, col = party))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.