Description Usage Arguments Details Value Examples
Generates random distributions of answers to Likert-type items answered on a numeric (integer) scale.
1 2 |
n |
number of observations. |
mean |
mean of the normal distribution to be approximated. |
scale.from |
bottom-end of the possible values in scale. |
scale.to |
top-end of the possible values in scale. |
sd.norm |
standard deviation of the normal distribution to be approximated. |
shift.to.mean |
if set to "none", the mean of observations will generally not match the mean of the normal to be approximated; to shift the observations to match it, set to either "quick", "iterative", or "round-robin" (algorithms discussed in the details) |
TODO
A vector of n length.
1 2 3 4 5 6 7 8 9 10 11 | # Simulate 1000 responses for question "From 1 to 5, how much do you like pizza?"
responses = rrating(1000, mean = 4, scale.from = 1, scale.to = 5)
plot(table(responses))
mean(responses)
#
# mean is not 4, because tails of the normal distribution being approximated
# were binned with the boundaries. To keep mean at four, set the shift option:
responses.shifted = rrating(1000, mean = 4, scale.from = 1, scale.to = 5,
shift.to.mean = "quick")
plot(table(responses.shifted))
mean(responses.shifted)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.