File Exchange

image thumbnail

MyRegrComp

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

0 Downloads

Updated 05 Apr 2018

GitHub view license on GitHub

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

Comments and Ratings (2)

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?)

Updates

2.0.0.0

input parser; table implementation; github link

1.3.0.0

This routine uses MYREGR function. If it is not present on the computer, MyregrINV will try to download it from FEX.

1.2.0.0

Changes in description

1.1.0.0

Changes in help section

1.0.0.0

minor editing

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