Learn R Programming

umx (version 1.4.0)

umx_make_fake_data: umx_make_fake_data

Description

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.

Usage

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)

Arguments

dataset
The original dataset you want to make a simulacrum of
digits
= 2
n
= NA
use.names
= T
use.levels
= T
use.miss
= T
mvt.method
= "eigen"
het.ML
= F
het.suppress
= T

Value

- new dataframe

Details

Author: Ryne Estabrook Created: 17 Aug 2010

See Also

Other Data Functions: umxCovData, umxFactor, umxHetCor, umxPadAndPruneForDefVars, umx_as_numeric, umx_cont_2_quantiles, umx_cov2raw, umx_lower2full, umx_make_MR_data, umx_make_bin_cont_pair_data, umx_merge_CIs, umx_read_lower, umx_reorder, umx_residualize, umx_round, umx_scale_wide_twin_data, umx_scale, umx_swap_a_block, umx

Examples

Run this code
fakeCars = umx_make_fake_data(mtcars)

Run the code above in your browser using DataLab