[R] Running glm in batch and exporting results (AIC) to HTML
je_lemaitre at hotmail.com
Tue Sep 20 14:29:30 CEST 2005
I'm doing univariate Poisson regressions using the "glm" and "glm.fit"
functions. I have 5 independent datasets and each dataset, has one response
variable and more than 20 factors to test.
Currently, I run one regression at a time and manually take notes of the
results in excel to have a quick overview on what is going on in my data. My
poor method is very time-consuming and I was looking for a faster and more
reliable way to do all the regressions.
I'm quite sure that R could do all of this for me but I can't think of a way
to tell it...
What I want R to do is
1) running one regression at a time in a particular dataset.
2) saving results. Here, I'm interested in AIC, Beta coefficient of the
factor, the z value and the p value of the factor
3) formatting results in a table with column names as follow:
factor; beta coefficient; z value; p value; aic
4) exporting the table in a way that I could read it in excel. In that way,
I would repeat the operation for each of the 5 datasets rather than for the
I hope you could help me with this.
Thanks a lot for your answers.
More information about the R-help