[R] Comparing linear regression coefficients to a slope of 1

Albyn Jones jones at reed.edu
Sun Nov 25 02:15:07 CET 2012


Is this homework?  
 
    PLEASE do read the posting guide 
       http://www.R-project.org/posting-guide.html

albyn

On Sat, Nov 24, 2012 at 07:27:25PM -0500, Catriona Hendry wrote:
> Hi!
> 
> I have a question that is probably very basic, but I cannot figure out how
> to do it. I simply need to compare the significance of a regression slope
> against a slope of 1, instead of the default of zero.
> 
> I know this topic has been posted before, and I have tried to use the
> advice given to others to fix my problem. I tried the offset command based
> on one of these advice threads as follows:
> 
> Regression <- lm(y~x+offset(1*x))
> 
> but this resulted in a regression line that was plotted perpendicular to
> the data when added with the abline function.
> 
> I would be extremely grateful for your help!!
> 
> Thanks!!
> 
> Cat
> 
> 	[[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.
> 

-- 
Albyn Jones
Reed College
jones at reed.edu




More information about the R-help mailing list