Classic books: A Modern Approach to Regression with R.pdf
Links: https://pan.baidu.com/s/14NJt7CrOpUUe2hYyrJn_rg extraction code: 7fv6
Multiple linear regression
Master the estimation method of multiple linear regression models were identified and corrected to master multiple linear model.
Multiple linear regression models, and identify and correct multicollinearity.
OLS, simple correlation coefficient test, comprehensive judgment method, stepwise regression.
Principle of least squares estimation, t test, F test value.
1 with OLS estimation model
Set multiple linear regression model:
Performed using ordinary least squares estimation, click on the main menu screen Quick \ Estimate Equation, input in the dialog box: YC X1 X2 X3 X4, and click OK regression results obtained, as shown in FIG.
The data in FIG. 2, the estimation result obtained for the model:
Wherein the number of the corresponding t-test in parentheses. The results can be seen from the above regression, goodness of fit is high, the overall effect by F-test. It is apparent that, at 5% significance level, not the model parameters by examining, at the 10% significance level, only the coefficients by X2 test. It is thought that the presence of multiple collinearity parsing variables.
2 Recognition Model multicollinearity
2.1 Synthetic Judgment Method
As can be seen from the results of the model estimation, , , high coefficient of determination, indicating good model fit of the sample; test value is relatively large, corresponding , significant regression equation described, i.e. each variable together indeed dependent variable Y have a significant impact; given significance level , but the variables X1, X2, X3, t statistic X4 coefficients were 1.246,2.397, -0.693,0.420, the corresponding p values were 0.2681,0.0619,0.5190,0.6916 described variables have no significant effect on the dependent variable. The above analysis shows that there is a very serious multicollinearity model.
2.2 simple correlation coefficient test method
An analytical variables X1, X2, X3, X4 simple correlation coefficient matrix.
Select X1, X2, X3, X4, to produce a group, and then click View \ Covariance Analysis \ Only Correlation selected, the correlation matrix can be derived, as shown in FIG. Then click on the top of the Freeze button, you get a separate Table type Object:
See correlation coefficient matrix, the higher the correlation coefficient between the analytical variables, the closer the correlation coefficient is 1, the highly correlated, it confirmed the presence of multiple collinearity parsing variables.
3 correction model multicollinearity
About multiple correction method is generally co-linear transform variable, prior information method, stepwise regression method.
4 heteroskedasticity
Heteroscedasticity model test method and processing method
Graphics test method heteroscedasticity model, Goldfeld-Quanadt White inspection and testing, use WLS method, heteroskedasticity robust standard error correction method for heteroscedasticity
4.1 heteroskedasticity test model
4.1.1 Graphics Inspection Act
Generate a residual sequence. After the results obtained in FIG. 2, in the working file, click Object \ Generate Series ..., in a pop-up window, type the command in the main window as "e2 = resid ^ 2", 3, and sum of squared residuals obtained sequence e2.
Drawing on the scatter plot. Hold down the Ctrl key while selecting variables X, to open the set of objects and e2, enter the data list, and then click the View \ Graph \ Scatter \ Simple Scatter , scatter plots available, if the residual sum of squares of approximately presence of increasing relations, i.e. the presence of a monotonically increasing Heteroscedasticity type.
4.1.2 White Inspection
Regression estimation results, click View \ Residual Diagnostics \ heteroskedasticity Test \ White, White enters the test results into over-estimate appears White test is shown in Fig.
White statistic nR ^ 2, which is greater than k-1 degrees of freedom of the 5% significance level corresponding to the threshold value distribution, the null hypothesis is rejected of homoscedasticity.
4.2 heteroskedasticity correction
4.2.1 Weighted Least Squares
The OLS method estimates process, we have chosen the right number . The weights generated as follows, in the case of Figure 2, the click Object \ Generate Series ... in the working document, the pop-up window, enter w = 1 / @ abs (resid ) at the Enter equation.
Click Quick \ Estimate Equation in the working document, the regression expression corresponding to the input command,
Then, click on the Options, select the Weights in the Type select Inverse std. Dev, enter w series in the Weight box, click OK, you can get the results weighted least squares method
4.2.2 heteroskedasticity robust standard errors method
4 .2.3 logarithmic transformation
5 autocorrelation
Autocorrelation of the model is examined and graphics DW test, using the generalized least squares method and the generalized differential correction.
DW test:
DW values in the regression equation in conjunction with look-up table can know, the model , it is clear there is a positive autocorrelation model.
Residual plots:
Residual plots, the change has residuals system mode, continuous and continuous positive as negative, indicating the presence of residual positive first order autocorrelation, model t statistics and F statistic conclusions can not be trusted, we need to take remedial measures.
Click the working document window toolbar Object \ Generate Series ..., input in the dialog box et = resid, as shown in FIG click OK to give residuals et 4.
Click Quick \ Graph, input in the dialog box: et, then Click OK, and the pop-up window to select Line & Symbol, Click OK, and residuals resulting graph with time shown in Figure 5, click Quick \ Graph, in the input dialog box: et (-1) et, then click OK, and the pop-up window, select Scatter click OK, and residual term to obtain the graph of the time, as shown in FIG.
Figure 5 Figure 6
As can be seen from FIG. 5 and FIG. 6, it is positively correlated random interference terms.
Lagrange multiplier test:
In return results interface - Click on View \ Residual Diagnostics \ Serial Correlation LM Test ..., in the pop-up dialog box, enter: 1, click OK, get
As a new form of differential data, estimation model and test correlation