# testing correlated data from 1:1 line

I have correlated data points and they are fitted with a trend line. I wanted to know how far these points lie away from an arbitrary 1:1 line (45 degree line with data of equal magnitude). Is there any test to find how significant it is away from this 1:1 line? Thank you

Concordance correlation is a measure of agreement between variables. See http://en.wikipedia.org/wiki/Concordance_correlation_coefficient for discussion and references. It was named by Lin but was earlier suggested by Krippendorff.

Unlike regression, concordance correlation treats variables symmetrically. That may or may not be closer to what you want.

• thank you soo much for the answers. I am trying to wrap my head around this at the moment. May 17, 2013 at 0:33

Warning: use this solution only if you can safely assume that you have no errors in $x$. For a solution when both variables contain errors, look @Nick Cox' answer or at the bottom of mine.

The 1:1 line is a line with slope 1. You could use a Wald test to test whether your slope differs significantly from a line with slope 1. The Wald-statistic is:

$$W=\frac{(\hat{\beta}-\beta_{0})}{se(\hat{\beta})}\approx N(0,1) \\$$

Where $\beta_{0}=1$ in your case, because you want to test whether the slope is different from 1.

Let's calculate an example in R:

mod <- lm(Fertility~Catholic, data=swiss)
summary(mod)

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 64.42826    2.30510  27.950  < 2e-16 ***
Catholic     0.13889    0.03956   3.511  0.00103 **


If you wanted to test whether the coefficient for "Catholic" differs from a slope 1, you can do the Wald test in the following way:

test.slope <- 1

wald.statistic <- (0.13889 - test.slope)/0.03956
wald.statistic
[1] -21.76719


Now we can use the normal distribution to calculate the $p$-value:

2*pnorm(-abs(wald.statistic))
[1] 4.748743e-105


It's practically zero. So we have strong evidence that the slope is different from 1.

Alternatively, just calculate a confidence interval for the coefficient. If the confidence interval doesn't include 1 then your slope is significantly different from 1.

confint(mod)
2.5 %     97.5 %
(Intercept) 59.78556103 69.0709631
Catholic     0.05920667  0.2185648


The 95%-confidence interval for the slope of "Catholic" does not include 1. We reach the same conclusion as with the Wald-test.

As @whuber points out below, the above solution is only valid if you assume that your $x$-variable is known without error (error in $y>>x$). If you have errors in both $x$ and $y$ variable, you could use (standardized) major axis regression. This fits a line that minimizes the perpendicular residuals. If your data are bivariate normal and in the same physical units or if they are dimensionless, use major axis regression. With R you can fit a major axis regression with the smatr package:

library(smatr)
data(leaflife)

mar <- ma(longev ~ lma, log="xy", data=leaflife) # here, the variables are both log-transformed before fitting.

summary(mar)

These variables were log-transformed before fitting: xy

Confidence intervals (CI) are at 95%

------------------------------------------------------------
Coefficients:
elevation    slope
estimate    -3.085214 1.492616
lower limit -3.968020 1.146777
upper limit -2.202407 2.001084

H0 : variables uncorrelated
R-squared : 0.4544809
P-value : 4.0171e-10


The output shows the slope and its confidence interval.

• It is important to point out that this solution implicitly assumes the independent variable is not random; only the dependent variable is.
– whuber
May 16, 2013 at 20:10
• Thank you all for responding so quickly. Rather than testing the significance of the slope I wanted to test how far they are away from 1:1 line and is this significantly different from a scenario in which they might be equal (ie they are in 1:1 line) May 17, 2013 at 0:32
• I think I should do major axis regression because the values are dimensionless, x and y are error prone also. May 17, 2013 at 0:36
• The correlated data points are lying above the arbitrary 1:1 line. I would like to know if this is significantly higher than 1:1 line. May 17, 2013 at 1:00
• @kmonynam, then run a major axis regression and look if the confidence interval of the slope includes one. If it doesn't, your line is different from the 1:1 line. May 17, 2013 at 6:32