HomUHet.sim: simulate multiple data sets with both homogeneous and...

Description Usage Arguments Value

View source: R/HomUHet.R

Description

this function simulate data

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
HomUHet.sim(
  age = TRUE,
  sex = TRUE,
  n_homo,
  n_heter,
  K,
  n_cont,
  n_SNP,
  rho = 0.5,
  sigma = 2,
  nlower = 50,
  nupper = 300,
  beta = NULL
)

Arguments

age

TRUE if covariate age should be included. simulated from N (40, 5)

sex

TRUE if covariate sex should be included. simulated from Bernoulli (p), where p is a random number between 0 and 1.

n_homo

number of homogeneous coefficients.

n_heter

number of heterogeneous coefficients.

n_cont

the number of continuous predictors. 0 if there will be no continuous predictors

n_SNP

the number of SNP predictors. 0 if there will be no SNP predictors

rho

a number between 0 and 1. controlling the degree of correlation between predictors

sigma

a positive number. controlling the added noise to the simulated response variable

nlower

the lower bound of the K sample sizes

nupper

the upper bound of the K sample sizes

beta

if the users wish to supply the coefficients on their own, enter a coefficient matrix where the columns containing the K coefficients of each predictor, for all genetic and non-genetic predictors.

Value

the simulated data

data

the simulated data

beta

the simulated beta matrix

homo_index

the column numbers of homogeneous coefficients

heter_index

the column numbers of heterogeneous coefficients


Pei-Yang/HomUHet documentation built on Dec. 18, 2021, 6:46 a.m.