sim_MOTTE_data: Simulate MOTTE formated data

Description Usage Arguments Value Examples

View source: R/sim_MOTTE_data.R

Description

Simulate MOTTE formated data

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
sim_MOTTE_data(
  n.train = 500,
  n.test = 200,
  p = 10,
  q = 3,
  ratio = 0.5,
  cov.mat = diag(p),
  trt.f = c("Linear", "Polynomial", "Box"),
  link.f = c("Linear", "Polynomial"),
  B,
  Z
)

Arguments

n.train

An integer value, sample size for training data

n.test

An integer value, sample size for testing data

p

An integer value, the dimensionality of covaraites (X)

q

An integer value, the dimensionality of responses (Y)

ratio

An fraction value, the ratio between treatment groups

cov.mat

Covariance matrix for X.b

trt.f

character, the name of treatment effect funciton

link.f

character, the name of treatment effect funciton

B

matrix, the coefficient matrix used in the trt.f

Z

matrix, the coefficient matrix used in the link.f

Value

A nested list that contain training data and testing data. TODO: add more introdcution to whats in the list

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
set.seed(1)

n.train = 200
n.test = 100
p = 10
q = 3
ratio = 0.5
cov.mat = diag(p)
trt.f = "Polynomial"
link.f = "Polynomial"
B = create.B(p)
Z = create.Z(p,q)

# B <- create.B(10)
# Z <- create.Z(10, 3)

sim.dat <- sim_MOTTE_data( n.train = 500, n.test = 200,
p = 10, q = 3, ratio = 0.5,
B = B, Z = Z)

boyiguo1/MOTTE.RF documentation built on June 14, 2020, 4:12 p.m.