generate.data {siqr}R Documentation

Data generation function for simulation and demonstration There are three settings.

Description

Data generation function for simulation and demonstration There are three settings.

Usage

generate.data(
  n,
  true.theta = NULL,
  sigma = 0.1,
  setting = "setting1",
  ncopy = 1
)

Arguments

n

sample size

true.theta

true single-index coefficients, default is c(1,1,1)/sqrt(3) for setting 1 and c(1,2)/sqrt(5) for other settings

sigma

the standard deviation of error term

setting

chose from three settings

ncopy

generates multiple copies of data for Monte Carlo simulations

Value

X predictors

Y response variables

single.index.values single index term


[Package siqr version 0.8.1 Index]