data set: Journals
美國圖書館在西元2000年的經濟期刊訂閱數。
- title
Journal title.
- publisher
factor with publisher name.
- society
factor. Is the journal published by a scholarly society?
- price
Library subscription price.
- pages
Number of pages.
- charpp
Characters per page.
- citations
Total number of citations.
- foundingyear
Year journal was founded.
- subs
Number of library subscriptions.
- field
factor with field description.
資料整理
journals <- Journals %>%
mutate(
citeprice = price/citations,
age = 2000-foundingyear,
chars = charpp * pages / 10^6
)
journals %>% rmarkdown::paged_table()\[ citeprice = \frac{price}{citations} \]
\[ age = 2000 - foundingyear \]
其中2000年為統計這個資料集時的年度
\[ chars = charpp \times pages \]
journals %>%
select(subs, citeprice) %>%
pairs.panels()journals %>%
select(subs, citeprice) %>%
mutate_all(log) %>%
pairs.panels()journals1 <- journals %>%
select(subs, citeprice, age, chars) %>%
mutate_all(log)\[ subs = \beta_0+\beta_1 citeprice + \beta_2 age + \beta_3 chars +\varepsilon_i \]
model1 <- journals1 %>%
lm(formula = subs ~ citeprice + age + chars, data = .)
coeftest(model1, vcov. = vcovHC, type = "HC1")
t test of coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 3.206648 0.379725 8.4447 1.102e-14 ***
citeprice -0.407718 0.043717 -9.3262 < 2.2e-16 ***
age 0.423649 0.119064 3.5581 0.0004801 ***
chars 0.205614 0.097751 2.1035 0.0368474 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
\[ \begin{aligned} subs =& \beta_0+\beta_1 citeprice + \beta_2 citeprice^2 +\beta_3 citeprice^3 \\&+ \beta_4 citeprice * age+\beta_4 age + \beta_5 chars + \varepsilon_i \end{aligned} \]
model2 <- journals1 %>%
lm(formula = subs ~ citeprice + I(citeprice^2) + I(citeprice^3) + I(age * citeprice)+ age + chars, data = .)
coeftest(model2, vcov. = vcovHC, type = "HC1")
t test of coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 3.4075956 0.3735992 9.1210 < 2.2e-16 ***
citeprice -0.9609365 0.1601349 -6.0008 1.121e-08 ***
I(citeprice^2) 0.0165099 0.0254886 0.6477 0.518015
I(citeprice^3) 0.0036666 0.0055147 0.6649 0.507008
I(age * citeprice) 0.1557773 0.0518947 3.0018 0.003081 **
age 0.3730539 0.1176966 3.1696 0.001805 **
chars 0.2346178 0.0977318 2.4006 0.017428 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
\[ \begin{aligned} subs = \beta_0+\beta_1 citeprice + \beta_2 age + \beta_3 age* citeprice + \beta_4 chars + \varepsilon_i \end{aligned} \]
model3 <- journals1 %>%
lm(formula = subs ~ citeprice + age + I(age * citeprice) + chars, data = .)
coeftest(model3, vcov. = vcovHC, type = "HC1")
t test of coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 3.433521 0.367471 9.3436 < 2.2e-16 ***
citeprice -0.898910 0.144648 -6.2144 3.656e-09 ***
age 0.373515 0.117527 3.1781 0.0017529 **
I(age * citeprice) 0.140959 0.040199 3.5065 0.0005769 ***
chars 0.229466 0.096493 2.3781 0.0184822 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
| Dependent variable: | |||
| subs | |||
| Model 1 | Model 2 | Model 3 | |
| (1) | (2) | (3) | |
| citeprice | -0.408*** | -0.961*** | -0.899*** |
| (0.042) | (0.189) | (0.162) | |
| I(citeprice2) | 0.017 | ||
| (0.024) | |||
| I(citeprice3) | 0.004 | ||
| (0.007) | |||
| I(age * citeprice) | 0.156*** | 0.141*** | |
| (0.055) | (0.045) | ||
| age | 0.424*** | 0.373*** | 0.374*** |
| (0.090) | (0.089) | (0.089) | |
| chars | 0.206* | 0.235** | 0.229** |
| (0.107) | (0.106) | (0.105) | |
| Constant | 3.207*** | 3.408*** | 3.434*** |
| (0.314) | (0.318) | (0.315) | |
| Observations | 180 | 180 | 180 |
| R2 | 0.613 | 0.635 | 0.634 |
| Adjusted R2 | 0.607 | 0.622 | 0.626 |
| Residual Std. Error | 0.705 (df = 176) | 0.691 (df = 173) | 0.688 (df = 175) |
| F Statistic | 93.009*** (df = 3; 176) | 50.149*** (df = 6; 173) | 75.749*** (df = 4; 175) |
| Note: | p<0.1; p<0.05; p<0.01 | ||