gen.latent.vars: Generate latent underlying variables given imputed question...

Description Usage Arguments Value Examples

Description

Given ordinal responses to survey questions, we generate the underlying latent variables that correspond to those questions

Usage

1
gen.latent.vars(data, grp.indicator, scores = "Bartlett", num.iter = 5)

Arguments

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

Value

A data.frame containing the underlying latent variable estimates.

Examples

1
2
3
4
5
6
7
# 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.vars <- gen.latent.vars(multiis, grp.indicator = grp.indicator, num.iter = 5)

head(latent.vars)

rosiezou/440proj documentation built on May 12, 2019, 6:25 p.m.