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

2012-11-25 Thread Michael Dewey
At 02:05 25/11/2012, Catriona Hendry wrote: Hi, @ Albyn, David.. No, its not homework. Its basic groundwork for testing allometric relationships for a graduate project I am working on. I read the guide before posting, I spent half the day trying to understand how I am going wrong based on the

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

2012-11-25 Thread Catriona Hendry
Hi, Thank you all so much for the help provided here! @Dennis.. from your work-through I can see where I had gotten lost, I greatly appreciate your time. The question that remains is whether or not I actually need to be doing this it seems, so here is the rationale... The variables cannot be

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

2012-11-24 Thread Catriona Hendry
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

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

2012-11-24 Thread Albyn Jones
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

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

2012-11-24 Thread Bert Gunter
1. The model is correct : lm( y~ x + offset(x)) ( AFAICS) 2. Read the posting guide, please: Code? I do not know what you mean by: this resulted in a regression line that was plotted perpendicular to the data when added with the abline function. Of course, maybe someone else will groc this.

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

2012-11-24 Thread David Winsemius
On Nov 24, 2012, at 4:27 PM, 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

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

2012-11-24 Thread Catriona Hendry
Hi, @ Albyn, David.. No, its not homework. Its basic groundwork for testing allometric relationships for a graduate project I am working on. I read the guide before posting, I spent half the day trying to understand how I am going wrong based on the advice given to others. @Bert, David... I

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

2012-11-24 Thread David Winsemius
On Nov 24, 2012, at 6:05 PM, Catriona Hendry wrote: Hi, @ Albyn, David.. No, its not homework. Its basic groundwork for testing allometric relationships for a graduate project I am working on. I read the guide before posting, I spent half the day trying to understand how I am going

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

2012-11-24 Thread Albyn Jones
Dear Cat My apologies for presuming... Here's a primitive solution: compute a t-statistic or CI. t = (beta-hat - 1)/SE(beta-hat), compare to qt(.975, res.df) Or Better, compute the 95% confidence interval beta-hat + c(-1,1)*qt(.975, res.df)*SE(beta-hat) albyn On 2012-11-24 18:05,

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

2012-11-24 Thread Catriona Hendry
Hi Albyn, Not a problem :) I had calculated the CI using confint(Regression_PhyloContrasts, level=0.95) Is that adequate? I had been using this as my indicator of significance, but ultimately I need a P-value for the deviation from a slope of 1. Which is where I ran into trouble trying to use

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

2012-11-24 Thread David Winsemius
BTW that plot is ridiculous. You should be plotting using the coefficients from the non-offset model, since that is the real data model. On Nov 24, 2012, at 6:05 PM, Catriona Hendry wrote: Hi, @ Albyn, David.. No, its not homework. Its basic groundwork for testing allometric

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

2012-11-24 Thread Bert Gunter
Catriona: You have already been roundly (and appropriately) chastised for your sins. So I need not join the chorus. Instead, let me just briefly focus on the substance of what you are trying to do, because I continue to believe it's wrong. Here's the leading question: Could you just as