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

Description Usage Arguments Value

View source: R/gplsim.r

Description

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

Usage

1
2
3
4
5
6
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 Nov. 25, 2021, 9:21 a.m.