# Significance of the slope of a straight line fit

I know the significance of the slope of a LMS linear regression can be calculated using the r2 coefficient of determination and looking up the appropriate value in an F table. However, I was thinking of perhaps making this "more robust" by replacing the LMS linear regression with a repeated median straight line fit, and perhaps even replacing the average value used to calculate r2 with the median value of the data. Is there any reason why this would NOT be a valid approach? Maybe the values in an F table are predicated on using LMS and averages, for example?

No, F tests are based on the assumption that lowest sum of residual squares is optimal. It does not hold in case of robust regression, where the criterion is different.
For instance, effectively one may consider robust regression as least squares on data stripped from outliers; using $r^2$ on all data in this case adds non-culpable penalty for high residuals of outliers.

No need to reinvent the wheel. There is an alternative, robust, R^2 measure with very good statistical properties:

A robust coefficient of determination for regression, O Renauda

Edit: *Is there any reason why this would NOT be a valid approach? * For one this does not make your method any more robust. There is a large literature on this issue, and fortunatly, good tools have been designed to adress these points.

I would simply use the standard regression output to evaluate the significance of the slope coefficient. I mean by that looking at the coefficient itself, its standard error, t stat (# of standard errors = Coefficient/Standard error), p value, and confidence interval. The p value directly addresses the statistical significance of the slope or coefficient you have in mind.

R Square of the model tells how well the model explains the dependent variable, or how well the model fits the dependent variable.

The p value of each coefficient tells you how statistically significant those coefficients are.

Very often you can have a model with a high R Square, but that includes one variable with a coefficient that is not statistically significant (its p value is too high). In such a case, it suggests your model would be nearly as good if you took that variable out. By the way, you should really focus on the Adjusted R Square instead of R Square. The Adjusted R Square correctly penalizes the model for having more variable and potentially over-fitting the data with independent variables that are not so relevant.

It should be possible to use a permutation test to test the significance of the slope.

Under the null, the slope is zero.

Under the assumptions of the model and the null together, there's therefore no association between y and x.

Hence the y's can be shuffled relative to the x to obtain the permutation distribution of the test statistic.

The p-value can be determined by funding the proportion of values at least as extreme as the observed statistic in the null distribution.