This enhanced version of regstats has implemented several methods to estimate robust standard errors for coefficients:
- HC0: White robust t statistics (Eicker,1963,1967; Huber,1967; White,1980)
- HC1: With dfe correction (Hinkley,1977)
- HC2: White weighted by 1-h (MacKinnon & White,1985)
- HC3: White weighted by (1-h)^2 (Davidson & MacKinnon,1993)
- HC4: White weighted by (1-h)^delta (Cribari & Neto,2004)
- HAC: Newey West t statistics (Newey & West,1987)
Other fields (available from p5v2; visible from p5v5):
- 'empty': if the regression is performed on all NaN series the regstats2 skips the computations and sets to true this field.
- 'rankdef': if after the autoremoval of the NaNs, the design matrix is rank defiecient, regstats2 skips the computations and sets his field to true.
Those fields are meant to easily individuate those series that would otherwise interrupt the looping of the regression.
This fcn allows to supply a matrix of responses, where each columns is considered as a distinct series, instead of just a vector. The engine will loop through each column returning a set of results for each regression.
From p5v6 the MODEL argument can also be 'onlydata'. Under this option the DATA is left as it is (no constant or interaction terms are addded).
From p5v7 QLIKE loss function as in Patton (2011b).
- The GUI is oversized due to the additions. Use the Help to choose the statistics and supply a cellarray with the names of the statistics.
For major details see the help of the fcn
The published M-file contains a direct comparison with the original regstats fcn.
Comments/suggestions/error reports are welcome.
Oleg Komarov (2023). regstats2 (https://www.mathworks.com/matlabcentral/fileexchange/26169-regstats2), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!
Added QLIKE loss functions as in Patton (2011b)
Per Nick Baltas suggestion: added 'onlydata' model which leaves data as it is. Added warning in case R^2 or F stat is requested under this model.
Per Sebastian Eisenbach suggestion: empty and rankdef fields are now 'visible'.
Per Dajun Tuo suggestion: fixed assignment error between dissimilar structures
Added hidden fields 'empty' and 'rankdef'. If the responses are an n by m matrix and all NaN series (or after NaN removal rank deficient design matrix) are present, regstats skips those series setting to true those fields.
Added link to FEX page inside the help
Eliminated useless folder in the .zip file