[R] How to Interpret Results of Regression in R

From: Kum-Hoe Hwang <phdhwang_at_gmail.com>
Date: Sat 15 Jul 2006 - 21:51:45 EST

Howdy, Gurus

I am appying R package for regression analysis as followings. A dependent variable is jhnet that means ratio of dividing internal trip with all trips in a traffic zone. There are many indepentent variables including factor or dummy varibles such as parkfee, ohouse, Devt2, corridor1.

I have three questions.
First, What are estimated for regression model? Second, Which results should I trust among results from lm, anova, Anova? Third, are there any differences among results from lm, anova, Anova?

Call:
lm(formula = I(jhnet^1) ~ as.factor(parkfee) + fare + as.factor(ohouse) +

tripMIN + as.factor(Devt2) + cityarea + coreDistance + density +     as.factor(corridor1) + as.factor(ic) + OD_total + nfirm_dong +     house1 + house2 + house3 + house4, data = sdi.data[w, ],     na.action = na.omit, singular.ok = TRUE)

Residuals:

Min 1Q Median 3Q Max
-0.27703 -0.02942 0.00552 0.02325 0.18894

Coefficients:

```                                  Estimate Std. Error t value Pr(>|t|)
(Intercept)                       5.68e-01   1.11e-02   51.15  < 2e-16 ***
as.factor(parkfee)1               3.89e-03   6.40e-03    0.61   0.5430
as.factor(parkfee)2               3.84e-03   2.51e-03    1.53   0.1255
fare                              7.40e-07   3.07e-06    0.24   0.8097
as.factor(ohouse)2               -3.49e-03   2.55e-03   -1.37   0.1704
as.factor(ohouse)3                4.49e-04   4.83e-03    0.09   0.9260
as.factor(ohouse)4               -2.16e-02   8.11e-03   -2.66   0.0078 **
tripMIN                          -6.14e-05   3.75e-05   -1.64   0.1020
as.factor(Devt2)1                -2.57e-02   2.89e-03   -8.91  < 2e-16 ***
as.factor(Devt2)2                 2.29e-02   3.57e-03    6.42  1.5e-10 ***
as.factor(Devt2)3                 6.04e-02   3.34e-03   18.10  < 2e-16 ***
cityarea                         -6.59e-05   1.17e-05   -5.61  2.2e-08 ***
coreDistance                      2.59e-07   2.39e-07    1.09   0.2773
density                           7.55e-06   3.28e-07   23.02  < 2e-16 ***
as.factor(corridor1)B    2.54e-02   5.40e-03    4.70  2.7e-06 ***
as.factor(corridor1)C    7.86e-02   1.19e-02    6.58  5.5e-11 ***
as.factor(corridor1)D      8.39e-02   7.76e-03   10.81  < 2e-16 ***
as.factor(corridor1)E     -2.72e-01   2.22e-02  -12.22  < 2e-16 ***
as.factor(corridor1)F -4.39e-02   5.21e-03   -8.43  < 2e-16 ***
as.factor(ic)1                    1.51e-02   5.57e-03    2.70   0.0069 **
OD_total                         -1.36e-08   2.88e-08   -0.47   0.6375
nfirm_dong                       -9.77e-06   1.73e-06   -5.66  1.6e-08 ***
house1                           -4.41e-06   2.27e-07  -19.44  < 2e-16 ***
house2                           -8.13e-08   8.12e-08   -1.00   0.3165
house3                            7.40e-06   3.22e-07   23.03  < 2e-16 ***
house4                           -3.83e-06   2.40e-07  -15.96  < 2e-16 ***
```

---

Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.0546 on 2974 degrees of freedom Multiple R-Squared: 0.584, Adjusted R-squared: 0.58 F-statistic: 167 on 25 and 2974 DF, p-value: <2e-16

Analysis of Variance Table

Response: I(jhnet^1)

```                       Df Sum Sq Mean Sq F value  Pr(>F)
as.factor(parkfee)      2   0.06    0.03   10.05 4.5e-05 ***
fare                    1   0.03    0.03   10.77  0.0010 **
as.factor(ohouse)       3   0.08    0.03    8.90 7.2e-06 ***
tripMIN                 1   0.02    0.02    8.35  0.0039 **
as.factor(Devt2)        3   1.77    0.59  197.95 < 2e-16 ***
cityarea                1   2.55    2.55  855.60 < 2e-16 ***
coreDistance            1   2.47    2.47  827.62 < 2e-16 ***
density                 1   0.79    0.79  265.23 < 2e-16 ***
as.factor(corridor1)    5   1.37    0.27   91.91 < 2e-16 ***
as.factor(ic)           1 0.0035  0.0035    1.17  0.2787
OD_total                1   0.03    0.03   10.05  0.0015 **
nfirm_dong              1   0.39    0.39  131.97 < 2e-16 ***
house1                  1   0.49    0.49  164.06 < 2e-16 ***
house2                  1   0.50    0.50  167.25 < 2e-16 ***
house3                  1   1.11    1.11  373.09 < 2e-16 ***
house4                  1   0.76    0.76  254.75 < 2e-16 ***
Residuals            2974   8.86  0.0030
```

---

Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 [1] "Anova Results"
Anova Table (Type II tests)
Response: I(jhnet^1)
```                      Sum Sq   Df F value  Pr(>F)
as.factor(parkfee)      0.01    2    1.19  0.3035
fare                 0.00017    1    0.06  0.8097
as.factor(ohouse)       0.03    3    2.89  0.0343 *
tripMIN                 0.01    1    2.68  0.1020
as.factor(Devt2)        1.77    3  198.18 < 2e-16 ***
cityarea                0.09    1   31.50 2.2e-08 ***
coreDistance         0.00352    1    1.18  0.2773
density                 1.58    1  529.72 < 2e-16 ***
as.factor(corridor1)    1.96    5  131.40 < 2e-16 ***
as.factor(ic)           0.02    1    7.31  0.0069 **
OD_total             0.00066    1    0.22  0.6375
nfirm_dong              0.10    1   32.05 1.6e-08 ***
house1                  1.13    1  377.88 < 2e-16 ***
house2               0.00299    1    1.00  0.3165
house3                  1.58    1  530.37 < 2e-16 ***
house4                  0.76    1  254.75 < 2e-16 ***
Residuals               8.86 2974
```

---

Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
```                       GVIF Df GVIF^(1/2Df)
as.factor(parkfee)    1.570  2        1.119
fare                  1.562  1        1.250
as.factor(ohouse)     1.063  3        1.010
tripMIN               1.110  1        1.054
as.factor(Devt2)      2.378  3        1.155
cityarea              4.188  1        2.046
coreDistance          7.037  1        2.653
density               3.338  1        1.827
as.factor(corridor1) 10.050  5        1.260
as.factor(ic)         2.985  1        1.728
OD_total              2.667  1        1.633
nfirm_dong            2.367  1        1.539
house1                3.762  1        1.940
house2                2.571  1        1.604
house3                3.536  1        1.880
house4                1.766  1        1.329

--------------------------------------------------------------------------------------------------------

```
--

Kum-Hoe Hwang, Ph.D.Phone : 82-31-250-3516 Email : phdhwang@gmail.com

[[alternative HTML version deleted]]

R-help@stat.math.ethz.ch mailing list