RenewGLM.inloop | R Documentation |
Looping over data batches inside the function and output the final regression coefficients and their standard errors
RenewGLM_in(B, tempdatadir, type, init = NA, p, intercept = TRUE)
B |
index for the terminal data batch |
tempdatadir |
the directory of the streaming datasets, each data batch includes a covariate matrix |
type |
the GLM family you want to fit your data to |
init |
the initial value for regression coefficients (default is a vector of |
p |
number of coefficients to be estimated, including intercept |
intercept |
if intercept is included in the model, default is |
coefficient estimates, standard errors and p-values at data batch B
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.