fake_likert: fake_likert

Description Usage Arguments Value Examples

View source: R/fake_likert.R

Description

Create a sample for a likert scale score with given mean and st.dev. This uses a primitive type of simulated annealing for the search. This was written to test the existence of fraudulent numbers in a manuscript by Diederik Stapel.

Usage

1
2
fake_likert(N = 16, M = 5, m = 3, d = 1, s = 2, rep.count = 250000,
  eps = 0.005, base = 0, T = 4, test = FALSE)

Arguments

N

the number of observations

M

the highest score

m

the mean to approach

d

the number of scores from base to M that are averaged (usually 1)

s

the standard deviation to approach

rep.count

the maximum number of try's

eps

the tolerance for |m-s|

base

the lowest value of the score (usually 0 or 1)

T

the temperature (set to higher values below sqrt(rep.count) to find rare solutions)

test

set to TRUE to print some test information from the fucntion

Value

a vector with N integers on the likert scale

Examples

1
# fake_likert(N=16, M=7, base=1, m=4.6, s=3.6) # Cannot exist. Should fail

MrOoijer/myLib documentation built on Dec. 17, 2021, 4:22 a.m.