Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 64.19749
- 65.19011
- 64.03281
- 64.99111
- 65.43837
- 65.51817
- 65.22061
- 65.43191
- 65.0221
- 65.44038
- 64.41756
- 64.65764
- 64.7486
- 65.11544
- 64.12437
- 64.49148
- 64.89215
- 64.72688
- 64.97553
- 64.6361
- 64.29038
- 65.31076
- 64.2114
- 65.37864
- 65.49637
- 65.3289
- 65.38394
- 65.39384
- 65.0984
- 65.32695
- 65.28
- 64.31041
- 65.20193
- 65.78063
- 65.17604
- 66.16412
- 65.85091
- 65.46718
- 65.75551
- 65.39994
- 66.36175
- 65.37125
- 65.77763
- 65.48623
- 64.62135
- 65.77237
- 65.84289
- 65.80289
- 66.78865
- 65.56931
- 65.29913
- 64.85516
- 65.56866
- 64.75768
- 65.95956
- 65.64745
- 64.77283
- 65.64165
- 66.64309
- 65.84163
- 66.2946
- 66.10482
- 65.72736
- 65.56701
- 65.11096
- 66.0006
- 66.71783
- 65.35595
- 66.44798
- 65.74924
- 65.4501
- 65.97633
- 65.32825
- 65.7741
- 65.76783
- 65.88689
- 65.88939
- 65.16927
- 64.95984
- 66.02226
- 66.79225
- 66.75573
- 65.74074
- 66.14969
- 66.15687
- 65.81199
- 66.13094
- 66.13194
- 65.82172
- 66.14661
- 65.32756
- 66.3979
- 65.84383
- 65.55329
- 65.68398
- 66.42857
- 65.82402
- 66.01003
- 66.25157
- 65.82142
- 66.08791
- 65.78863
- 66.2764
- 66.00948
- 66.26236
- 65.40246
- 65.40166
- 65.37064
- 65.73147
- 65.32708
- 65.84894
- 65.82043
- 64.91447
- 65.81062
- 66.42228
- 66.0316
- 65.35361
- 66.46407
- 66.41045
- 65.81548
- 65.06059
- 66.25414
- 65.69747
- 65.15275
- 65.50985
- 66.66216
- 66.88095
- 65.81281
- 66.15546
- 66.40939
- 65.94115
- 65.98144
- 66.13243
- 66.89761
- 66.95423
- 65.63435
- 66.05837
- 66.71114
- library(urca)
- library(foreign)
- library(zoo)
- tsInv <- as.zoo(ts(as.data.frame(read.table(
- "http://www.jmulti.de/download/datasets/US_investment.dat", skip=8, header=TRUE)),
- frequency=4, start=1947+2/4))
- png("USinvPlot.png", width=6,
- height=7, units="in", res=100)
- par(mfrow=c(2, 1))
- plot(tsInv$USinvestment)
- plot(diff(tsInv$USinvestment))
- dev.off()
- # ADF with intercept
- adfIntercept <- ur.df(tsInv$USinvestment, lags = 3, type= 'drift')
- summary(adfIntercept)
- # using the (log) consumption series
- tsConsump <- zoo(read.dta("http://www.stata-press.com/data/r12/lutkepohl2.dta"), frequency=1)
- png("logConsPlot.png", width=6,
- height=7, units="in", res=100)
- par(mfrow=c(2, 1))
- plot(tsConsump$ln_consump)
- plot(diff(tsConsump$ln_consump))
- dev.off()
- # ADF with trend
- adfTrend <- ur.df(tsConsump$ln_consump, lags = 4, type = 'trend')
- summary(adfTrend)
- # using the given data
- tsTemp <- read.table(textConnection("temp
- 64.19749
- 65.19011
- 64.03281
- 64.99111
- 65.43837
- 65.51817
- 65.22061
- 65.43191
- 65.0221
- 65.44038
- 64.41756
- 64.65764
- 64.7486
- 65.11544
- 64.12437
- 64.49148
- 64.89215
- 64.72688
- 64.97553
- 64.6361
- 64.29038
- 65.31076
- 64.2114
- 65.37864
- 65.49637
- 65.3289
- 65.38394
- 65.39384
- 65.0984
- 65.32695
- 65.28
- 64.31041
- 65.20193
- 65.78063
- 65.17604
- 66.16412
- 65.85091
- 65.46718
- 65.75551
- 65.39994
- 66.36175
- 65.37125
- 65.77763
- 65.48623
- 64.62135
- 65.77237
- 65.84289
- 65.80289
- 66.78865
- 65.56931
- 65.29913
- 64.85516
- 65.56866
- 64.75768
- 65.95956
- 65.64745
- 64.77283
- 65.64165
- 66.64309
- 65.84163
- 66.2946
- 66.10482
- 65.72736
- 65.56701
- 65.11096
- 66.0006
- 66.71783
- 65.35595
- 66.44798
- 65.74924
- 65.4501
- 65.97633
- 65.32825
- 65.7741
- 65.76783
- 65.88689
- 65.88939
- 65.16927
- 64.95984
- 66.02226
- 66.79225
- 66.75573
- 65.74074
- 66.14969
- 66.15687
- 65.81199
- 66.13094
- 66.13194
- 65.82172
- 66.14661
- 65.32756
- 66.3979
- 65.84383
- 65.55329
- 65.68398
- 66.42857
- 65.82402
- 66.01003
- 66.25157
- 65.82142
- 66.08791
- 65.78863
- 66.2764
- 66.00948
- 66.26236
- 65.40246
- 65.40166
- 65.37064
- 65.73147
- 65.32708
- 65.84894
- 65.82043
- 64.91447
- 65.81062
- 66.42228
- 66.0316
- 65.35361
- 66.46407
- 66.41045
- 65.81548
- 65.06059
- 66.25414
- 65.69747
- 65.15275
- 65.50985
- 66.66216
- 66.88095
- 65.81281
- 66.15546
- 66.40939
- 65.94115
- 65.98144
- 66.13243
- 66.89761
- 66.95423
- 65.63435
- 66.05837
- 66.71114"), header=T)
- tsTemp <- as.zoo(ts(tsTemp, frequency=1))
- png("tempPlot.png", width=6,
- height=7, units="in", res=100)
- par(mfrow=c(2, 1))
- plot(tsTemp$temp)
- plot(diff(tsTemp$temp))
- dev.off()
- # ADF with trend
- adfTrend <- ur.df(tsTemp$temp, type = 'trend')
- summary(adfTrend)
Add Comment
Please, Sign In to add comment