| draw_classes_given_Zp | R Documentation |
Draw latent classes conditional on the covariate (scenario "covariate")
draw_classes_given_Zp(Zp, params)
Zp |
Numeric vector of length n. Covariate values. |
params |
Multinomial logistic parameter list (see |
Integer vector of length n with class labels in 1:T.
Zp <- draw_Zp(1000)
X <- draw_classes_given_Zp(Zp, bk2018_params$covariate_params)
table(X) # Should be roughly uniform
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.