datagenerator.inloop: This function is used to generate B data batches each time to...

datagenerator.inloopR Documentation

This function is used to generate B data batches each time to illustrate the usage of RenewGLM function

Description

This function is used to generate B data batches each time to illustrate the usage of RenewGLM.inloop function

Usage

datagenerator_in(beta, n, p, B, family, construct, rho, tempdatadir,
  categorical = FALSE, seed = NA)

Arguments

beta

designed coefficients for simulated data batches, including the intercept

n

sample size of the bth data batch

p

number of coefficients to estimate including intercept

B

the terminal time to get the result

family

exponential family of the responses, choices include c("gaussian","binomial","poisson")

construct

structure of covariance matrix for generating the covariate matrix X

rho

the correlation coefficient in the covariance matrix, choices inlcude c("ind", "cs", "ar1")

tempdatadir

the directory for saving a total of B data batches

categorical

set to TRUE to let some X be dichotomized, the default is FALSE

seed

set random seed and the default is NA

Value

a data matrix containing response vector y and covariate matrix X


luolsph/RenewGLM_pkg documentation built on April 17, 2023, 12:36 a.m.