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)
x1,y1 - data of first regression
x2,y2 - data of second regression
- Summary of MYREGR function
- Global test
- Test on slopes (eventually)
- Test on intercepts (eventually)
Created by Giuseppe Cardillo
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
Giuseppe Cardillo (2020). MyRegrComp (https://github.com/dnafinder/myregrcomp), GitHub. Retrieved .
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?
'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?)
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!