lfast {LikertMakeR} | R Documentation |
lfast()
generates random discrete values from a
(scaled Beta distribution) so the data replicate a rating scale -
for example,a 1-5 scale made from 5 items (questions) or 0-10
likelihood-of-purchase scale.
lfast(n, mean, sd, lowerbound, upperbound, items = 1, seed)
n |
(positive, int) number of observations to generate |
mean |
(real) target mean |
sd |
(real) target standard deviation |
lowerbound |
(positive, int) lower bound (e.g. '1' for a 1-5 rating scale) |
upperbound |
(positive, int) upper bound (e.g. '5' for a 1-5 rating scale) |
items |
(positive, int) number of items in the rating scale. Default = 1 |
seed |
(real) optional seed for reproducibility |
a vector of simulated data approximating user-specified conditions.
x <- lfast(
n = 256,
mean = 4.0,
sd = 1.0,
lowerbound = 1,
upperbound = 7,
items = 6
)
x <- lfast(256, 2, 1.8, 0, 10)