generate_data: Data generation function for simulation and demonstration A...

View source: R/gplsim.r

generate_dataR 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


zzz1990771/gplsim documentation built on July 12, 2022, 4:34 p.m.