generate_data {gplsim}R Documentation

Data generation function for simulation and demonstration A sine-bump setting has been employed.

Description

Data generation function for simulation and demonstration A sine-bump setting has been employed.

Usage

generate_data(
  n,
  true.theta = c(1, 1, 1)/sqrt(3),
  family = "gaussian",
  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

family

chose from "gaussian", "binomial" or "poisson".

ncopy

generates multiple copies of data for Monte Carlo simulations

Value

X single index predictors

Y response variables, a list

Z partial linear predictor(s)

single_index_values single index term


[Package gplsim version 1.0.0 Index]