Skip to contents

It is always best to use raw scores for computing the FrequencyTable. They aren't always available - in that case, this function can be used to simulate the distribution given its descriptive statistics.

This simulation should be always treated as an estimate.

The distribution is generated using the Fleishmann method from SimMultiCorrData::nonnormvar1() function. The SimMultiCorrData package needs to be installed.

Usage

SimFrequencyTable(min, max, M, SD, skew = 0, kurt = 3, n = 10000, seed = NULL)

Arguments

min

minimum value of raw score

max

maximum value of raw score

M

mean of the raw scores distribution

SD

standard deviation of the raw scores distribution

skew

skewness of the raw scores distribution. Defaults to 0 for normal distribution

kurt

kurtosis of the raw scores distribution. Defaults to 3 for normal distribution

n

number of observations to simulate. Defaults to 10000, but greater values could be used to generate better estimates. Final number of observations in the generated Frequency Table may be less - all values lower than min and higher than max are filtered out.

seed

the seed value for random number generation

Value

FrequencyTable object created with simulated data. Consists of:

  • table: data.frame with number of observations (n), frequency in sample (freq), quantile (quan) and normalized Z-score (Z) for each point in raw score

  • status: list containing the total number of simulated observations (n) and information about raw scores range completion (range): complete or incomplete