generate_data_MASSIVE_model: Function to generate data from a MASSIVE generating model.

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Function to generate data from a MASSIVE generating model.

Usage

1
generate_data_MASSIVE_model(N, n, p, par, seed = NULL, log_scale = FALSE)

Arguments

N

Integer number of observations.

n

Integer number of alleles (trials) for the binomial genetic variables.

p

Numeric expected allele frequencies for the genetic variables.

par

List of MASSIVE model parameters

seed

Integer representing seed for random number generation.

log_scale

Logical flag indicating whether scale parameters sigma_X and sigma_Y are given on the log-scale or normal scale.

Value

List containing generate data vector as well as the scatter matrix of first-order and second-order statistics.

Examples

1
2
3
J <- 5 # number of instruments
par <- random_Gaussian_parameters(J)
generate_data_MASSIVE_model(N = 1000, n = 2, p = rep(0.3, J), par)

igbucur/MASSIVE documentation built on Oct. 26, 2020, 1:26 a.m.