I have two columns of data: Observed (Obs) and Predicted (Pred), each column having 23 data. I have plotted Observed on y-axis and Predicted on x-axis (as pointed by Pineiro et al., 2008). On deriving a best fit linear model for the data, I have obtained: $$Obs = 0.21 + 1.09 * Pred $$ It is well known that in the ideal case, the equation should have been: $$Obs = 0.00 + 1.00 * Pred $$ Pineiro et al. (2008) [Link available on top], on page 4 [Eq. (9)], suggest:

We tested the hypothesis of slope = 1 and intercept = 0 to assess statistically the significance of regression parameters. This test can be performed easily with statistical computer packages with the model:

$$ Pred - Obs = a + b* Pred + \epsilon $$ The significance of the regression parameters of this models corresponds to the tests: b = 1 and a = 0.

Please help on how do I conduct these tests so that I can compare the slope ($b$) with 1 and intercept ($a$) with 0. Also I am not able to get the basic concept behind proposing the model shown above.

  • 2
    $\begingroup$ Unless I completely misunderstand its notation, that paper is so seriously and fundamentally flawed it ought to be ignored by everyone. Consult any multiple regression textbook for better approaches. Model (8) is merely a version of performing the same regression all over again while Model (9) strongly violates OLS assumptions (since the predictor appears as both regressor and response, the errors are strongly intercorrelated). Performing the suggested tests "with statistical computer packages" will produce utterly worthless results. $\endgroup$ – whuber Jul 27 '16 at 18:26

You can attain something similar using offset in R:

a = 1; b = 0

x = rnorm(1000)
y = a*x+b+rnorm(1000)/100

fit = lm(y~1+x+offset(x))

#             Estimate Std. Error t value Pr(>|t|)   
#(Intercept) 0.0004105  0.0003183   1.290  0.19751   
#x           0.0008805  0.0003211   2.742  0.00621 **
#Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Basically we are regressing $y=A\cdot x+x+B+\epsilon=(A+1)\cdot x+B+\epsilon$, so if $H_0:A=0$ is rejected we can safely say the slope is not equal to 1. The test for the intercept remains unchanged.

But surely, it seems worthless: with enough data you will almost always reject the null hypothesis, as you get smaller and smaller standard errors, and any small deviance from zero becomes significant.

Other approach with the same result:

fit = lm(y~1+x)
linearHypothesis(fit, "x = 1")
#  Res.Df     RSS Df  Sum of Sq    F   Pr(>F)   
#1    999 0.10184                               
#2    998 0.10108  1 0.00076165 7.52 0.006211 **
  • 1
    $\begingroup$ If you add the lmtest package, your offset model can be modified to fit the proper null model y~ offset (x) - 1. Then a 2 degree of freedom Wald or likelihood ratio test can be conducted using nested models. $\endgroup$ – AdamO Dec 6 '17 at 16:51
  • $\begingroup$ @AdamO I think the null hypothesis is a bit more involved than here. You'd be jointly testing both coefficients. But I've read the concern voiced by whuber, and the result is the same in my asnwer. Add an answer and let's compare :) $\endgroup$ – Firebug Dec 6 '17 at 17:58
  • $\begingroup$ @AdamO you mean it like this, correct? fit1 = lm(y~0+offset(x)); fit2 = lm(y~x); anova(fit1, fit2) $\endgroup$ – Firebug Dec 6 '17 at 21:43

This depends in part on what software you are using. In R you can use the ellipse package to generate a confidence ellipse on the intercept and slope and see if the point 0, 1 is in the ellipse.

For a general approach (not quite as good as the ellipse approach, but will work in any software that does regression):

Compute a new column that is the difference between observed and predicted. Use this column as the y-variable and your predicted column as the x-variable. Now look at the individual tests of the intercept and slope, if either is significant then you should reject your null of 0,1. You may also want to look at the correlation between the estimated intercept and slope, if that is high (in absolute value) then you may want to rerun with your predictions (x-variable) centered.

  • $\begingroup$ As I am not well-versed in this area; if possible, please give necessary equations to be used, or some suitable link. If it can be done on Excel, it would be very helpful. $\endgroup$ – user3024069 Jul 27 '16 at 18:39
  • 2
    $\begingroup$ @user3024069, Friends don't let friends use Excel for Statistics (oit.utk.edu/research/documentation/Documents/ExcelStatProbs.pdf and burns-stat.com/documents/tutorials/spreadsheet-addiction). I would not even think to attempt the ellipse approach in Excel, it is worth learning R for that part alone. But the general approach mentioned above "should" work in Excel, just create the new column that is the difference between the 2 methods to use as the y/response/dependent variable. $\endgroup$ – Greg Snow Jul 28 '16 at 15:26
  • $\begingroup$ Thanks for the timely advice! Could you suggest where to start for learning R? $\endgroup$ – user3024069 Jul 30 '16 at 12:58
  • $\begingroup$ @user3024069, r-project.org, follow the "CRAN" link for downloading R, Then start reading under the "Documentation" links. $\endgroup$ – Greg Snow Aug 1 '16 at 16:31
  • $\begingroup$ There are some decent intros in Udacity, Coursera, or similar. $\endgroup$ – EngrStudent Jan 5 '18 at 21:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.