lfast {LikertMakeR}R Documentation

Rating scale data (e.g. Likert scale) from a Scaled Beta Distribution

Description

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.

Usage

lfast(n, mean, sd, lowerbound, upperbound, items = 1, seed)

Arguments

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

Value

a vector of simulated data approximating user-specified conditions.

Examples


x <- lfast(
  n = 256,
  mean = 4.0,
  sd = 1.0,
  lowerbound = 1,
  upperbound = 7,
  items = 6
)

x <- lfast(256, 2, 1.8, 0, 10)


[Package LikertMakeR version 0.1.5 Index]