This function takes as argument an existing dataset, which must be either a matrix or a data frame. Each column of the dataset must consist either of numeric variables or ordered factors. When one or more ordered factors are included, then a heterogeneous correlation matrix is computed using John Fox's polycor package. Pairwise complete observations are used for all covariances, and the exact pattern of missing data present in the input is placed in the output, provided a new sample size is not requested. Warnings from the polycor::hetcor function are suppressed.
umx_make_fake_data(
dataset,
digits = 2,
n = NA,
use.names = TRUE,
use.levels = TRUE,
use.miss = TRUE,
mvt.method = "eigen",
het.ML = FALSE,
het.suppress = TRUE
)
The original dataset of which to make a simulacrum
= Round the data to the requested digits (default = 2)
Number of rows to generate (NA = all rows in dataset)
Whether to name the variables (default = TRUE)
= Whether to use existing levels (default = TRUE)
Whether to have data missing as in original (defaults to TRUE)
= Passed to hetcor (default = "eigen")
= Passed to hetcor (default = FALSE)
Passed to hetcor (default = TRUE)
- new dataframe
[OpenMx::mxGenerateData()]
Other Data Functions:
umxFactor()
,
umxHetCor()
,
umx_as_numeric()
,
umx_cont_2_quantiles()
,
umx_lower2full()
,
umx_make_MR_data()
,
umx_make_TwinData()
,
umx_make_raw_from_cov()
,
umx_polychoric()
,
umx_polypairwise()
,
umx_polytriowise()
,
umx_read_lower()
,
umx_read_prolific_demog()
,
umx_rename()
,
umx_reorder()
,
umx_score_scale()
,
umx_select_valid()
,
umx_stack()
,
umx
# NOT RUN {
fakeCars = umx_make_fake_data(mtcars)
# }
Run the code above in your browser using DataLab