generateblankdata: Generating a blank data frame

Description Usage Arguments Value

View source: R/simulateData.R

Description

This function generates a blank data.frame with uniformly distributed variables specified in varnames. The variables are drawn i.i.d. uniform distribution if correlation = NULL. Otherwise, the data are drawn according to the algorithm:
https://www.r-bloggers.com/easily-generate-correlated-variables-from-any-distribution-without-copulas/
The idea is: covariates specified in variablenames are inversely generated with a surrogate Multivariate normal distribution to establish correlation between mvnormal draws. The draws' cumulative normal probabilities are evaluated in the quantile function of the uniform distribution to arrive at correlated covariates on the interval [0,1]. However, they are not uniformly distributed, as the Blogpost propagates.

Usage

1
generateblankdata(varnames, n, correlation = NULL)

Arguments

varnames

character vector. Specifies variables to be created.

n

integer. Number of observations to be generated.

correlation

Symmetric correlation matix.

Value

data.frame


TiStat/Imputegamlss documentation built on May 20, 2019, 9:25 a.m.