Description Usage Arguments Value Examples
Given ordinal responses to survey questions, we generate multiple underlying latent variable datasets
1 2 | gen.latent.datasets(M, data, grp.indicator, scores = "Bartlett",
num.iter = 5)
|
M |
number of datasets to construct. |
data |
a (non-empty) numeric vector of data values. |
grp.indicator |
a (non-empty) numeric vector of data values. |
scores |
type of score to use. |
num.iter |
number of iterations to use in imputation step |
A list containing datasets with latent underlying variables
1 2 3 4 5 6 7 8 9 | # Create indicators (a label indicating which latent variable the question corresponds to)
grp.indicator <- sapply(names(multiis), FUN =
function(x){strsplit(x, split = "_")[[1]][2]})
latent.datasets <- gen.latent.datasets(5, multiis, grp.indicator = grp.indicator, num.iter = 1)
head(latent.datasets[[1]])
head(latent.datasets[[2]])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.