Call: lm(formula = LQ ~ LY + LP + LH) Residuals: Min 1Q Median 3Q Max -0.044348 -0.016419 -0.001398 0.012165 0.069734 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 11.80171 0.91531 12.894 4.66e-15 *** LY -0.14884 0.04080 -3.648 0.00083 *** LP -0.09126 0.08777 -1.040 0.30539 LH 1.36191 0.09203 14.798 < 2e-16 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 0.02601 on 36 degrees of freedom Multiple R-squared: 0.9668, Adjusted R-squared: 0.964 F-statistic: 349.1 on 3 and 36 DF, p-value: < 2.2e-16 > > library(lmtest) 要求されたパッケージ zoo をロード中です 次のパッケージを付け加えます: ‘zoo’ 以下のオブジェクトはマスクされています (from ‘package:base’) : as.Date, as.Date.numeric > library(tseries) ‘tseries’ version: 0.10-31 ‘tseries’ is a package for time series analysis and computational finance. See ‘library(help="tseries")’ for details. > > fv <- result$fitted.values > bptest(result,~fv**2) studentized Breusch-Pagan test data: result BP = 0.1741, df = 1, p-value = 0.6765 > dwtest(result) Durbin-Watson test data: result DW = 1.1149, p-value = 0.0002109 alternative hypothesis: true autocorrelation is greater than 0 > e <- residuals(result) > jarque.bera.test(e) Jarque Bera Test data: e X-squared = 3.8628, df = 2, p-value = 0.1449 > reset(result) RESET test data: result RESET = 1.1294, df1 = 2, df2 = 34, p-value = 0.3351 > AIC(result) [1] -172.6355 > > rhodata<-arima (residuals (result), order = c(1,0,0), include.mean = FALSE) > rho<-coef(rhodata) > rho ar1 0.4294465 > > LQ1=LQ-rho*LQ > LY1=LY-rho*LY > LP1=LP-rho*LP > LH1=LH-rho*LH > > result1 = lm(LQ1~LY1+LP1+LH1) > summary(result1) Call: lm(formula = LQ1 ~ LY1 + LP1 + LH1) Residuals: Min 1Q Median 3Q Max -0.025303 -0.009368 -0.000797 0.006941 0.039787 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 6.73351 0.52223 12.894 4.66e-15 *** LY1 -0.14884 0.04080 -3.648 0.00083 *** LP1 -0.09126 0.08777 -1.040 0.30539 LH1 1.36191 0.09203 14.798 < 2e-16 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 0.01484 on 36 degrees of freedom Multiple R-squared: 0.9668, Adjusted R-squared: 0.964 F-statistic: 349.1 on 3 and 36 DF, p-value: < 2.2e-16 > > crho<-coef(result1) > c<-crho[1]/(1-rho) > c (Intercept) 11.80171 >