foto <- read.delim("~/Dropbox/Teaching/Econometrics/Foto")
ls(foto)
## [1] "Year" "copias" "escolares" "esotrasu" "esufm" "otros"
## [7] "total"
foto$univ = foto$esufm + foto$esotrasu
foto$escyotros = foto$escolares + foto$otros
reg = lm(formula = foto$copias ~ foto$univ + foto$escyotros, data = foto)
summary(reg)
##
## Call:
## lm(formula = foto$copias ~ foto$univ + foto$escyotros, data = foto)
##
## Residuals:
## Min 1Q Median 3Q Max
## -16.505 -5.963 -3.339 4.516 20.460
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.869 8.258 0.711 0.4851
## foto$univ 0.923 0.511 1.806 0.0852 .
## foto$escyotros 4.446 2.997 1.483 0.1528
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 9.477 on 21 degrees of freedom
## (3 observations deleted due to missingness)
## Multiple R-squared: 0.6391, Adjusted R-squared: 0.6047
## F-statistic: 18.59 on 2 and 21 DF, p-value: 2.253e-05
## Loading required package: zoo
##
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
##
## as.Date, as.Date.numeric

##
## Durbin-Watson test
##
## data: reg
## DW = 0.9214, p-value = 0.001657
## alternative hypothesis: true autocorrelation is greater than 0