On Mon, 8 Mar 2004, Fulvio Copex wrote: > Hello, > I have a simple question for you: > making: > mylm<-lm(y~x) > summary(mylm) > I get the following results: > ****************************************************** > Coefficients: > Estimate Std. Error t value Pr(>|t|) > (Intercept) 16.54087 0.19952 82.91 <2e-16 *** > x[1:19] -2.32337 0.04251 -54.66 <2e-16 *** > ****************************************************** > now I can access easily with > mylm$coefficients[[1]] > mylm$coefficients[[2]]
Use [] not [[]] for a non-list vector, and better coef(mylm)[1] etc > at the Estimate 16.54087 and -2.32337. > how can I access at the Std. Error 0.19952 and 0.04251 ? coef(summary(mylm))[, 2] -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html