RenewGLM.inloop: Renewable GLM function processing data batches internally

RenewGLM.inloopR Documentation

Renewable GLM function processing data batches internally

Description

Looping over data batches inside the function and output the final regression coefficients and their standard errors

Usage

RenewGLM_in(B, tempdatadir, type, init = NA, p, intercept = TRUE)

Arguments

B

index for the terminal data batch

tempdatadir

the directory of the streaming datasets, each data batch includes a covariate matrix X and a response vector y

type

the GLM family you want to fit your data to c("gaussian","binomial","poisson")

init

the initial value for regression coefficients (default is a vector of 0)

p

number of coefficients to be estimated, including intercept

intercept

if intercept is included in the model, default is TRUE

Value

coefficient estimates, standard errors and p-values at data batch B

Examples

N=1000
B=10
p=5
n=N/B
beta<-c(0.2,-0.2,0.2,-0.2,0.2)

tempdatadir<-"~/Desktop/tempdata"
datagenerator_in(beta=beta, n=n, p=p, B=B, family="binomial", construct="cs",
    rho=0.5, tempdatadir=tempdatadir)
RenewGLM_in(B, tempdatadir=tempdatadir, "binomial", p=p, intercept=TRUE)
unlink(tempdatadir)

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