Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

fleishman_sim

Simulating Univariate Data from Fleishman Power Normal Transformations


Description

Simulates univariate non-normal data by using Fleishman power transformations (Fleishman, 1978; Demirtas & Hedeker, 2007).

Usage

fleishman_sim(N=1, coef=NULL, mean=0, sd=1, skew=0, kurt=0)

fleishman_coef(mean=0, sd=1, skew=0, kurt=0)

Arguments

N

Number of simulated values

coef

Optional list containing coefficients of Fleishman polynomial estimated by fleishman_coef.

mean

Mean

sd

Standard deviation

skew

Skewness

kurt

(Excess) kurtosis

Details

For Z \sim N(0,1), the Fleishman power normal variable X is defined as X=a + bZ + cZ^2 + d Z^3.

Value

Vector of simulated values (fleishman_sim) or list of coefficients (fleishman_coef).

References

Demirtas, H., & Hedeker, D. (2008). Imputing continuous data under some non-Gaussian distributions. Statistica Neerlandica, 62(2), 193-205. doi: 10.1111/j.1467-9574.2007.00377.x

Fleishman, A. I. (1978). A method for simulating non-normal distributions. Psychometrika, 43(4), 521-532. doi: 10.1007/BF02293811

See Also

See also the BinOrdNonNor::Fleishman.coef.NN function in the BinOrdNonNor package.

See the nnig_sim function for simulating a non-normally distributed multivariate variables.

Examples

#############################################################################
# EXAMPLE 1: Simulating values with Fleishman polynomial
#############################################################################

#* define mean, standard deviation, skewness and kurtosis
mean <- .75
sd <- 2
skew <- 1
kurt <- 3

#* compute coefficients of Fleishman polynomial
coeff <- miceadds::fleishman_coef(mean=mean, sd=sd, skew=skew, kurt=kurt)
print(coeff)

# sample size
N <- 1000
set.seed(2018)
#* simulate values based on estimated coefficients
X <- miceadds::fleishman_sim(N=N, coef=coeff)
#* simulate values based on input of moments
X <- miceadds::fleishman_sim(N=N, mean=mean, sd=sd, skew=skew, kurt=kurt)

miceadds

Some Additional Multiple Imputation Functions, Especially for 'mice'

v3.11-6
GPL (>= 2)
Authors
Alexander Robitzsch [aut,cre] (<https://orcid.org/0000-0002-8226-3132>), Simon Grund [aut] (<https://orcid.org/0000-0002-1290-8986>), Thorsten Henke [ctb]
Initial release
2021-01-21 11:48:47

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.