[R] Customized R Regression Output?

Özgür Asar oasar at metu.edu.tr
Sun May 27 15:15:13 CEST 2012


Dear Christian,

An illustrative and simple example follows:

> y<-rnorm(100,0,1) #response variable
> x1<-rnorm(100,0,1) #1st covariate
> x2<-rnorm(100,0,1) #2nd covariate
> 
> lm1<-lm(y~x1+x2) #fitting a linear model
> cbind(summary(lm1)$coef[,1],summary(lm1)$coef[,1]) # obtaining the
> estimates and related p-values
                   [,1]        [,2]
(Intercept) -0.02997559 -0.02997559
x1          -0.06170968 -0.06170968
x2          -0.12740465 -0.12740465

Here, the 1st column corresponds tı the estimates and 2nd one correspnds to
the related p-values.

I think you can easily adapt this to your datasets and combine muliple
results of multiple datasets.

Best
Ozgur

-----
************************************
Ozgur ASAR

Research Assistant
Middle East Technical University
Department of Statistics
06531, Ankara Turkey
Ph: 90-312-2105309
http://www.stat.metu.edu.tr/people/assistants/ozgur/
--
View this message in context: http://r.789695.n4.nabble.com/Customized-R-Regression-Output-tp4631497p4631499.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list