File Exchange

## MyRegrComp

version 2.0.0.0 (15.3 KB) by
A simple routine to compare two LS regressions

Updated 05 Apr 2018

View Version History

Compare two linear regressions.
This function compares two least-square linear regression. Test are implemented as reported by Stanton A. Glantz book This routine uses MYREGR function. If it is not present on the computer, myregrcomp will try to download it from FEX. Syntax: x=myregrcomp(x1,y1,x2,y2)
Inputs:
x1,y1 - data of first regression
x2,y2 - data of second regression
Outputs:
- Summary of MYREGR function
- Global test
- Test on slopes (eventually)
- Test on intercepts (eventually)

Created by Giuseppe Cardillo
giuseppe.cardillo-edta@poste.it

To cite this file, this would be an appropriate format: Cardillo G. (2007) MyRegressionCOMP: a simple routine to compare two LS regressions. http://www.mathworks.com/matlabcentral/fileexchange/15953

### Cite As

Giuseppe Cardillo (2020). MyRegrComp (https://github.com/dnafinder/myregrcomp), GitHub. Retrieved .

Giuseppe Cardillo

To compare two regressions (as reported in Stanton A. Glantz book) firstly you must perform the regressions. This is the reasons of code repeating. But, if you look well the code calls three times the same function (MYREGR): once for the first regression, once for the second regression and once for the overall regression. So, the code is really repeated?
I think that FPRINTFs are necessary because I want to look the results in a clearly way. Antonio Trujillo Ortiz (I think he is one of the best of us) uses the same code but I don't see any comment about this.
Finally, I'm interested in collaboration. How do you change the code?

Dimitri Shvorob

'Fiducial level' is 'significance level'. The programming is bad: chunks of code are repeated, and FPRINTFs take up most of space anyway. Calculations are very simple - but can the author explain what test exactly he is implementing? (A reference perhaps?)

##### MATLAB Release Compatibility
Created with R2014b
Compatible with any release
##### Platform Compatibility
Windows macOS Linux