This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
library(AER)
## Warning: package 'AER' was built under R version 3.1.2
## Loading required package: car
## Warning: package 'car' was built under R version 3.1.2
## Loading required package: lmtest
## Loading required package: zoo
## 
## Attaching package: 'zoo'
## 
## The following objects are masked from 'package:base':
## 
##     as.Date, as.Date.numeric
## 
## Loading required package: sandwich
## Loading required package: survival
## Loading required package: splines
data('Journals',package='AER')
dim(Journals)
## [1] 180  10
names(Journals)
##  [1] "title"        "publisher"    "society"      "price"       
##  [5] "pages"        "charpp"       "citations"    "foundingyear"
##  [9] "subs"         "field"
head(Journals)
##                                                      title
## APEL                     Asian-Pacific Economic Literature
## SAJoEH           South African Journal of Economic History
## CE                                 Computational Economics
## MEPiTE MOCT-MOST Economic Policy in Transitional Economics
## JoSE                            Journal of Socio-Economics
## LabEc                                     Labour Economics
##                     publisher society price pages charpp citations
## APEL                Blackwell      no   123   440   3822        21
## SAJoEH So Afr ec history assn      no    20   309   1782        22
## CE                     Kluwer      no   443   567   2924        22
## MEPiTE                 Kluwer      no   276   520   3234        22
## JoSE                 Elsevier      no   295   791   3024        24
## LabEc                Elsevier      no   344   609   2967        24
##        foundingyear subs             field
## APEL           1986   14           General
## SAJoEH         1986   59  Economic History
## CE             1987   17       Specialized
## MEPiTE         1991    2      Area Studies
## JoSE           1972   96 Interdisciplinary
## LabEc          1994   15             Labor
plot(log(subs)~log(price/citations),data=Journals)
j_lm<- lm(log(subs)~log(price/citations),data=Journals)
abline(j_lm)
summary(j_lm)


## 
## Call:
## lm(formula = log(subs) ~ log(price/citations), data = Journals)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -2.72478 -0.53609  0.03721  0.46619  1.84808 
## 
## Coefficients:
##                      Estimate Std. Error t value Pr(>|t|)    
## (Intercept)           4.76621    0.05591   85.25   <2e-16 ***
## log(price/citations) -0.53305    0.03561  -14.97   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.7497 on 178 degrees of freedom
## Multiple R-squared:  0.5573, Adjusted R-squared:  0.5548 
## F-statistic:   224 on 1 and 178 DF,  p-value: < 2.2e-16

Nikkei225

28000-28550 up in the early session, down lately.