simulate_data: Simulate data

View source: R/prepareData.R

simulate_dataR Documentation

Simulate data

Description

Simulate data

Usage

simulate_data(
  N,
  D,
  P,
  sim_index,
  seed = 9 * sim_index,
  ratio = c(8, 2),
  g_seed = 333,
  beta = c(rep(-1/4, floor(P/2)), rep(1/4, P - floor(P/2))),
  nonlinear = F
)

Arguments

N

Number of observations

D

Dimension of latent Z

P

Number of features

sim_index

Integer index for sim. Can use to set seed

seed

Seed. Either set custom or set some value x sim_index. Default: 9 x sim_index

ratio

Train-valid-test ratio for splitting of observations

g_seed

Seed for train-valid-test dataset splitting of observations

beta

coefficients for each column of X in simulating a binary class response variable

Value

list of objects: data (N x P matrix), classes (subgroups of observations), params (those used for simulating data), and g (partitioning of data into train-valid-test sets)

Author(s)

David K. Lim, deelim@live.unc.edu

References

https://github.com/DavidKLim/NIMIWAE

Examples

simulate_data(N = 10000, D = 2, P = 8, sim_index = 1)


DavidKLim/NIMIWAE documentation built on Jan. 19, 2024, 11:18 p.m.