maregress
Model II regression should be used when the two variables in the regression equation are random and subject to error, i.e. not controlled by the researcher. Model I regression using ordinary least squares underestimates the slope of the linear relationship between the variables when they both contain error. According to Sokal and Rohlf (1995), the subject of Model II regression is one on which research and controversy are continuing and definitive recommendations are difficult to make. In Sokal and Rohlf (1981, 2nd ed.), the numerical result for major axis regression for the example data set is wrong. The mistake has been corrected in the 1995 edition.
MAREGRESS is a Model II procedure. When both variables are in the same units of measurement the slope of the major axis (principal axis) of the bivariate sample has been sugested. This method requires a knowledge of correlation techniques. A bivariate normal distribution can be represented by means of concentric ellipses describing the topography of a bell-shaped mound, and an ellipse can be described by two principal axis (major and minor) at rigth angles toeach other. Therefore the main task is to find the slope and equation of the major axis from a sample.
[B,BINT,L,ANG] = MAREGRESS(X,Y,ALPHA) returns the vector B of regression coefficients in the linear Model II, a matrix BINT of the given confidence intervals for B, the L eigenvalues of the axes, and the angle in degrees of the confidence bounds.
MAREGRESS treats NaNs in X or Y as missing values, and removes them.
Syntax: [b,bint,l,ang] = maregress(x,y,alpha)
Cite As
Antonio Trujillo-Ortiz (2024). maregress (https://www.mathworks.com/matlabcentral/fileexchange/27916-maregress), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.