[R] standard errors of regression coefficients

Jeffrey Robert Spies jspies at nd.edu
Wed Oct 3 09:08:19 CEST 2007


stderr_int <- summary(lm(y ~ x))$coefficients[1,2]
stderr_slope <- summary(lm(y ~ x))$coefficients[2,2]

Jeff.

On Oct 3, 2007, at 3:01 AM, Alexander Moreno wrote:

> Hi,
>
> If I have two vectors x and y and I do lm(y~x) and now I want to  
> define
> variables that are the standard errors of the slope and intercept,  
> how do I
> do that?
>
> Thanks,
> Alex
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting- 
> guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list