当前位置:网站首页>Matlab tips (22) matrix analysis -- stepwise regression
Matlab tips (22) matrix analysis -- stepwise regression
2022-06-30 12:51:00 【mozun2020】
MATLAB Tips (22) matrix analysis -- Stepwise regression
Preface
MATLAB Learning about image processing is very friendly , You can start from scratch , There are many encapsulated functions that can be called directly for basic image processing , This series of articles is mainly to introduce some of you in MATLAB Some concept functions are commonly used in routine demonstration !
In statistics , regression analysis (regression analysis) It refers to a statistical analysis method to determine the quantitative relationship between two or more variables . Regression analysis according to the number of variables involved , It is divided into univariate regression and multiple regression analysis ; According to the number of dependent variables , It can be divided into simple regression analysis and multiple regression analysis ; According to the type of relationship between independent variables and dependent variables , It can be divided into linear regression analysis and nonlinear regression analysis .
In big data analysis , Regression analysis is a predictive modeling technique , It studies the dependent variable ( The goal is ) And independent variables ( predictor ) The relationship between . This technique is usually used for predictive analysis , Time series model and find the causal relationship between variables . for example , The relationship between reckless driving of drivers and the number of road traffic accidents , The best research method is regression .
The main methods of regression analysis :
Linear Regression Linear regression
It is one of the most well-known modeling techniques . Linear regression is usually one of the preferred techniques for learning prediction models . In this technology , The dependent variable is continuous , Independent variables can be continuous or discrete , The property of regression line is linear .Logistic Regression Logical regression
Logistic regression is used to calculate “ event =Success” and “ event =Failure” Probability . When the type of dependent variable is binary (1 / 0, really / false , yes / no ) variable , Logistic regression should be used . here ,Y The value of is 0 or 1.Polynomial Regression Polynomial regression
For a regression equation , If the exponent of the independent variable is greater than 1, So it's a polynomial regression equation .Stepwise Regression Stepwise regression
When dealing with multiple arguments , This form of regression can be used . In this technology , The selection of independent variables is completed in an automatic process , This includes non-human operations .Ridge Regression Ridge return
When there is multicollinearity between data ( The independent variables are highly correlated ) when , We need to use ridge regression analysis . When there is multicollinearity , Although the least square method (OLS) There is no deviation in the measured estimate , Their variances will also be large , Thus, the observed value is far from the true value . Ridge regression adds a bias value to the regression estimate , To reduce the standard error .Lasso Regression Lasso return
It's similar to ridge regression ,Lasso (Least Absolute Shrinkage and Selection Operator) The penalty term will also be given for the regression coefficient vector . Besides , It can reduce the degree of change and improve the accuracy of linear regression modelElasticNet Return to
ElasticNet yes Lasso and Ridge A hybrid of regression techniques . It USES L1 To train and L2 Priority as regularization matrix . When there are multiple related features ,ElasticNet It's very useful .Lasso Will pick one of them at random , and ElasticNet Then two... Will be selected .
Lasso and Ridge The practical advantage between is , It allows the ElasticNet In the state of inheritance loop Ridge Some stability of .
Of the simulation example MATLAB Version is MATLAB2015b.
One . MATLAB Simulation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% function : matrix analysis -- regression analysis
% Environmental Science :Win7,Matlab2015b
%Modi: C.S
% Time :2022-06-27
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% I. Clear environment variables
clear all
clc
tic
X=[7,26,6,60;
1,29,15,52;
11,56,8,20;
11,31,8,47;
7,52,6,33;
11,55,9,22;
3,71,17,6;
1,31,22,44;
2,54,18,22;
21,47,4,26;
1,40,23,34;
11,66,9,12];
% # Argument data ,12 Samples , Each sample 4 dimension
Y=[78.5,74.3,104.3,87.6,95.9,109.2,102.7,72.5,93.1,115.9,83.8,113.3]'; % Dependent variable data 12 Two sample values
xy =[X Y];
% Multiple stepwise regression analysis
%xy For the raw data to be input , According to first x after y An array arranged in columns
% Such as :x1 x2 x3 x4 y wait
% Calculate the dispersion matrix R(m,m)
[n,m]=size(xy);
%F1=0;F2=0;
%disp(' The mean for :')
xy_aver=mean(xy)% Calculating mean
for i=1:m
for j=1:i
R(i,j)=0;
for k=1:n
R(i,j)=R(i,j)+(xy(k,i)-xy_aver(i))*(xy(k,j)-xy_aver(j));
end
R(j,i)=R(i,j);
end
SR(i)=sqrt(R(i,i));% Calculate the square root of the diagonal element
end
%disp('************ Deviation Matrix & Value of SR ( Dispersion matrix R&SR) ***********') % Output dispersion matrix R, And SR
%[R SR']
% Calculate the correlation coefficient R(m,m)
for i=1:m
for j=1:i
R(i,j)=R(i,j)/(SR(i)*SR(j));
R(j,i)=R(i,j);
end
end
%disp('********** Correlation Coefficient Matrix ( Correlation coefficient matrix R) **********')% Output correlation coefficient matrix R
%R
flag=1;% Whether the stepwise regression is repeated
while(flag)
disp('******** Stepwise Regression Analysis Start *************')
F1=input(' Remove threshold value :F1=');
F2=input(' Introduce threshold value :F2=');
S=0;% Calculation steps
L=0;% The number of independent variables of the equation is introduced
FQ=n-1;% Degrees of freedom of the sum of squares of residuals
disp('************** Discriminant Value of Contribution V **************')
Imin(1)=0;Imax=1:m-1;% Definition has been introduced ( Minimum ) And not introduced ( Maximum ) The ordinal number of the variable
inn=0;outt=0;% The sequence number of the introduced and eliminated variables
while(1)
% pause
VN=1E+08;% The minimum value of the independent variable contribution of the equation has been introduced
VX=0;% The maximum value of the independent variable contribution without introducing the equation
IN=0;% The sequence number of the introduced argument with the least contribution
IX=0;% The sequence number of the uninitialized argument with the greatest contribution
S=S+1;
disp(['--------- step = ' int2str(S) '------------'])% Number of output steps
for i=1:m-1
if R(i,i)<1E-08
continue
end
% disp(['VMAX=' int2str(VX) '; IMAX=' int2str(IX)]) % Output Vmax=VX;Imax=IX;
V(i)=R(m,i)^2/R(i,i);% Calculate the variance contribution of the introduced variables
if V(i)>=0
if V(i)>VX % Find the maximum value of variance contribution of uninitialized variables
for in=1:length(Imax)
if i==Imax(in)
VX=V(i);IX=i;
end
end
end
end
if abs(V(i))<VN % Find the minimum value of variance contribution of the introduced variable
for out=1:length(Imin)
if i==Imin(out)
VN=abs(V(i));IN=i;
end
end
end
%disp([' Variance contribution :V=' num2str(V(i)) 'VX=' num2str(VX) 'IX=' int2str(IX) 'VN=' num2str(VN) 'IN=' int2str(IN)])
end
% Imax(inn+1)=IX;inn=inn+1;
t=find(Imax==IX);
Imax(t)=[];
disp(['******** Variance contribution V **********' num2str(V)])
disp(['VMAX=' num2str(VX) '; IMAX=' int2str(IX)]) % Output Vmax=VX;Imax=IX;
% disp(['VMIN=' num2str(VN) '; IMIN=' int2str(IN)]) % Output Vmin=VN;Imin=IN;
if S==1
disp(['S=' int2str(S)]) % Output S=1
else
disp(['VMIN=' num2str(VN) '; IMIN=' int2str(IN)]) % Output Vmin=VN;Imin=IN;
end
if S==1%||S==2||S==3
FE=VX*(n-L-2)/(R(m,m)-VX);
disp(['FE=' num2str(FE)]) % Output FE
if FE<F1
if L~=0
disp('Neither Delete Out Nor Select In!')
else
disp('May Be Smaller F1 And F2')
disp('The Stepwise Regression Analysis End!')
break;% Program end
end
else
L=L+1;FQ=FQ-1;K=IX;
disp(['X' int2str(K) ' Be Selected In'])
Imin(outt+1)=IX;outt=outt+1;
disp(['L = ' int2str(L) ])
R=xiaoqu(R,K) % Call subfunction , Perform elimination transformation
if L~=m-1
continue;
end
disp('Already Selecting End')
break;
end
else
% Calculate the value of the excluded variable F Test value
FT=VN*(n-L-1)/R(m,m);
disp([' Eliminate variables F Test value ' num2str(FT)])
if FT>=F2
FE=VX*(n-L-2)/(R(m,m)-VX);
disp(['***FE=' num2str(FE)]) % Output FE
if FE<F1
if L~=0
disp('Neither Delete Out Nor Select In!')
disp('The Stepwise Regression Analysis End!')
break;% Program end
else
disp('May Be Smaller F1 And F2')
disp('The Stepwise Regression Analysis End!')
break;% Program end
end
else
L=L+1;FQ=FQ-1;K=IX;
disp(['X' int2str(K) ' Be Selected In'])
disp(['L = ' int2str(L) ])
Imin(outt+1)=IX;outt=outt+1;
R=xiaoqu(R,K) % Call subfunction , Perform elimination transformation
if L~=m-1
continue;
end
disp('Already Selecting End')
break;
end
else
L=L-1;FQ=FQ+1;K=IN;
disp(['X' int2str(K) ' Be Deleted Out'])
disp(['L = ' int2str(L) ' (No. of Variable Selected)'])
R=xiaoqu(R,K) % Call subfunction
continue
end
end
end
% Output the corresponding calculation results
for i=1:m-1
kk=R(i,m)*R(m,i);
if kk<0
B(i)=R(i,m)*SR(m)/SR(i);
else
B(i)=0;
end
end
B0=xy_aver(m);
for i=1:m-1
B0=B0-B(i)*xy_aver(i);
end
disp([' The regression coefficient is :' num2str(B0) ' ' num2str(B)])
disp(' The regression equation is :')
disp(['Y=' num2str(B0)])
for i=1:m-1
if B(i)~=0
if B(i)>0
disp(['+' num2str(B(i)) 'X' int2str(i)]);
else
disp([num2str(B(i)) 'X' int2str(i)]);
end
end
end
Q=SR(m)^2*R(m,m);% The sum of squared residuals
disp(['Sum of SQuares of Residual Error( The sum of squared residuals ) Q = ' num2str(Q)])
S=SR(m)*sqrt(R(m,m)/FQ);% Residual standard deviation
disp(['Standard Deviation( Residual standard deviation , That is, the root mean square of the model error ) S = ' num2str(S)])
RR=sqrt(1-R(m,m));% Complex correlation coefficient
disp(['Multiple Correlation Coefficient( Complex correlation coefficient ) R = ' num2str(RR)])
FF=FQ*(1-R(m,m))/(L*R(m,m));% Significance test of regression equation F value
disp(['F Value for Test of Regression( Significance test of regression equation , Statistics of regression model ) F = ' num2str(FF)])
%F=SH*(m-n-1)/(SX*n);%F- statistic
%PROB = 1 - fcdf(FF,m,n-length(Imin)-1)% And statistics F The corresponding probability P
for i=1:m-1
CC=R(i,i)*R(m,m);
T(i)=R(i,m)/sqrt(CC/FQ);% Of each regression coefficient t Test value
R1(i)=R(i,m)/sqrt(CC+R(i,m)^2);% Partial correlation coefficient of each variable
end
disp(['t Test Value of Argument( Of each regression coefficient t Test value ):' num2str(T)])
disp(['Partial Corre.Coeffi.Ofargu.( Partial correlation coefficient of each variable ):' num2str(R1)])
flag=input(' Whether to conduct stepwise regression analysis again (1: yes ;0: no ):');
end
toc
Two . Simulation results
xy_aver =
7.2500 46.5000 12.0833 31.5000 94.2583
******** Stepwise Regression Analysis Start *************
Remove threshold value :F1=10
Introduce threshold value :F2=100
************** Discriminant Value of Contribution V **************
--------- step = 1------------
******** Variance contribution V **********0.53207 0.6395 0.26368 0.64727
VMAX=0.64727; IMAX=4
S=1
FE=18.35
X4 Be Selected In
L = 1
--------- step = 2------------
******** Variance contribution V **********0.32314 0.0058487 0.28898 0.64727
VMAX=0.32314; IMAX=1
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 18.35
X4 Be Deleted Out
L = 0 (No. of Variable Selected)
--------- step = 3------------
******** Variance contribution V **********0.53207 0.6395 0.26368 0.64727
VMAX=0.6395; IMAX=2
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 7.1199
X4 Be Deleted Out
L = -1 (No. of Variable Selected)
--------- step = 4------------
******** Variance contribution V **********0.32314 0.0058487 0.28898 0.64727
VMAX=0.28898; IMAX=3
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 22.02
X4 Be Deleted Out
L = -2 (No. of Variable Selected)
--------- step = 5------------
******** Variance contribution V **********0.53207 0.6395 0.26368 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 8.4145
X4 Be Deleted Out
L = -3 (No. of Variable Selected)
--------- step = 6------------
******** Variance contribution V **********0.32314 0.0058487 0.28898 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 25.69
X4 Be Deleted Out
L = -4 (No. of Variable Selected)
--------- step = 7------------
******** Variance contribution V **********0.53207 0.6395 0.26368 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 9.709
X4 Be Deleted Out
L = -5 (No. of Variable Selected)
--------- step = 8------------
******** Variance contribution V **********0.32314 0.0058487 0.28898 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 29.36
X4 Be Deleted Out
L = -6 (No. of Variable Selected)
--------- step = 9------------
******** Variance contribution V **********0.53207 0.6395 0.26368 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 11.0035
X4 Be Deleted Out
L = -7 (No. of Variable Selected)
--------- step = 10------------
******** Variance contribution V **********0.32314 0.0058487 0.28898 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 33.03
X4 Be Deleted Out
L = -8 (No. of Variable Selected)
--------- step = 11------------
******** Variance contribution V **********0.53207 0.6395 0.26368 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 12.2981
X4 Be Deleted Out
L = -9 (No. of Variable Selected)
--------- step = 12------------
******** Variance contribution V **********0.32314 0.0058487 0.28898 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 36.7
X4 Be Deleted Out
L = -10 (No. of Variable Selected)
--------- step = 13------------
******** Variance contribution V **********0.53207 0.6395 0.26368 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 13.5926
X4 Be Deleted Out
L = -11 (No. of Variable Selected)
--------- step = 14------------
******** Variance contribution V **********0.32314 0.0058487 0.28898 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 40.37
X4 Be Deleted Out
L = -12 (No. of Variable Selected)
--------- step = 15------------
******** Variance contribution V **********0.53207 0.6395 0.26368 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 14.8871
X4 Be Deleted Out
L = -13 (No. of Variable Selected)
--------- step = 16------------
******** Variance contribution V **********0.32314 0.0058487 0.28898 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 44.04
X4 Be Deleted Out
L = -14 (No. of Variable Selected)
--------- step = 17------------
******** Variance contribution V **********0.53207 0.6395 0.26368 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 16.1817
X4 Be Deleted Out
L = -15 (No. of Variable Selected)
--------- step = 18------------
******** Variance contribution V **********0.32314 0.0058487 0.28898 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 47.71
X4 Be Deleted Out
L = -16 (No. of Variable Selected)
--------- step = 19------------
******** Variance contribution V **********0.53207 0.6395 0.26368 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 17.4762
X4 Be Deleted Out
L = -17 (No. of Variable Selected)
--------- step = 20------------
******** Variance contribution V **********0.32314 0.0058487 0.28898 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 51.38
X4 Be Deleted Out
L = -18 (No. of Variable Selected)
--------- step = 21------------
******** Variance contribution V **********0.53207 0.6395 0.26368 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 18.7707
X4 Be Deleted Out
L = -19 (No. of Variable Selected)
--------- step = 22------------
******** Variance contribution V **********0.32314 0.0058487 0.28898 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 55.05
X4 Be Deleted Out
L = -20 (No. of Variable Selected)
--------- step = 23------------
******** Variance contribution V **********0.53207 0.6395 0.26368 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 20.0653
X4 Be Deleted Out
L = -21 (No. of Variable Selected)
--------- step = 24------------
******** Variance contribution V **********0.32314 0.0058487 0.28898 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 58.72
X4 Be Deleted Out
L = -22 (No. of Variable Selected)
--------- step = 25------------
******** Variance contribution V **********0.53207 0.6395 0.26368 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 21.3598
X4 Be Deleted Out
L = -23 (No. of Variable Selected)
--------- step = 26------------
******** Variance contribution V **********0.32314 0.0058487 0.28898 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 62.39
X4 Be Deleted Out
L = -24 (No. of Variable Selected)
--------- step = 27------------
******** Variance contribution V **********0.53207 0.6395 0.26368 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 22.6543
X4 Be Deleted Out
L = -25 (No. of Variable Selected)
--------- step = 28------------
******** Variance contribution V **********0.32314 0.0058487 0.28898 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 66.06
X4 Be Deleted Out
L = -26 (No. of Variable Selected)
--------- step = 29------------
******** Variance contribution V **********0.53207 0.6395 0.26368 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 23.9488
X4 Be Deleted Out
L = -27 (No. of Variable Selected)
--------- step = 30------------
******** Variance contribution V **********0.32314 0.0058487 0.28898 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 69.73
X4 Be Deleted Out
L = -28 (No. of Variable Selected)
--------- step = 31------------
******** Variance contribution V **********0.53207 0.6395 0.26368 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 25.2434
X4 Be Deleted Out
L = -29 (No. of Variable Selected)
--------- step = 32------------
******** Variance contribution V **********0.32314 0.0058487 0.28898 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 73.4
X4 Be Deleted Out
L = -30 (No. of Variable Selected)
--------- step = 33------------
******** Variance contribution V **********0.53207 0.6395 0.26368 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 26.5379
X4 Be Deleted Out
L = -31 (No. of Variable Selected)
--------- step = 34------------
******** Variance contribution V **********0.32314 0.0058487 0.28898 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 77.07
X4 Be Deleted Out
L = -32 (No. of Variable Selected)
--------- step = 35------------
******** Variance contribution V **********0.53207 0.6395 0.26368 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 27.8324
X4 Be Deleted Out
L = -33 (No. of Variable Selected)
--------- step = 36------------
******** Variance contribution V **********0.32314 0.0058487 0.28898 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 80.74
X4 Be Deleted Out
L = -34 (No. of Variable Selected)
--------- step = 37------------
******** Variance contribution V **********0.53207 0.6395 0.26368 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 29.127
X4 Be Deleted Out
L = -35 (No. of Variable Selected)
--------- step = 38------------
******** Variance contribution V **********0.32314 0.0058487 0.28898 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 84.41
X4 Be Deleted Out
L = -36 (No. of Variable Selected)
--------- step = 39------------
******** Variance contribution V **********0.53207 0.6395 0.26368 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 30.4215
X4 Be Deleted Out
L = -37 (No. of Variable Selected)
--------- step = 40------------
******** Variance contribution V **********0.32314 0.0058487 0.28898 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 88.08
X4 Be Deleted Out
L = -38 (No. of Variable Selected)
--------- step = 41------------
******** Variance contribution V **********0.53207 0.6395 0.26368 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 31.716
X4 Be Deleted Out
L = -39 (No. of Variable Selected)
--------- step = 42------------
******** Variance contribution V **********0.32314 0.0058487 0.28898 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 91.75
X4 Be Deleted Out
L = -40 (No. of Variable Selected)
--------- step = 43------------
******** Variance contribution V **********0.53207 0.6395 0.26368 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 33.0106
X4 Be Deleted Out
L = -41 (No. of Variable Selected)
--------- step = 44------------
******** Variance contribution V **********0.32314 0.0058487 0.28898 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 95.42
X4 Be Deleted Out
L = -42 (No. of Variable Selected)
--------- step = 45------------
******** Variance contribution V **********0.53207 0.6395 0.26368 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 34.3051
X4 Be Deleted Out
L = -43 (No. of Variable Selected)
--------- step = 46------------
******** Variance contribution V **********0.32314 0.0058487 0.28898 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 99.09
X4 Be Deleted Out
L = -44 (No. of Variable Selected)
--------- step = 47------------
******** Variance contribution V **********0.53207 0.6395 0.26368 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 35.5996
X4 Be Deleted Out
L = -45 (No. of Variable Selected)
--------- step = 48------------
******** Variance contribution V **********0.32314 0.0058487 0.28898 0.64727
VMAX=0; IMAX=0
VMIN=0.64727; IMIN=4
Eliminate variables F Test value 102.7599
***FE=0
Neither Delete Out Nor Select In!
The Stepwise Regression Analysis End!
The regression coefficient is :117.3697 0 0 0 -0.73369
The regression equation is :
Y=117.3697
-0.73369X4
Sum of SQuares of Residual Error( The sum of squared residuals ) Q = 883.291
Standard Deviation( Residual standard deviation , That is, the root mean square of the model error ) S = 3.9715
Multiple Correlation Coefficient( Complex correlation coefficient ) R = 0.80453
F Value for Test of Regression( Significance test of regression equation , Statistics of regression model ) F = -2.2836
t Test Value of Argument( Of each regression coefficient t Test value ):7.16248 0.963604 -6.77331 -10.1371
Partial Corre.Coeffi.Ofargu.( Partial correlation coefficient of each variable ):0.69145 0.12771 -0.67106 -0.80453
Whether to conduct stepwise regression analysis again (1: yes ;0: no ):0
Time has passed 14.692745 second .
3、 ... and . Summary
Examples of stepwise regression analysis , It may be used later , Take a note here . Learn one every day MATLAB Little knowledge , Let's learn and make progress together !
边栏推荐
- Basic interview questions for Software Test Engineers (required for fresh students and test dishes) the most basic interview questions
- Substrate 源码追新导读: 波卡系波卡权重计算全面更新, Governance 2.0 版本的优化和调整
- Sqlserver query code is 936 simplified Chinese GBK. Should I write 936 or GBK?
- Qt中的数据库使用
- Dark horse notes - collection (common methods and traversal methods of collection)
- 黑马笔记---常用日期API
- Kubeedge's core philosophy
- Js根据相同值将数组转换为二维数组
- 电机控制park变换公式推导
- Mysql判断计算结果,除以100
猜你喜欢
随机推荐
波卡跨链通信源码探秘: 要素篇
Dqn notes
【一天学awk】正则匹配
论文解读(AGC)《Attributed Graph Clustering via Adaptive Graph Convolution》
ffmpeg 杂项
资源变现小程序开通微信官方小商店教程
Introduction to the new source code of substrat: fix the memory leak of the mission engine of beefy, and optimize the smart contract deletion queue
Double dqn notes
Vision based robot grasping: from object localization, object pose estimation to parallel gripper grasping estimation
Can the polardb MySQL fees for RDS MySQL data migration be transferred?
Introduction to the novelty of substrat source code: indexing of call calls and fully completing the materialization of storage layer
Dark horse notes -- wrapper class, regular expression, arrays class
Sublist3r error reporting solution
Sarsa notes
项目中遇到一个有趣的事情
[one day learning awk] array usage
Discussion on JMeter operation principle
时空预测2-GCN_LSTM
mqtt-ros模拟发布一个自定义消息类型
【精选】资源变现资讯、新闻、自媒体、博客小程序(可引流,开通流量主,带pc后台管理)