powered by
Recode a latent variable into a Likert response variable
draw_likert( x, min = NULL, max = NULL, bins = NULL, breaks = NULL, labels = NULL )
a numeric variable considered to be "latent"
the minimum value of the latent variable
the maximum value of the latent variable
the number of Likert scale values. The latent variable will be cut into equally sized bins as in seq(min, max, length.out = bins + 1)
A vector of breaks. This option is useful for settings in which equally-sized breaks are inappropriate
An optional vector of labels. If labels are provided, the resulting output will be a factor.
# NOT RUN { x <- 1:100 draw_likert(x, min = 0, max = 100, bins = 7) draw_likert(x, breaks = c(-1, 10, 100)) # }
Run the code above in your browser using DataLab