R version 2.12.0 (2010-10-15)
Copyright (C) 2010 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-redhat-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> x <- array(list(347553
+ ,0.032500
+ ,125.01
+ ,0.012257
+ ,353245
+ ,0.025000
+ ,120.96
+ ,0.014315
+ ,347966
+ ,0.025000
+ ,117.07
+ ,0.012208
+ ,364343
+ ,0.025000
+ ,112.45
+ ,0.009063
+ ,341713
+ ,0.025000
+ ,110.23
+ ,0.009054
+ ,361162
+ ,0.025000
+ ,107.34
+ ,0.009063
+ ,354400
+ ,0.025000
+ ,107.73
+ ,0.019270
+ ,345183
+ ,0.025000
+ ,103.71
+ ,0.018200
+ ,341807
+ ,0.017500
+ ,105.28
+ ,0.015106
+ ,348712
+ ,0.017500
+ ,106.92
+ ,0.013078
+ ,349011
+ ,0.017500
+ ,107.8
+ ,0.010081
+ ,416259
+ ,0.017500
+ ,109.7
+ ,0.011089
+ ,360289
+ ,0.017500
+ ,111.51
+ ,0.013118
+ ,367557
+ ,0.017500
+ ,106.21
+ ,0.012097
+ ,364611
+ ,0.017500
+ ,105.14
+ ,0.013065
+ ,378688
+ ,0.017500
+ ,103.53
+ ,0.007984
+ ,351763
+ ,0.017500
+ ,103.99
+ ,0.007976
+ ,377765
+ ,0.017500
+ ,102.72
+ ,0.004990
+ ,373212
+ ,0.017500
+ ,98.5
+ ,-0.001990
+ ,365819
+ ,0.017500
+ ,99.85
+ ,0.000000
+ ,364686
+ ,0.017500
+ ,98.81
+ ,0.001984
+ ,363333
+ ,0.017500
+ ,98.42
+ ,0.007944
+ ,362536
+ ,0.017500
+ ,97.96
+ ,0.009980
+ ,428803
+ ,0.017500
+ ,100.13
+ ,0.005982
+ ,375361
+ ,0.017500
+ ,99.75
+ ,0.004980
+ ,377205
+ ,0.017500
+ ,98.24
+ ,0.001992
+ ,381266
+ ,0.017500
+ ,90.79
+ ,-0.002976
+ ,390516
+ ,0.010000
+ ,83.67
+ ,-0.001980
+ ,366117
+ ,0.010000
+ ,85.1
+ ,-0.000989
+ ,393928
+ ,0.010000
+ ,84.53
+ ,0.001986
+ ,387784
+ ,0.010000
+ ,87.22
+ ,0.000997
+ ,385656
+ ,0.010000
+ ,94.55
+ ,-0.001986
+ ,385320
+ ,0.005000
+ ,100.49
+ ,0.000990
+ ,389053
+ ,0.005000
+ ,100.65
+ ,-0.006897
+ ,390595
+ ,0.005000
+ ,101.92
+ ,-0.006917
+ ,462440
+ ,0.005000
+ ,101.85
+ ,-0.003964
+ ,402532
+ ,0.005000
+ ,105.84
+ ,-0.004955
+ ,409070
+ ,0.005000
+ ,105.73
+ ,-0.003976
+ ,421329
+ ,0.005000
+ ,105.85
+ ,-0.000995
+ ,428841
+ ,0.005000
+ ,107.46
+ ,0.001984
+ ,404864
+ ,0.005000
+ ,106.51
+ ,0.001980
+ ,432633
+ ,0.005000
+ ,108.86
+ ,0.000000
+ ,416886
+ ,0.005000
+ ,109.32
+ ,0.003984
+ ,414893
+ ,0.005000
+ ,107.75
+ ,0.001990
+ ,417914
+ ,0.005000
+ ,109.75
+ ,0.000000
+ ,417518
+ ,0.005000
+ ,112.36
+ ,0.004960
+ ,423137
+ ,0.005000
+ ,112.26
+ ,0.004975
+ ,506710
+ ,0.005000
+ ,113.81
+ ,0.005970
+ ,436264
+ ,0.005000
+ ,118.02
+ ,0.005976
+ ,443712
+ ,0.005000
+ ,123.01
+ ,0.005988
+ ,452849
+ ,0.005000
+ ,122.64
+ ,0.004980
+ ,453009
+ ,0.005000
+ ,125.51
+ ,0.019802
+ ,437876
+ ,0.005000
+ ,118.99
+ ,0.019763
+ ,460041
+ ,0.005000
+ ,114.2
+ ,0.022795
+ ,450426
+ ,0.005000
+ ,115.16
+ ,0.019841
+ ,447873
+ ,0.005000
+ ,117.9
+ ,0.021847
+ ,444955
+ ,0.005000
+ ,120.74
+ ,0.024728
+ ,452043
+ ,0.005000
+ ,121.06
+ ,0.025666
+ ,480877
+ ,0.005000
+ ,125.27
+ ,0.021782
+ ,546696
+ ,0.005000
+ ,129.47
+ ,0.018793
+ ,483668
+ ,0.005000
+ ,129.45
+ ,0.018812
+ ,489627
+ ,0.005000
+ ,126
+ ,0.019841
+ ,490007
+ ,0.005000
+ ,128.69
+ ,0.022795
+ ,496590
+ ,0.005000
+ ,131.67
+ ,0.003883
+ ,480846
+ ,0.005000
+ ,135
+ ,0.004845
+ ,497677
+ ,0.005000
+ ,140.57
+ ,0.000969
+ ,492795
+ ,0.005000
+ ,140.73
+ ,-0.000973
+ ,488495
+ ,0.005000
+ ,144.67
+ ,-0.002915
+ ,486769
+ ,0.005000
+ ,134.59
+ ,-0.001931
+ ,494455
+ ,0.005000
+ ,121.3
+ ,0.001925
+ ,498054
+ ,0.005000
+ ,120.58
+ ,0.007752
+ ,558648
+ ,0.005000
+ ,117.54
+ ,0.005825
+ ,506424
+ ,0.005000
+ ,113.18
+ ,0.001944
+ ,512528
+ ,0.005000
+ ,116.66
+ ,-0.000973
+ ,512866
+ ,0.005000
+ ,119.78
+ ,-0.003876
+ ,529324
+ ,0.005000
+ ,119.81
+ ,-0.000967
+ ,508431
+ ,0.005000
+ ,122.11
+ ,-0.003857
+ ,523026
+ ,0.005000
+ ,120.9
+ ,-0.002904
+ ,521355
+ ,0.005000
+ ,119.86
+ ,-0.000974
+ ,514103
+ ,0.005000
+ ,113.4
+ ,0.002924
+ ,513885
+ ,0.005000
+ ,107.57
+ ,-0.001934
+ ,522150
+ ,0.005000
+ ,105.97
+ ,-0.006724
+ ,527384
+ ,0.005000
+ ,104.96
+ ,-0.011538
+ ,654047
+ ,0.005000
+ ,102.68
+ ,-0.010618
+ ,543115
+ ,0.005000
+ ,105.16
+ ,-0.006790
+ ,543200
+ ,0.005000
+ ,109.34
+ ,-0.006816
+ ,571201
+ ,0.005000
+ ,106.71
+ ,-0.005837
+ ,568892
+ ,0.005000
+ ,105.48
+ ,-0.007744
+ ,537223
+ ,0.005000
+ ,108.11
+ ,-0.006776
+ ,553186
+ ,0.005000
+ ,106.23
+ ,-0.005825
+ ,550954
+ ,0.005000
+ ,107.9
+ ,-0.005848
+ ,543433
+ ,0.005000
+ ,108.07
+ ,-0.004859
+ ,557195
+ ,0.005000
+ ,106.75
+ ,-0.009690
+ ,565522
+ ,0.005000
+ ,108.36
+ ,-0.011605
+ ,571691
+ ,0.005000
+ ,108.89
+ ,-0.008755
+ ,633972
+ ,0.005000
+ ,112.21
+ ,-0.004878
+ ,575265
+ ,0.005000
+ ,117.1
+ ,-0.003906
+ ,572364
+ ,0.003500
+ ,116.04
+ ,-0.002941
+ ,586744
+ ,0.002500
+ ,121.12
+ ,-0.006849
+ ,600389
+ ,0.002500
+ ,123.83
+ ,-0.007805
+ ,578540
+ ,0.002500
+ ,121.93
+ ,-0.007797
+ ,610778
+ ,0.002500
+ ,122.15
+ ,-0.008789
+ ,596577
+ ,0.002500
+ ,124.68
+ ,-0.007843
+ ,590558
+ ,0.002500
+ ,121.61
+ ,-0.007813
+ ,597294
+ ,0.001000
+ ,118.98
+ ,-0.007828
+ ,602384
+ ,0.001000
+ ,121.28
+ ,-0.007828
+ ,614190
+ ,0.001000
+ ,122.31
+ ,-0.009814
+ ,690042
+ ,0.001000
+ ,127.36
+ ,-0.011765
+ ,639497
+ ,0.001000
+ ,132.66
+ ,-0.013725
+ ,649304
+ ,0.001000
+ ,133.52
+ ,-0.015733
+ ,678762
+ ,0.001000
+ ,131.2
+ ,-0.011823
+ ,691885
+ ,0.001000
+ ,131.07
+ ,-0.010816
+ ,667973
+ ,0.001000
+ ,126.48
+ ,-0.008841
+ ,682032
+ ,0.001000
+ ,123.6
+ ,-0.006897
+ ,672651
+ ,0.001000
+ ,118.07
+ ,-0.007905
+ ,671865
+ ,0.001000
+ ,119.01
+ ,-0.008858
+ ,671463
+ ,0.001000
+ ,120.5
+ ,-0.006903
+ ,675917
+ ,0.001000
+ ,123.86
+ ,-0.008876
+ ,680952
+ ,0.001000
+ ,121.49
+ ,-0.003964
+ ,754718
+ ,0.001000
+ ,122.27
+ ,-0.002976
+ ,694413
+ ,0.001000
+ ,118.65
+ ,-0.003976
+ ,699390
+ ,0.001000
+ ,119.27
+ ,-0.001998
+ ,710573
+ ,0.001000
+ ,118.57
+ ,-0.000997
+ ,714217
+ ,0.001000
+ ,119.79
+ ,-0.000994
+ ,702996
+ ,0.001000
+ ,117.26
+ ,-0.001982
+ ,712370
+ ,0.001000
+ ,118.26
+ ,-0.003968
+ ,708445
+ ,0.001000
+ ,118.69
+ ,-0.001992
+ ,707083
+ ,0.001000
+ ,118.83
+ ,-0.002979
+ ,700632
+ ,0.001000
+ ,115.19
+ ,-0.001986
+ ,706309
+ ,0.001000
+ ,109.58
+ ,0.000000
+ ,709523
+ ,0.001000
+ ,109.2
+ ,-0.004975
+ ,769096
+ ,0.001000
+ ,107.9
+ ,-0.003980
+ ,715100
+ ,0.001000
+ ,106.48
+ ,-0.002994
+ ,713872
+ ,0.001000
+ ,106.55
+ ,0.000000
+ ,714032
+ ,0.001000
+ ,108.62
+ ,-0.000998
+ ,732269
+ ,0.001000
+ ,107.25
+ ,-0.003980
+ ,711137
+ ,0.001000
+ ,112.35
+ ,-0.004965
+ ,715284
+ ,0.001000
+ ,109.47
+ ,0.000000
+ ,716888
+ ,0.001000
+ ,109.36
+ ,-0.000998
+ ,716426
+ ,0.001000
+ ,110.35
+ ,-0.001992
+ ,714726
+ ,0.001000
+ ,110.01
+ ,0.000000
+ ,718016
+ ,0.001000
+ ,108.92
+ ,0.004975
+ ,725932
+ ,0.001000
+ ,104.9
+ ,0.008000
+ ,779564
+ ,0.001000
+ ,103.84
+ ,0.001998
+ ,732144
+ ,0.001000
+ ,103.21
+ ,0.002002
+ ,730816
+ ,0.001000
+ ,104.88
+ ,-0.001001
+ ,746719
+ ,0.001000
+ ,105.31
+ ,0.000000
+ ,760065
+ ,0.001000
+ ,107.36
+ ,0.000999
+ ,734516
+ ,0.001000
+ ,106.91
+ ,0.000998
+ ,740167
+ ,0.001000
+ ,108.63
+ ,-0.004980
+ ,740976
+ ,0.001000
+ ,111.93
+ ,-0.002997
+ ,735764
+ ,0.001000
+ ,110.72
+ ,-0.002994
+ ,734711
+ ,0.001000
+ ,111.06
+ ,-0.002985
+ ,737916
+ ,0.001000
+ ,114.82
+ ,-0.007921
+ ,739132
+ ,0.001000
+ ,118.41
+ ,-0.009921
+ ,792705
+ ,0.001000
+ ,118.64
+ ,-0.003988
+ ,747488
+ ,0.001000
+ ,115.45
+ ,-0.000999
+ ,746616
+ ,0.001000
+ ,117.89
+ ,-0.001002
+ ,749781
+ ,0.001000
+ ,117.31
+ ,-0.001998
+ ,760911
+ ,0.001000
+ ,117.11
+ ,-0.000998
+ ,739543
+ ,0.001000
+ ,111.51
+ ,0.000997
+ ,745626
+ ,0.001000
+ ,114.53
+ ,0.005005
+ ,746246
+ ,0.004000
+ ,115.67
+ ,0.003006
+ ,744769
+ ,0.004000
+ ,115.88
+ ,0.009009
+ ,741388
+ ,0.004000
+ ,117.01
+ ,0.005988
+ ,744469
+ ,0.004000
+ ,118.66
+ ,0.003992
+ ,745566
+ ,0.004000
+ ,117.35
+ ,0.003006
+ ,798367
+ ,0.004000
+ ,117.3
+ ,0.003003
+ ,752440
+ ,0.004000
+ ,120.58
+ ,0.000000
+ ,756627
+ ,0.007500
+ ,120.45
+ ,-0.002006
+ ,758941
+ ,0.007500
+ ,117.28
+ ,-0.001001
+ ,771287
+ ,0.007500
+ ,118.83
+ ,0.000000
+ ,749858
+ ,0.007500
+ ,120.73
+ ,0.000000
+ ,758370
+ ,0.007500
+ ,122.62
+ ,-0.001992
+ ,755407
+ ,0.007500
+ ,121.59
+ ,0.000000
+ ,752063
+ ,0.007500
+ ,116.72
+ ,-0.001984
+ ,756298
+ ,0.007500
+ ,115.01
+ ,-0.001984
+ ,755892
+ ,0.007500
+ ,115.74
+ ,0.002982
+ ,758486
+ ,0.007500
+ ,111.21
+ ,0.005994
+ ,812777
+ ,0.007500
+ ,112.34
+ ,0.006986
+ ,762561
+ ,0.007500
+ ,107.66
+ ,0.007000
+ ,763579
+ ,0.007500
+ ,107.16
+ ,0.010050
+ ,764615
+ ,0.007500
+ ,100.79
+ ,0.012024
+ ,773312
+ ,0.007500
+ ,102.49
+ ,0.007992
+ ,755697
+ ,0.007500
+ ,104.14
+ ,0.012948
+ ,762909
+ ,0.007500
+ ,106.9
+ ,0.019960
+ ,760337
+ ,0.007500
+ ,106.81
+ ,0.022977
+ ,759270
+ ,0.007500
+ ,109.28
+ ,0.020875
+ ,754929
+ ,0.007500
+ ,106.75
+ ,0.020875
+ ,766116
+ ,0.005000
+ ,100.33
+ ,0.016848
+ ,765945
+ ,0.005000
+ ,96.81
+ ,0.009930
+ ,814783
+ ,0.003000
+ ,91.28
+ ,0.003964
+ ,768494
+ ,0.003000
+ ,90.41
+ ,0.000000
+ ,769222
+ ,0.003000
+ ,92.5
+ ,-0.000995
+ ,768977
+ ,0.003000
+ ,97.87
+ ,-0.002970
+ ,783341
+ ,0.003000
+ ,99
+ ,-0.000991
+ ,764061
+ ,0.003000
+ ,96.3
+ ,-0.010816
+ ,767394
+ ,0.003000
+ ,96.52
+ ,-0.017613
+ ,763910
+ ,0.003000
+ ,94.5
+ ,-0.022461
+ ,761677
+ ,0.003000
+ ,94.84
+ ,-0.022395
+ ,759173
+ ,0.003000
+ ,91.49
+ ,-0.022395
+ ,762486
+ ,0.003000
+ ,90.29
+ ,-0.025341
+ ,762690
+ ,0.003000
+ ,89.19
+ ,-0.018682
+ ,809542
+ ,0.003000
+ ,89.55
+ ,-0.016782
+ ,769041
+ ,0.003000
+ ,91.16
+ ,-0.012910
+ ,770889
+ ,0.003000
+ ,90.28
+ ,-0.010956
+ ,773527
+ ,0.003000
+ ,90.52
+ ,-0.010924
+ ,789890
+ ,0.003000
+ ,93.38
+ ,-0.011905
+ ,768325
+ ,0.003000
+ ,91.74
+ ,-0.008946
+ ,772712
+ ,0.003000
+ ,90.92
+ ,-0.006972
+ ,772944
+ ,0.003000
+ ,87.72
+ ,-0.008991
+ ,769637
+ ,0.003000
+ ,85.47
+ ,-0.008964
+ ,768546
+ ,0.003000
+ ,84.38
+ ,-0.005976
+ ,775013
+ ,0.003000
+ ,81.87
+ ,0.002000
+ ,776635
+ ,0.003000
+ ,82.48
+ ,0.001002)
+ ,dim=c(4
+ ,215)
+ ,dimnames=list(c('Banknotes'
+ ,'Loan_Interest'
+ ,'Exchange_Rate_USD'
+ ,'Inflation')
+ ,1:215))
> y <- array(NA,dim=c(4,215),dimnames=list(c('Banknotes','Loan_Interest','Exchange_Rate_USD','Inflation'),1:215))
> for (i in 1:dim(x)[1])
+ {
+ for (j in 1:dim(x)[2])
+ {
+ y[i,j] <- as.numeric(x[i,j])
+ }
+ }
> par3 = 'No Linear Trend'
> par2 = 'Do not include Seasonal Dummies'
> par1 = '1'
> #'GNU S' R Code compiled by R2WASP v. 1.0.44 ()
> #Author: Prof. Dr. P. Wessa
> #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/
> #Source of accompanying publication: Office for Research, Development, and Education
> #Technical description: Write here your technical program description (don't use hard returns!)
> library(lattice)
> library(lmtest)
Loading required package: zoo
> n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
> par1 <- as.numeric(par1)
> x <- t(y)
> k <- length(x[1,])
> n <- length(x[,1])
> x1 <- cbind(x[,par1], x[,1:k!=par1])
> mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
> colnames(x1) <- mycolnames #colnames(x)[par1]
> x <- x1
> if (par3 == 'First Differences'){
+ x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
+ for (i in 1:n-1) {
+ for (j in 1:k) {
+ x2[i,j] <- x[i+1,j] - x[i,j]
+ }
+ }
+ x <- x2
+ }
> if (par2 == 'Include Monthly Dummies'){
+ x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
+ for (i in 1:11){
+ x2[seq(i,n,12),i] <- 1
+ }
+ x <- cbind(x, x2)
+ }
> if (par2 == 'Include Quarterly Dummies'){
+ x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
+ for (i in 1:3){
+ x2[seq(i,n,4),i] <- 1
+ }
+ x <- cbind(x, x2)
+ }
> k <- length(x[1,])
> if (par3 == 'Linear Trend'){
+ x <- cbind(x, c(1:n))
+ colnames(x)[k+1] <- 't'
+ }
> x
Banknotes Loan_Interest Exchange_Rate_USD Inflation
1 347553 0.0325 125.01 0.012257
2 353245 0.0250 120.96 0.014315
3 347966 0.0250 117.07 0.012208
4 364343 0.0250 112.45 0.009063
5 341713 0.0250 110.23 0.009054
6 361162 0.0250 107.34 0.009063
7 354400 0.0250 107.73 0.019270
8 345183 0.0250 103.71 0.018200
9 341807 0.0175 105.28 0.015106
10 348712 0.0175 106.92 0.013078
11 349011 0.0175 107.80 0.010081
12 416259 0.0175 109.70 0.011089
13 360289 0.0175 111.51 0.013118
14 367557 0.0175 106.21 0.012097
15 364611 0.0175 105.14 0.013065
16 378688 0.0175 103.53 0.007984
17 351763 0.0175 103.99 0.007976
18 377765 0.0175 102.72 0.004990
19 373212 0.0175 98.50 -0.001990
20 365819 0.0175 99.85 0.000000
21 364686 0.0175 98.81 0.001984
22 363333 0.0175 98.42 0.007944
23 362536 0.0175 97.96 0.009980
24 428803 0.0175 100.13 0.005982
25 375361 0.0175 99.75 0.004980
26 377205 0.0175 98.24 0.001992
27 381266 0.0175 90.79 -0.002976
28 390516 0.0100 83.67 -0.001980
29 366117 0.0100 85.10 -0.000989
30 393928 0.0100 84.53 0.001986
31 387784 0.0100 87.22 0.000997
32 385656 0.0100 94.55 -0.001986
33 385320 0.0050 100.49 0.000990
34 389053 0.0050 100.65 -0.006897
35 390595 0.0050 101.92 -0.006917
36 462440 0.0050 101.85 -0.003964
37 402532 0.0050 105.84 -0.004955
38 409070 0.0050 105.73 -0.003976
39 421329 0.0050 105.85 -0.000995
40 428841 0.0050 107.46 0.001984
41 404864 0.0050 106.51 0.001980
42 432633 0.0050 108.86 0.000000
43 416886 0.0050 109.32 0.003984
44 414893 0.0050 107.75 0.001990
45 417914 0.0050 109.75 0.000000
46 417518 0.0050 112.36 0.004960
47 423137 0.0050 112.26 0.004975
48 506710 0.0050 113.81 0.005970
49 436264 0.0050 118.02 0.005976
50 443712 0.0050 123.01 0.005988
51 452849 0.0050 122.64 0.004980
52 453009 0.0050 125.51 0.019802
53 437876 0.0050 118.99 0.019763
54 460041 0.0050 114.20 0.022795
55 450426 0.0050 115.16 0.019841
56 447873 0.0050 117.90 0.021847
57 444955 0.0050 120.74 0.024728
58 452043 0.0050 121.06 0.025666
59 480877 0.0050 125.27 0.021782
60 546696 0.0050 129.47 0.018793
61 483668 0.0050 129.45 0.018812
62 489627 0.0050 126.00 0.019841
63 490007 0.0050 128.69 0.022795
64 496590 0.0050 131.67 0.003883
65 480846 0.0050 135.00 0.004845
66 497677 0.0050 140.57 0.000969
67 492795 0.0050 140.73 -0.000973
68 488495 0.0050 144.67 -0.002915
69 486769 0.0050 134.59 -0.001931
70 494455 0.0050 121.30 0.001925
71 498054 0.0050 120.58 0.007752
72 558648 0.0050 117.54 0.005825
73 506424 0.0050 113.18 0.001944
74 512528 0.0050 116.66 -0.000973
75 512866 0.0050 119.78 -0.003876
76 529324 0.0050 119.81 -0.000967
77 508431 0.0050 122.11 -0.003857
78 523026 0.0050 120.90 -0.002904
79 521355 0.0050 119.86 -0.000974
80 514103 0.0050 113.40 0.002924
81 513885 0.0050 107.57 -0.001934
82 522150 0.0050 105.97 -0.006724
83 527384 0.0050 104.96 -0.011538
84 654047 0.0050 102.68 -0.010618
85 543115 0.0050 105.16 -0.006790
86 543200 0.0050 109.34 -0.006816
87 571201 0.0050 106.71 -0.005837
88 568892 0.0050 105.48 -0.007744
89 537223 0.0050 108.11 -0.006776
90 553186 0.0050 106.23 -0.005825
91 550954 0.0050 107.90 -0.005848
92 543433 0.0050 108.07 -0.004859
93 557195 0.0050 106.75 -0.009690
94 565522 0.0050 108.36 -0.011605
95 571691 0.0050 108.89 -0.008755
96 633972 0.0050 112.21 -0.004878
97 575265 0.0050 117.10 -0.003906
98 572364 0.0035 116.04 -0.002941
99 586744 0.0025 121.12 -0.006849
100 600389 0.0025 123.83 -0.007805
101 578540 0.0025 121.93 -0.007797
102 610778 0.0025 122.15 -0.008789
103 596577 0.0025 124.68 -0.007843
104 590558 0.0025 121.61 -0.007813
105 597294 0.0010 118.98 -0.007828
106 602384 0.0010 121.28 -0.007828
107 614190 0.0010 122.31 -0.009814
108 690042 0.0010 127.36 -0.011765
109 639497 0.0010 132.66 -0.013725
110 649304 0.0010 133.52 -0.015733
111 678762 0.0010 131.20 -0.011823
112 691885 0.0010 131.07 -0.010816
113 667973 0.0010 126.48 -0.008841
114 682032 0.0010 123.60 -0.006897
115 672651 0.0010 118.07 -0.007905
116 671865 0.0010 119.01 -0.008858
117 671463 0.0010 120.50 -0.006903
118 675917 0.0010 123.86 -0.008876
119 680952 0.0010 121.49 -0.003964
120 754718 0.0010 122.27 -0.002976
121 694413 0.0010 118.65 -0.003976
122 699390 0.0010 119.27 -0.001998
123 710573 0.0010 118.57 -0.000997
124 714217 0.0010 119.79 -0.000994
125 702996 0.0010 117.26 -0.001982
126 712370 0.0010 118.26 -0.003968
127 708445 0.0010 118.69 -0.001992
128 707083 0.0010 118.83 -0.002979
129 700632 0.0010 115.19 -0.001986
130 706309 0.0010 109.58 0.000000
131 709523 0.0010 109.20 -0.004975
132 769096 0.0010 107.90 -0.003980
133 715100 0.0010 106.48 -0.002994
134 713872 0.0010 106.55 0.000000
135 714032 0.0010 108.62 -0.000998
136 732269 0.0010 107.25 -0.003980
137 711137 0.0010 112.35 -0.004965
138 715284 0.0010 109.47 0.000000
139 716888 0.0010 109.36 -0.000998
140 716426 0.0010 110.35 -0.001992
141 714726 0.0010 110.01 0.000000
142 718016 0.0010 108.92 0.004975
143 725932 0.0010 104.90 0.008000
144 779564 0.0010 103.84 0.001998
145 732144 0.0010 103.21 0.002002
146 730816 0.0010 104.88 -0.001001
147 746719 0.0010 105.31 0.000000
148 760065 0.0010 107.36 0.000999
149 734516 0.0010 106.91 0.000998
150 740167 0.0010 108.63 -0.004980
151 740976 0.0010 111.93 -0.002997
152 735764 0.0010 110.72 -0.002994
153 734711 0.0010 111.06 -0.002985
154 737916 0.0010 114.82 -0.007921
155 739132 0.0010 118.41 -0.009921
156 792705 0.0010 118.64 -0.003988
157 747488 0.0010 115.45 -0.000999
158 746616 0.0010 117.89 -0.001002
159 749781 0.0010 117.31 -0.001998
160 760911 0.0010 117.11 -0.000998
161 739543 0.0010 111.51 0.000997
162 745626 0.0010 114.53 0.005005
163 746246 0.0040 115.67 0.003006
164 744769 0.0040 115.88 0.009009
165 741388 0.0040 117.01 0.005988
166 744469 0.0040 118.66 0.003992
167 745566 0.0040 117.35 0.003006
168 798367 0.0040 117.30 0.003003
169 752440 0.0040 120.58 0.000000
170 756627 0.0075 120.45 -0.002006
171 758941 0.0075 117.28 -0.001001
172 771287 0.0075 118.83 0.000000
173 749858 0.0075 120.73 0.000000
174 758370 0.0075 122.62 -0.001992
175 755407 0.0075 121.59 0.000000
176 752063 0.0075 116.72 -0.001984
177 756298 0.0075 115.01 -0.001984
178 755892 0.0075 115.74 0.002982
179 758486 0.0075 111.21 0.005994
180 812777 0.0075 112.34 0.006986
181 762561 0.0075 107.66 0.007000
182 763579 0.0075 107.16 0.010050
183 764615 0.0075 100.79 0.012024
184 773312 0.0075 102.49 0.007992
185 755697 0.0075 104.14 0.012948
186 762909 0.0075 106.90 0.019960
187 760337 0.0075 106.81 0.022977
188 759270 0.0075 109.28 0.020875
189 754929 0.0075 106.75 0.020875
190 766116 0.0050 100.33 0.016848
191 765945 0.0050 96.81 0.009930
192 814783 0.0030 91.28 0.003964
193 768494 0.0030 90.41 0.000000
194 769222 0.0030 92.50 -0.000995
195 768977 0.0030 97.87 -0.002970
196 783341 0.0030 99.00 -0.000991
197 764061 0.0030 96.30 -0.010816
198 767394 0.0030 96.52 -0.017613
199 763910 0.0030 94.50 -0.022461
200 761677 0.0030 94.84 -0.022395
201 759173 0.0030 91.49 -0.022395
202 762486 0.0030 90.29 -0.025341
203 762690 0.0030 89.19 -0.018682
204 809542 0.0030 89.55 -0.016782
205 769041 0.0030 91.16 -0.012910
206 770889 0.0030 90.28 -0.010956
207 773527 0.0030 90.52 -0.010924
208 789890 0.0030 93.38 -0.011905
209 768325 0.0030 91.74 -0.008946
210 772712 0.0030 90.92 -0.006972
211 772944 0.0030 87.72 -0.008991
212 769637 0.0030 85.47 -0.008964
213 768546 0.0030 84.38 -0.005976
214 775013 0.0030 81.87 0.002000
215 776635 0.0030 82.48 0.001002
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Loan_Interest Exchange_Rate_USD Inflation
952696 -17024358 -2262 -583456
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-254887 -74202 17946 70822 245940
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 9.527e+05 7.840e+04 12.151 < 2e-16 ***
Loan_Interest -1.702e+07 1.499e+06 -11.356 < 2e-16 ***
Exchange_Rate_USD -2.262e+03 6.814e+02 -3.319 0.00106 **
Inflation -5.835e+05 9.447e+05 -0.618 0.53751
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 113200 on 211 degrees of freedom
Multiple R-squared: 0.4629, Adjusted R-squared: 0.4552
F-statistic: 60.61 on 3 and 211 DF, p-value: < 2.2e-16
> if (n > n25) {
+ kp3 <- k + 3
+ nmkm3 <- n - k - 3
+ gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
+ numgqtests <- 0
+ numsignificant1 <- 0
+ numsignificant5 <- 0
+ numsignificant10 <- 0
+ for (mypoint in kp3:nmkm3) {
+ j <- 0
+ numgqtests <- numgqtests + 1
+ for (myalt in c('greater', 'two.sided', 'less')) {
+ j <- j + 1
+ gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
+ }
+ if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
+ if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
+ if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
+ }
+ gqarr
+ }
[,1] [,2] [,3]
[1,] 1.156715e-03 2.313429e-03 9.988433e-01
[2,] 1.183763e-04 2.367525e-04 9.998816e-01
[3,] 1.408408e-05 2.816816e-05 9.999859e-01
[4,] 1.058607e-06 2.117213e-06 9.999989e-01
[5,] 7.421328e-08 1.484266e-07 9.999999e-01
[6,] 2.080191e-05 4.160381e-05 9.999792e-01
[7,] 3.794080e-06 7.588161e-06 9.999962e-01
[8,] 6.584548e-07 1.316910e-06 9.999993e-01
[9,] 1.074915e-07 2.149830e-07 9.999999e-01
[10,] 1.928498e-08 3.856996e-08 1.000000e+00
[11,] 4.467472e-09 8.934945e-09 1.000000e+00
[12,] 7.322174e-10 1.464435e-09 1.000000e+00
[13,] 1.094575e-10 2.189150e-10 1.000000e+00
[14,] 1.697343e-11 3.394686e-11 1.000000e+00
[15,] 2.419092e-12 4.838184e-12 1.000000e+00
[16,] 3.233142e-13 6.466285e-13 1.000000e+00
[17,] 4.215719e-14 8.431438e-14 1.000000e+00
[18,] 1.987561e-12 3.975122e-12 1.000000e+00
[19,] 3.363223e-13 6.726446e-13 1.000000e+00
[20,] 5.516466e-14 1.103293e-13 1.000000e+00
[21,] 8.793757e-15 1.758751e-14 1.000000e+00
[22,] 1.587921e-15 3.175841e-15 1.000000e+00
[23,] 5.795710e-16 1.159142e-15 1.000000e+00
[24,] 1.349114e-16 2.698229e-16 1.000000e+00
[25,] 2.700514e-17 5.401028e-17 1.000000e+00
[26,] 5.389672e-18 1.077934e-17 1.000000e+00
[27,] 1.446305e-18 2.892609e-18 1.000000e+00
[28,] 4.087215e-19 8.174429e-19 1.000000e+00
[29,] 1.111879e-19 2.223758e-19 1.000000e+00
[30,] 8.890248e-18 1.778050e-17 1.000000e+00
[31,] 2.833336e-18 5.666671e-18 1.000000e+00
[32,] 9.038628e-19 1.807726e-18 1.000000e+00
[33,] 4.013728e-19 8.027455e-19 1.000000e+00
[34,] 2.441692e-19 4.883384e-19 1.000000e+00
[35,] 8.989909e-20 1.797982e-19 1.000000e+00
[36,] 5.278794e-20 1.055759e-19 1.000000e+00
[37,] 2.025425e-20 4.050849e-20 1.000000e+00
[38,] 8.339899e-21 1.667980e-20 1.000000e+00
[39,] 3.418690e-21 6.837381e-21 1.000000e+00
[40,] 1.376025e-21 2.752049e-21 1.000000e+00
[41,] 6.303355e-22 1.260671e-21 1.000000e+00
[42,] 1.115389e-18 2.230778e-18 1.000000e+00
[43,] 4.754896e-19 9.509792e-19 1.000000e+00
[44,] 1.806103e-19 3.612206e-19 1.000000e+00
[45,] 8.113556e-20 1.622711e-19 1.000000e+00
[46,] 3.245243e-20 6.490485e-20 1.000000e+00
[47,] 1.438901e-20 2.877802e-20 1.000000e+00
[48,] 1.432349e-20 2.864698e-20 1.000000e+00
[49,] 9.244663e-21 1.848933e-20 1.000000e+00
[50,] 5.467714e-21 1.093543e-20 1.000000e+00
[51,] 3.432414e-21 6.864828e-21 1.000000e+00
[52,] 2.466943e-21 4.933886e-21 1.000000e+00
[53,] 2.919289e-21 5.838577e-21 1.000000e+00
[54,] 6.749012e-19 1.349802e-18 1.000000e+00
[55,] 4.492307e-19 8.984615e-19 1.000000e+00
[56,] 4.927165e-19 9.854329e-19 1.000000e+00
[57,] 4.888908e-19 9.777816e-19 1.000000e+00
[58,] 4.134474e-19 8.268949e-19 1.000000e+00
[59,] 1.915298e-19 3.830597e-19 1.000000e+00
[60,] 7.507845e-20 1.501569e-19 1.000000e+00
[61,] 2.672854e-20 5.345708e-20 1.000000e+00
[62,] 8.857415e-21 1.771483e-20 1.000000e+00
[63,] 4.044099e-21 8.088199e-21 1.000000e+00
[64,] 1.004869e-20 2.009737e-20 1.000000e+00
[65,] 3.832311e-20 7.664622e-20 1.000000e+00
[66,] 4.221563e-17 8.443126e-17 1.000000e+00
[67,] 4.036915e-16 8.073830e-16 1.000000e+00
[68,] 2.325954e-15 4.651908e-15 1.000000e+00
[69,] 6.813723e-15 1.362745e-14 1.000000e+00
[70,] 3.957166e-14 7.914332e-14 1.000000e+00
[71,] 6.698670e-14 1.339734e-13 1.000000e+00
[72,] 1.959005e-13 3.918009e-13 1.000000e+00
[73,] 6.657476e-13 1.331495e-12 1.000000e+00
[74,] 5.867681e-12 1.173536e-11 1.000000e+00
[75,] 7.724868e-11 1.544974e-10 1.000000e+00
[76,] 9.372400e-10 1.874480e-09 1.000000e+00
[77,] 8.090166e-09 1.618033e-08 1.000000e+00
[78,] 1.625156e-05 3.250312e-05 9.999837e-01
[79,] 7.584179e-05 1.516836e-04 9.999242e-01
[80,] 2.416879e-04 4.833757e-04 9.997583e-01
[81,] 1.131179e-03 2.262359e-03 9.988688e-01
[82,] 4.068182e-03 8.136364e-03 9.959318e-01
[83,] 1.143541e-02 2.287082e-02 9.885646e-01
[84,] 3.463691e-02 6.927381e-02 9.653631e-01
[85,] 8.886363e-02 1.777273e-01 9.111364e-01
[86,] 2.171718e-01 4.343436e-01 7.828282e-01
[87,] 4.060691e-01 8.121382e-01 5.939309e-01
[88,] 6.125862e-01 7.748276e-01 3.874138e-01
[89,] 8.209330e-01 3.581340e-01 1.790670e-01
[90,] 9.360230e-01 1.279540e-01 6.397702e-02
[91,] 9.827228e-01 3.455431e-02 1.727715e-02
[92,] 9.971906e-01 5.618769e-03 2.809384e-03
[93,] 9.991838e-01 1.632461e-03 8.162303e-04
[94,] 9.996902e-01 6.196449e-04 3.098225e-04
[95,] 9.999598e-01 8.047763e-05 4.023882e-05
[96,] 9.999905e-01 1.909589e-05 9.547947e-06
[97,] 9.999988e-01 2.488792e-06 1.244396e-06
[98,] 1.000000e+00 7.186855e-08 3.593427e-08
[99,] 1.000000e+00 1.385486e-09 6.927428e-10
[100,] 1.000000e+00 1.775855e-11 8.879276e-12
[101,] 1.000000e+00 2.730772e-13 1.365386e-13
[102,] 1.000000e+00 1.690118e-13 8.450590e-14
[103,] 1.000000e+00 7.435368e-14 3.717684e-14
[104,] 1.000000e+00 5.081239e-14 2.540620e-14
[105,] 1.000000e+00 5.104922e-14 2.552461e-14
[106,] 1.000000e+00 4.838599e-14 2.419300e-14
[107,] 1.000000e+00 1.999924e-14 9.999618e-15
[108,] 1.000000e+00 6.683218e-15 3.341609e-15
[109,] 1.000000e+00 7.454991e-16 3.727496e-16
[110,] 1.000000e+00 8.806859e-17 4.403430e-17
[111,] 1.000000e+00 9.183689e-18 4.591845e-18
[112,] 1.000000e+00 2.063368e-18 1.031684e-18
[113,] 1.000000e+00 2.545337e-19 1.272668e-19
[114,] 1.000000e+00 5.316655e-21 2.658328e-21
[115,] 1.000000e+00 1.046861e-21 5.234305e-22
[116,] 1.000000e+00 2.427350e-22 1.213675e-22
[117,] 1.000000e+00 6.643115e-23 3.321557e-23
[118,] 1.000000e+00 2.567119e-23 1.283559e-23
[119,] 1.000000e+00 7.451687e-24 3.725843e-24
[120,] 1.000000e+00 4.079135e-24 2.039568e-24
[121,] 1.000000e+00 2.003554e-24 1.001777e-24
[122,] 1.000000e+00 1.082914e-24 5.414569e-25
[123,] 1.000000e+00 2.571198e-25 1.285599e-25
[124,] 1.000000e+00 3.611215e-26 1.805607e-26
[125,] 1.000000e+00 8.258830e-27 4.129415e-27
[126,] 1.000000e+00 9.022788e-28 4.511394e-28
[127,] 1.000000e+00 2.570866e-28 1.285433e-28
[128,] 1.000000e+00 6.278468e-29 3.139234e-29
[129,] 1.000000e+00 2.134899e-29 1.067449e-29
[130,] 1.000000e+00 1.922403e-29 9.612013e-30
[131,] 1.000000e+00 8.881523e-30 4.440761e-30
[132,] 1.000000e+00 3.553955e-30 1.776978e-30
[133,] 1.000000e+00 1.573225e-30 7.866126e-31
[134,] 1.000000e+00 7.036197e-31 3.518098e-31
[135,] 1.000000e+00 2.196836e-31 1.098418e-31
[136,] 1.000000e+00 6.733561e-32 3.366780e-32
[137,] 1.000000e+00 2.431909e-32 1.215955e-32
[138,] 1.000000e+00 7.427910e-33 3.713955e-33
[139,] 1.000000e+00 5.796285e-33 2.898143e-33
[140,] 1.000000e+00 4.693838e-33 2.346919e-33
[141,] 1.000000e+00 1.004747e-32 5.023736e-33
[142,] 1.000000e+00 2.167557e-32 1.083778e-32
[143,] 1.000000e+00 2.909692e-32 1.454846e-32
[144,] 1.000000e+00 6.762521e-32 3.381260e-32
[145,] 1.000000e+00 1.819471e-31 9.097356e-32
[146,] 1.000000e+00 3.304958e-31 1.652479e-31
[147,] 1.000000e+00 5.193971e-31 2.596985e-31
[148,] 1.000000e+00 1.273522e-30 6.367608e-31
[149,] 1.000000e+00 3.776613e-30 1.888307e-30
[150,] 1.000000e+00 2.300597e-31 1.150299e-31
[151,] 1.000000e+00 9.277799e-31 4.638900e-31
[152,] 1.000000e+00 3.884927e-30 1.942463e-30
[153,] 1.000000e+00 1.688855e-29 8.444276e-30
[154,] 1.000000e+00 5.320782e-29 2.660391e-29
[155,] 1.000000e+00 1.387728e-28 6.938640e-29
[156,] 1.000000e+00 4.643508e-28 2.321754e-28
[157,] 1.000000e+00 1.154450e-27 5.772249e-28
[158,] 1.000000e+00 2.189934e-27 1.094967e-27
[159,] 1.000000e+00 2.935390e-27 1.467695e-27
[160,] 1.000000e+00 4.098257e-27 2.049128e-27
[161,] 1.000000e+00 3.550004e-27 1.775002e-27
[162,] 1.000000e+00 1.379771e-27 6.898853e-28
[163,] 1.000000e+00 3.762691e-27 1.881345e-27
[164,] 1.000000e+00 1.457145e-26 7.285727e-27
[165,] 1.000000e+00 5.732452e-26 2.866226e-26
[166,] 1.000000e+00 1.471009e-25 7.355047e-26
[167,] 1.000000e+00 5.411016e-25 2.705508e-25
[168,] 1.000000e+00 2.526268e-24 1.263134e-24
[169,] 1.000000e+00 1.130738e-23 5.653690e-24
[170,] 1.000000e+00 4.617544e-23 2.308772e-23
[171,] 1.000000e+00 2.098189e-22 1.049094e-22
[172,] 1.000000e+00 8.307579e-22 4.153789e-22
[173,] 1.000000e+00 3.373882e-21 1.686941e-21
[174,] 1.000000e+00 9.894004e-24 4.947002e-24
[175,] 1.000000e+00 5.428086e-23 2.714043e-23
[176,] 1.000000e+00 2.934891e-22 1.467446e-22
[177,] 1.000000e+00 1.596933e-21 7.984666e-22
[178,] 1.000000e+00 2.899811e-21 1.449905e-21
[179,] 1.000000e+00 1.973146e-20 9.865730e-21
[180,] 1.000000e+00 1.181975e-19 5.909877e-20
[181,] 1.000000e+00 8.066591e-19 4.033296e-19
[182,] 1.000000e+00 5.402230e-18 2.701115e-18
[183,] 1.000000e+00 3.641966e-17 1.820983e-17
[184,] 1.000000e+00 2.797131e-16 1.398566e-16
[185,] 1.000000e+00 2.198563e-15 1.099282e-15
[186,] 1.000000e+00 3.314901e-16 1.657450e-16
[187,] 1.000000e+00 2.720109e-15 1.360055e-15
[188,] 1.000000e+00 2.249731e-14 1.124866e-14
[189,] 1.000000e+00 1.743441e-13 8.717207e-14
[190,] 1.000000e+00 1.447160e-12 7.235798e-13
[191,] 1.000000e+00 1.040604e-11 5.203021e-12
[192,] 1.000000e+00 8.926847e-11 4.463423e-11
[193,] 1.000000e+00 7.332279e-10 3.666140e-10
[194,] 1.000000e+00 4.977276e-09 2.488638e-09
[195,] 1.000000e+00 2.900781e-08 1.450390e-08
[196,] 9.999999e-01 1.619390e-07 8.096950e-08
[197,] 9.999998e-01 3.867654e-07 1.933827e-07
[198,] 1.000000e+00 3.172889e-08 1.586444e-08
[199,] 9.999998e-01 4.871263e-07 2.435632e-07
[200,] 9.999962e-01 7.571150e-06 3.785575e-06
[201,] 9.999407e-01 1.186642e-04 5.933208e-05
[202,] 9.999776e-01 4.487866e-05 2.243933e-05
> postscript(file="/var/www/wessaorg/rcomp/tmp/1v78b1293642378.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
> points(x[,1]-mysum$resid)
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/wessaorg/rcomp/tmp/2v78b1293642378.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/wessaorg/rcomp/tmp/35g7w1293642378.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/wessaorg/rcomp/tmp/45g7w1293642378.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
> dev.off()
null device
1
> postscript(file="/var/www/wessaorg/rcomp/tmp/55g7w1293642378.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
> qqline(mysum$resid)
> grid()
> dev.off()
null device
1
> (myerror <- as.ts(mysum$resid))
Time Series:
Start = 1
End = 215
Frequency = 1
1 2 3 4 5 6
238057.8859 108107.3389 92800.2864 96892.4346 69235.8113 82153.2310
7 8 9 10 11 12
82228.6995 63294.6465 -66018.1038 -56586.8704 -56046.0343 16087.6602
13 14 15 16 17 18
-34604.5059 -39920.1751 -44721.6006 -37250.7664 -63139.9695 -41752.7560
19 20 21 22 23 24
-59923.4098 -63101.7952 -65429.5731 -64187.3082 -64836.8563 4005.7648
25 26 27 28 29 30
-50880.3722 -54195.1766 -69883.7874 -203839.9343 -224426.2419 -196168.7315
31 32 33 34 35 36
-196805.3140 -184094.1875 -254380.0510 -254886.8679 -250483.9502 -177074.3361
37 38 39 40 41 42
-228535.6424 -221675.2457 -207405.5378 -194513.7966 -220641.9158 -188712.7422
43 44 45 46 47 48
-201094.7889 -207802.3508 -201418.6695 -193017.2226 -187615.6587 -99956.2069
49 50 51 52 53 54
-160876.1941 -142134.4146 -134422.4336 -119122.8548 -149026.0631 -135926.4266
55 56 57 58 59 60
-145093.5515 -140278.5893 -135091.9151 -126732.8320 -90642.4630 -17067.5197
61 62 63 64 65 66
-80129.6716 -81373.7792 -73185.7946 -70896.7142 -78547.3712 -51379.1786
67 68 69 70 71 72
-57032.3495 -53553.6164 -77505.2397 -97629.8101 -92259.5650 -39665.9980
73 74 75 76 77 78
-104016.1848 -91742.7858 -86041.4950 -67818.3651 -85195.2304 -72781.0709
79 80 81 82 83 84
-75678.3553 -95267.7845 -111506.9705 -109655.7317 -109514.9871 12527.7074
85 86 87 88 89 90
-90561.3621 -81036.8762 -58413.4155 -64617.1778 -89772.6496 -77507.1162
91 92 93 94 95 96
-75975.1971 -82534.6396 -74576.9964 -63725.6888 -54695.0432 17357.4553
97 98 99 100 101 102
-29721.8354 -59993.9301 -53428.0874 -34211.1782 -60353.0814 -28196.2563
103 104 105 106 107 108
-36122.7521 -49068.2181 -73826.2502 -63533.9277 -50556.9356 35579.2325
109 110 111 112 113 114
-4121.3806 6459.2560 32951.0088 46367.5047 13225.8041 21904.8300
115 116 117 118 119 120
-572.4866 211.6464 4320.5032 15223.2592 17763.5410 93870.2614
121 122 123 124 125 126
24793.8021 32327.2433 42510.9672 48916.2104 31396.2011 41873.3368
127 128 129 130 131 132
40073.8540 38452.6460 24347.7770 18494.3774 17946.1696 75159.2651
133 134 135 136 137 138
18526.6840 19203.8829 23463.6841 36862.0435 26690.9241 27220.5706
139 140 141 142 143 144
27993.4748 29190.7801 27883.9855 31611.2306 32199.4300 79931.9349
145 146 147 148 149 150
31089.2848 31786.5049 49246.1525 67811.8777 41244.4486 47297.9810
151 152 153 154 155 156
56728.1762 48781.0526 48502.3426 57332.0702 65501.3051 123056.1818
157 158 159 160 161 162
72367.7367 77012.9720 78284.9598 89546.0399 56675.5102 71927.8776
163 164 165 166 167 168
125033.1667 127533.6478 124945.9508 130594.4736 128153.1240 180839.2797
169 170 171 172 173 174
140579.1256 202886.9229 198617.1386 215053.0911 197921.6619 209546.3695
175 176 177 178 179 180
205415.8781 189898.9489 190266.1352 194408.7497 188513.8057 245939.5177
181 182 183 184 185 186
185146.0907 186812.6918 174592.2624 184781.9627 173790.6716 191336.6522
187 188 189 190 191 192
190321.3699 193614.7874 183551.2326 135306.4937 123137.3297 121937.5214
193 194 195 196 197 198
71367.8668 76242.6559 86991.6225 105066.2056 73946.6760 73811.5390
199 200 201 202 203 204
62929.9479 61504.4950 51423.1991 50303.0825 51904.2488 100679.0917
205 206 207 208 209 210
66078.8592 67076.4784 70276.0000 92535.6047 68987.5688 72671.5699
211 212 213 214 215
64487.5583 56107.0830 54294.0011 59737.3290 62156.7863
> postscript(file="/var/www/wessaorg/rcomp/tmp/6g76h1293642378.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> dum <- cbind(lag(myerror,k=1),myerror)
> dum
Time Series:
Start = 0
End = 215
Frequency = 1
lag(myerror, k = 1) myerror
0 238057.8859 NA
1 108107.3389 238057.8859
2 92800.2864 108107.3389
3 96892.4346 92800.2864
4 69235.8113 96892.4346
5 82153.2310 69235.8113
6 82228.6995 82153.2310
7 63294.6465 82228.6995
8 -66018.1038 63294.6465
9 -56586.8704 -66018.1038
10 -56046.0343 -56586.8704
11 16087.6602 -56046.0343
12 -34604.5059 16087.6602
13 -39920.1751 -34604.5059
14 -44721.6006 -39920.1751
15 -37250.7664 -44721.6006
16 -63139.9695 -37250.7664
17 -41752.7560 -63139.9695
18 -59923.4098 -41752.7560
19 -63101.7952 -59923.4098
20 -65429.5731 -63101.7952
21 -64187.3082 -65429.5731
22 -64836.8563 -64187.3082
23 4005.7648 -64836.8563
24 -50880.3722 4005.7648
25 -54195.1766 -50880.3722
26 -69883.7874 -54195.1766
27 -203839.9343 -69883.7874
28 -224426.2419 -203839.9343
29 -196168.7315 -224426.2419
30 -196805.3140 -196168.7315
31 -184094.1875 -196805.3140
32 -254380.0510 -184094.1875
33 -254886.8679 -254380.0510
34 -250483.9502 -254886.8679
35 -177074.3361 -250483.9502
36 -228535.6424 -177074.3361
37 -221675.2457 -228535.6424
38 -207405.5378 -221675.2457
39 -194513.7966 -207405.5378
40 -220641.9158 -194513.7966
41 -188712.7422 -220641.9158
42 -201094.7889 -188712.7422
43 -207802.3508 -201094.7889
44 -201418.6695 -207802.3508
45 -193017.2226 -201418.6695
46 -187615.6587 -193017.2226
47 -99956.2069 -187615.6587
48 -160876.1941 -99956.2069
49 -142134.4146 -160876.1941
50 -134422.4336 -142134.4146
51 -119122.8548 -134422.4336
52 -149026.0631 -119122.8548
53 -135926.4266 -149026.0631
54 -145093.5515 -135926.4266
55 -140278.5893 -145093.5515
56 -135091.9151 -140278.5893
57 -126732.8320 -135091.9151
58 -90642.4630 -126732.8320
59 -17067.5197 -90642.4630
60 -80129.6716 -17067.5197
61 -81373.7792 -80129.6716
62 -73185.7946 -81373.7792
63 -70896.7142 -73185.7946
64 -78547.3712 -70896.7142
65 -51379.1786 -78547.3712
66 -57032.3495 -51379.1786
67 -53553.6164 -57032.3495
68 -77505.2397 -53553.6164
69 -97629.8101 -77505.2397
70 -92259.5650 -97629.8101
71 -39665.9980 -92259.5650
72 -104016.1848 -39665.9980
73 -91742.7858 -104016.1848
74 -86041.4950 -91742.7858
75 -67818.3651 -86041.4950
76 -85195.2304 -67818.3651
77 -72781.0709 -85195.2304
78 -75678.3553 -72781.0709
79 -95267.7845 -75678.3553
80 -111506.9705 -95267.7845
81 -109655.7317 -111506.9705
82 -109514.9871 -109655.7317
83 12527.7074 -109514.9871
84 -90561.3621 12527.7074
85 -81036.8762 -90561.3621
86 -58413.4155 -81036.8762
87 -64617.1778 -58413.4155
88 -89772.6496 -64617.1778
89 -77507.1162 -89772.6496
90 -75975.1971 -77507.1162
91 -82534.6396 -75975.1971
92 -74576.9964 -82534.6396
93 -63725.6888 -74576.9964
94 -54695.0432 -63725.6888
95 17357.4553 -54695.0432
96 -29721.8354 17357.4553
97 -59993.9301 -29721.8354
98 -53428.0874 -59993.9301
99 -34211.1782 -53428.0874
100 -60353.0814 -34211.1782
101 -28196.2563 -60353.0814
102 -36122.7521 -28196.2563
103 -49068.2181 -36122.7521
104 -73826.2502 -49068.2181
105 -63533.9277 -73826.2502
106 -50556.9356 -63533.9277
107 35579.2325 -50556.9356
108 -4121.3806 35579.2325
109 6459.2560 -4121.3806
110 32951.0088 6459.2560
111 46367.5047 32951.0088
112 13225.8041 46367.5047
113 21904.8300 13225.8041
114 -572.4866 21904.8300
115 211.6464 -572.4866
116 4320.5032 211.6464
117 15223.2592 4320.5032
118 17763.5410 15223.2592
119 93870.2614 17763.5410
120 24793.8021 93870.2614
121 32327.2433 24793.8021
122 42510.9672 32327.2433
123 48916.2104 42510.9672
124 31396.2011 48916.2104
125 41873.3368 31396.2011
126 40073.8540 41873.3368
127 38452.6460 40073.8540
128 24347.7770 38452.6460
129 18494.3774 24347.7770
130 17946.1696 18494.3774
131 75159.2651 17946.1696
132 18526.6840 75159.2651
133 19203.8829 18526.6840
134 23463.6841 19203.8829
135 36862.0435 23463.6841
136 26690.9241 36862.0435
137 27220.5706 26690.9241
138 27993.4748 27220.5706
139 29190.7801 27993.4748
140 27883.9855 29190.7801
141 31611.2306 27883.9855
142 32199.4300 31611.2306
143 79931.9349 32199.4300
144 31089.2848 79931.9349
145 31786.5049 31089.2848
146 49246.1525 31786.5049
147 67811.8777 49246.1525
148 41244.4486 67811.8777
149 47297.9810 41244.4486
150 56728.1762 47297.9810
151 48781.0526 56728.1762
152 48502.3426 48781.0526
153 57332.0702 48502.3426
154 65501.3051 57332.0702
155 123056.1818 65501.3051
156 72367.7367 123056.1818
157 77012.9720 72367.7367
158 78284.9598 77012.9720
159 89546.0399 78284.9598
160 56675.5102 89546.0399
161 71927.8776 56675.5102
162 125033.1667 71927.8776
163 127533.6478 125033.1667
164 124945.9508 127533.6478
165 130594.4736 124945.9508
166 128153.1240 130594.4736
167 180839.2797 128153.1240
168 140579.1256 180839.2797
169 202886.9229 140579.1256
170 198617.1386 202886.9229
171 215053.0911 198617.1386
172 197921.6619 215053.0911
173 209546.3695 197921.6619
174 205415.8781 209546.3695
175 189898.9489 205415.8781
176 190266.1352 189898.9489
177 194408.7497 190266.1352
178 188513.8057 194408.7497
179 245939.5177 188513.8057
180 185146.0907 245939.5177
181 186812.6918 185146.0907
182 174592.2624 186812.6918
183 184781.9627 174592.2624
184 173790.6716 184781.9627
185 191336.6522 173790.6716
186 190321.3699 191336.6522
187 193614.7874 190321.3699
188 183551.2326 193614.7874
189 135306.4937 183551.2326
190 123137.3297 135306.4937
191 121937.5214 123137.3297
192 71367.8668 121937.5214
193 76242.6559 71367.8668
194 86991.6225 76242.6559
195 105066.2056 86991.6225
196 73946.6760 105066.2056
197 73811.5390 73946.6760
198 62929.9479 73811.5390
199 61504.4950 62929.9479
200 51423.1991 61504.4950
201 50303.0825 51423.1991
202 51904.2488 50303.0825
203 100679.0917 51904.2488
204 66078.8592 100679.0917
205 67076.4784 66078.8592
206 70276.0000 67076.4784
207 92535.6047 70276.0000
208 68987.5688 92535.6047
209 72671.5699 68987.5688
210 64487.5583 72671.5699
211 56107.0830 64487.5583
212 54294.0011 56107.0830
213 59737.3290 54294.0011
214 62156.7863 59737.3290
215 NA 62156.7863
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 108107.3389 238057.8859
[2,] 92800.2864 108107.3389
[3,] 96892.4346 92800.2864
[4,] 69235.8113 96892.4346
[5,] 82153.2310 69235.8113
[6,] 82228.6995 82153.2310
[7,] 63294.6465 82228.6995
[8,] -66018.1038 63294.6465
[9,] -56586.8704 -66018.1038
[10,] -56046.0343 -56586.8704
[11,] 16087.6602 -56046.0343
[12,] -34604.5059 16087.6602
[13,] -39920.1751 -34604.5059
[14,] -44721.6006 -39920.1751
[15,] -37250.7664 -44721.6006
[16,] -63139.9695 -37250.7664
[17,] -41752.7560 -63139.9695
[18,] -59923.4098 -41752.7560
[19,] -63101.7952 -59923.4098
[20,] -65429.5731 -63101.7952
[21,] -64187.3082 -65429.5731
[22,] -64836.8563 -64187.3082
[23,] 4005.7648 -64836.8563
[24,] -50880.3722 4005.7648
[25,] -54195.1766 -50880.3722
[26,] -69883.7874 -54195.1766
[27,] -203839.9343 -69883.7874
[28,] -224426.2419 -203839.9343
[29,] -196168.7315 -224426.2419
[30,] -196805.3140 -196168.7315
[31,] -184094.1875 -196805.3140
[32,] -254380.0510 -184094.1875
[33,] -254886.8679 -254380.0510
[34,] -250483.9502 -254886.8679
[35,] -177074.3361 -250483.9502
[36,] -228535.6424 -177074.3361
[37,] -221675.2457 -228535.6424
[38,] -207405.5378 -221675.2457
[39,] -194513.7966 -207405.5378
[40,] -220641.9158 -194513.7966
[41,] -188712.7422 -220641.9158
[42,] -201094.7889 -188712.7422
[43,] -207802.3508 -201094.7889
[44,] -201418.6695 -207802.3508
[45,] -193017.2226 -201418.6695
[46,] -187615.6587 -193017.2226
[47,] -99956.2069 -187615.6587
[48,] -160876.1941 -99956.2069
[49,] -142134.4146 -160876.1941
[50,] -134422.4336 -142134.4146
[51,] -119122.8548 -134422.4336
[52,] -149026.0631 -119122.8548
[53,] -135926.4266 -149026.0631
[54,] -145093.5515 -135926.4266
[55,] -140278.5893 -145093.5515
[56,] -135091.9151 -140278.5893
[57,] -126732.8320 -135091.9151
[58,] -90642.4630 -126732.8320
[59,] -17067.5197 -90642.4630
[60,] -80129.6716 -17067.5197
[61,] -81373.7792 -80129.6716
[62,] -73185.7946 -81373.7792
[63,] -70896.7142 -73185.7946
[64,] -78547.3712 -70896.7142
[65,] -51379.1786 -78547.3712
[66,] -57032.3495 -51379.1786
[67,] -53553.6164 -57032.3495
[68,] -77505.2397 -53553.6164
[69,] -97629.8101 -77505.2397
[70,] -92259.5650 -97629.8101
[71,] -39665.9980 -92259.5650
[72,] -104016.1848 -39665.9980
[73,] -91742.7858 -104016.1848
[74,] -86041.4950 -91742.7858
[75,] -67818.3651 -86041.4950
[76,] -85195.2304 -67818.3651
[77,] -72781.0709 -85195.2304
[78,] -75678.3553 -72781.0709
[79,] -95267.7845 -75678.3553
[80,] -111506.9705 -95267.7845
[81,] -109655.7317 -111506.9705
[82,] -109514.9871 -109655.7317
[83,] 12527.7074 -109514.9871
[84,] -90561.3621 12527.7074
[85,] -81036.8762 -90561.3621
[86,] -58413.4155 -81036.8762
[87,] -64617.1778 -58413.4155
[88,] -89772.6496 -64617.1778
[89,] -77507.1162 -89772.6496
[90,] -75975.1971 -77507.1162
[91,] -82534.6396 -75975.1971
[92,] -74576.9964 -82534.6396
[93,] -63725.6888 -74576.9964
[94,] -54695.0432 -63725.6888
[95,] 17357.4553 -54695.0432
[96,] -29721.8354 17357.4553
[97,] -59993.9301 -29721.8354
[98,] -53428.0874 -59993.9301
[99,] -34211.1782 -53428.0874
[100,] -60353.0814 -34211.1782
[101,] -28196.2563 -60353.0814
[102,] -36122.7521 -28196.2563
[103,] -49068.2181 -36122.7521
[104,] -73826.2502 -49068.2181
[105,] -63533.9277 -73826.2502
[106,] -50556.9356 -63533.9277
[107,] 35579.2325 -50556.9356
[108,] -4121.3806 35579.2325
[109,] 6459.2560 -4121.3806
[110,] 32951.0088 6459.2560
[111,] 46367.5047 32951.0088
[112,] 13225.8041 46367.5047
[113,] 21904.8300 13225.8041
[114,] -572.4866 21904.8300
[115,] 211.6464 -572.4866
[116,] 4320.5032 211.6464
[117,] 15223.2592 4320.5032
[118,] 17763.5410 15223.2592
[119,] 93870.2614 17763.5410
[120,] 24793.8021 93870.2614
[121,] 32327.2433 24793.8021
[122,] 42510.9672 32327.2433
[123,] 48916.2104 42510.9672
[124,] 31396.2011 48916.2104
[125,] 41873.3368 31396.2011
[126,] 40073.8540 41873.3368
[127,] 38452.6460 40073.8540
[128,] 24347.7770 38452.6460
[129,] 18494.3774 24347.7770
[130,] 17946.1696 18494.3774
[131,] 75159.2651 17946.1696
[132,] 18526.6840 75159.2651
[133,] 19203.8829 18526.6840
[134,] 23463.6841 19203.8829
[135,] 36862.0435 23463.6841
[136,] 26690.9241 36862.0435
[137,] 27220.5706 26690.9241
[138,] 27993.4748 27220.5706
[139,] 29190.7801 27993.4748
[140,] 27883.9855 29190.7801
[141,] 31611.2306 27883.9855
[142,] 32199.4300 31611.2306
[143,] 79931.9349 32199.4300
[144,] 31089.2848 79931.9349
[145,] 31786.5049 31089.2848
[146,] 49246.1525 31786.5049
[147,] 67811.8777 49246.1525
[148,] 41244.4486 67811.8777
[149,] 47297.9810 41244.4486
[150,] 56728.1762 47297.9810
[151,] 48781.0526 56728.1762
[152,] 48502.3426 48781.0526
[153,] 57332.0702 48502.3426
[154,] 65501.3051 57332.0702
[155,] 123056.1818 65501.3051
[156,] 72367.7367 123056.1818
[157,] 77012.9720 72367.7367
[158,] 78284.9598 77012.9720
[159,] 89546.0399 78284.9598
[160,] 56675.5102 89546.0399
[161,] 71927.8776 56675.5102
[162,] 125033.1667 71927.8776
[163,] 127533.6478 125033.1667
[164,] 124945.9508 127533.6478
[165,] 130594.4736 124945.9508
[166,] 128153.1240 130594.4736
[167,] 180839.2797 128153.1240
[168,] 140579.1256 180839.2797
[169,] 202886.9229 140579.1256
[170,] 198617.1386 202886.9229
[171,] 215053.0911 198617.1386
[172,] 197921.6619 215053.0911
[173,] 209546.3695 197921.6619
[174,] 205415.8781 209546.3695
[175,] 189898.9489 205415.8781
[176,] 190266.1352 189898.9489
[177,] 194408.7497 190266.1352
[178,] 188513.8057 194408.7497
[179,] 245939.5177 188513.8057
[180,] 185146.0907 245939.5177
[181,] 186812.6918 185146.0907
[182,] 174592.2624 186812.6918
[183,] 184781.9627 174592.2624
[184,] 173790.6716 184781.9627
[185,] 191336.6522 173790.6716
[186,] 190321.3699 191336.6522
[187,] 193614.7874 190321.3699
[188,] 183551.2326 193614.7874
[189,] 135306.4937 183551.2326
[190,] 123137.3297 135306.4937
[191,] 121937.5214 123137.3297
[192,] 71367.8668 121937.5214
[193,] 76242.6559 71367.8668
[194,] 86991.6225 76242.6559
[195,] 105066.2056 86991.6225
[196,] 73946.6760 105066.2056
[197,] 73811.5390 73946.6760
[198,] 62929.9479 73811.5390
[199,] 61504.4950 62929.9479
[200,] 51423.1991 61504.4950
[201,] 50303.0825 51423.1991
[202,] 51904.2488 50303.0825
[203,] 100679.0917 51904.2488
[204,] 66078.8592 100679.0917
[205,] 67076.4784 66078.8592
[206,] 70276.0000 67076.4784
[207,] 92535.6047 70276.0000
[208,] 68987.5688 92535.6047
[209,] 72671.5699 68987.5688
[210,] 64487.5583 72671.5699
[211,] 56107.0830 64487.5583
[212,] 54294.0011 56107.0830
[213,] 59737.3290 54294.0011
[214,] 62156.7863 59737.3290
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 108107.3389 238057.8859
2 92800.2864 108107.3389
3 96892.4346 92800.2864
4 69235.8113 96892.4346
5 82153.2310 69235.8113
6 82228.6995 82153.2310
7 63294.6465 82228.6995
8 -66018.1038 63294.6465
9 -56586.8704 -66018.1038
10 -56046.0343 -56586.8704
11 16087.6602 -56046.0343
12 -34604.5059 16087.6602
13 -39920.1751 -34604.5059
14 -44721.6006 -39920.1751
15 -37250.7664 -44721.6006
16 -63139.9695 -37250.7664
17 -41752.7560 -63139.9695
18 -59923.4098 -41752.7560
19 -63101.7952 -59923.4098
20 -65429.5731 -63101.7952
21 -64187.3082 -65429.5731
22 -64836.8563 -64187.3082
23 4005.7648 -64836.8563
24 -50880.3722 4005.7648
25 -54195.1766 -50880.3722
26 -69883.7874 -54195.1766
27 -203839.9343 -69883.7874
28 -224426.2419 -203839.9343
29 -196168.7315 -224426.2419
30 -196805.3140 -196168.7315
31 -184094.1875 -196805.3140
32 -254380.0510 -184094.1875
33 -254886.8679 -254380.0510
34 -250483.9502 -254886.8679
35 -177074.3361 -250483.9502
36 -228535.6424 -177074.3361
37 -221675.2457 -228535.6424
38 -207405.5378 -221675.2457
39 -194513.7966 -207405.5378
40 -220641.9158 -194513.7966
41 -188712.7422 -220641.9158
42 -201094.7889 -188712.7422
43 -207802.3508 -201094.7889
44 -201418.6695 -207802.3508
45 -193017.2226 -201418.6695
46 -187615.6587 -193017.2226
47 -99956.2069 -187615.6587
48 -160876.1941 -99956.2069
49 -142134.4146 -160876.1941
50 -134422.4336 -142134.4146
51 -119122.8548 -134422.4336
52 -149026.0631 -119122.8548
53 -135926.4266 -149026.0631
54 -145093.5515 -135926.4266
55 -140278.5893 -145093.5515
56 -135091.9151 -140278.5893
57 -126732.8320 -135091.9151
58 -90642.4630 -126732.8320
59 -17067.5197 -90642.4630
60 -80129.6716 -17067.5197
61 -81373.7792 -80129.6716
62 -73185.7946 -81373.7792
63 -70896.7142 -73185.7946
64 -78547.3712 -70896.7142
65 -51379.1786 -78547.3712
66 -57032.3495 -51379.1786
67 -53553.6164 -57032.3495
68 -77505.2397 -53553.6164
69 -97629.8101 -77505.2397
70 -92259.5650 -97629.8101
71 -39665.9980 -92259.5650
72 -104016.1848 -39665.9980
73 -91742.7858 -104016.1848
74 -86041.4950 -91742.7858
75 -67818.3651 -86041.4950
76 -85195.2304 -67818.3651
77 -72781.0709 -85195.2304
78 -75678.3553 -72781.0709
79 -95267.7845 -75678.3553
80 -111506.9705 -95267.7845
81 -109655.7317 -111506.9705
82 -109514.9871 -109655.7317
83 12527.7074 -109514.9871
84 -90561.3621 12527.7074
85 -81036.8762 -90561.3621
86 -58413.4155 -81036.8762
87 -64617.1778 -58413.4155
88 -89772.6496 -64617.1778
89 -77507.1162 -89772.6496
90 -75975.1971 -77507.1162
91 -82534.6396 -75975.1971
92 -74576.9964 -82534.6396
93 -63725.6888 -74576.9964
94 -54695.0432 -63725.6888
95 17357.4553 -54695.0432
96 -29721.8354 17357.4553
97 -59993.9301 -29721.8354
98 -53428.0874 -59993.9301
99 -34211.1782 -53428.0874
100 -60353.0814 -34211.1782
101 -28196.2563 -60353.0814
102 -36122.7521 -28196.2563
103 -49068.2181 -36122.7521
104 -73826.2502 -49068.2181
105 -63533.9277 -73826.2502
106 -50556.9356 -63533.9277
107 35579.2325 -50556.9356
108 -4121.3806 35579.2325
109 6459.2560 -4121.3806
110 32951.0088 6459.2560
111 46367.5047 32951.0088
112 13225.8041 46367.5047
113 21904.8300 13225.8041
114 -572.4866 21904.8300
115 211.6464 -572.4866
116 4320.5032 211.6464
117 15223.2592 4320.5032
118 17763.5410 15223.2592
119 93870.2614 17763.5410
120 24793.8021 93870.2614
121 32327.2433 24793.8021
122 42510.9672 32327.2433
123 48916.2104 42510.9672
124 31396.2011 48916.2104
125 41873.3368 31396.2011
126 40073.8540 41873.3368
127 38452.6460 40073.8540
128 24347.7770 38452.6460
129 18494.3774 24347.7770
130 17946.1696 18494.3774
131 75159.2651 17946.1696
132 18526.6840 75159.2651
133 19203.8829 18526.6840
134 23463.6841 19203.8829
135 36862.0435 23463.6841
136 26690.9241 36862.0435
137 27220.5706 26690.9241
138 27993.4748 27220.5706
139 29190.7801 27993.4748
140 27883.9855 29190.7801
141 31611.2306 27883.9855
142 32199.4300 31611.2306
143 79931.9349 32199.4300
144 31089.2848 79931.9349
145 31786.5049 31089.2848
146 49246.1525 31786.5049
147 67811.8777 49246.1525
148 41244.4486 67811.8777
149 47297.9810 41244.4486
150 56728.1762 47297.9810
151 48781.0526 56728.1762
152 48502.3426 48781.0526
153 57332.0702 48502.3426
154 65501.3051 57332.0702
155 123056.1818 65501.3051
156 72367.7367 123056.1818
157 77012.9720 72367.7367
158 78284.9598 77012.9720
159 89546.0399 78284.9598
160 56675.5102 89546.0399
161 71927.8776 56675.5102
162 125033.1667 71927.8776
163 127533.6478 125033.1667
164 124945.9508 127533.6478
165 130594.4736 124945.9508
166 128153.1240 130594.4736
167 180839.2797 128153.1240
168 140579.1256 180839.2797
169 202886.9229 140579.1256
170 198617.1386 202886.9229
171 215053.0911 198617.1386
172 197921.6619 215053.0911
173 209546.3695 197921.6619
174 205415.8781 209546.3695
175 189898.9489 205415.8781
176 190266.1352 189898.9489
177 194408.7497 190266.1352
178 188513.8057 194408.7497
179 245939.5177 188513.8057
180 185146.0907 245939.5177
181 186812.6918 185146.0907
182 174592.2624 186812.6918
183 184781.9627 174592.2624
184 173790.6716 184781.9627
185 191336.6522 173790.6716
186 190321.3699 191336.6522
187 193614.7874 190321.3699
188 183551.2326 193614.7874
189 135306.4937 183551.2326
190 123137.3297 135306.4937
191 121937.5214 123137.3297
192 71367.8668 121937.5214
193 76242.6559 71367.8668
194 86991.6225 76242.6559
195 105066.2056 86991.6225
196 73946.6760 105066.2056
197 73811.5390 73946.6760
198 62929.9479 73811.5390
199 61504.4950 62929.9479
200 51423.1991 61504.4950
201 50303.0825 51423.1991
202 51904.2488 50303.0825
203 100679.0917 51904.2488
204 66078.8592 100679.0917
205 67076.4784 66078.8592
206 70276.0000 67076.4784
207 92535.6047 70276.0000
208 68987.5688 92535.6047
209 72671.5699 68987.5688
210 64487.5583 72671.5699
211 56107.0830 64487.5583
212 54294.0011 56107.0830
213 59737.3290 54294.0011
214 62156.7863 59737.3290
> plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
> lines(lowess(z))
> abline(lm(z))
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/wessaorg/rcomp/tmp/7w2v81293642378.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/wessaorg/rcomp/tmp/8w2v81293642378.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/wessaorg/rcomp/tmp/9w2v81293642378.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
> plot(mylm, las = 1, sub='Residual Diagnostics')
> par(opar)
> dev.off()
null device
1
> if (n > n25) {
+ postscript(file="/var/www/wessaorg/rcomp/tmp/107buc1293642378.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
+ plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
+ grid()
+ dev.off()
+ }
null device
1
>
> #Note: the /var/www/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/www/wessaorg/rcomp/createtable")
>
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
> a<-table.row.end(a)
> myeq <- colnames(x)[1]
> myeq <- paste(myeq, '[t] = ', sep='')
> for (i in 1:k){
+ if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
+ myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
+ if (rownames(mysum$coefficients)[i] != '(Intercept)') {
+ myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
+ if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
+ }
+ }
> myeq <- paste(myeq, ' + e[t]')
> a<-table.row.start(a)
> a<-table.element(a, myeq)
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/www/wessaorg/rcomp/tmp/11n8lb1293642378.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a,'Variable',header=TRUE)
> a<-table.element(a,'Parameter',header=TRUE)
> a<-table.element(a,'S.D.',header=TRUE)
> a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE)
> a<-table.element(a,'2-tail p-value',header=TRUE)
> a<-table.element(a,'1-tail p-value',header=TRUE)
> a<-table.row.end(a)
> for (i in 1:k){
+ a<-table.row.start(a)
+ a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
+ a<-table.element(a,mysum$coefficients[i,1])
+ a<-table.element(a, round(mysum$coefficients[i,2],6))
+ a<-table.element(a, round(mysum$coefficients[i,3],4))
+ a<-table.element(a, round(mysum$coefficients[i,4],6))
+ a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/www/wessaorg/rcomp/tmp/128rkh1293642378.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple R',1,TRUE)
> a<-table.element(a, sqrt(mysum$r.squared))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'R-squared',1,TRUE)
> a<-table.element(a, mysum$r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Adjusted R-squared',1,TRUE)
> a<-table.element(a, mysum$adj.r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (value)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[1])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[2])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[3])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'p-value',1,TRUE)
> a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
> a<-table.element(a, mysum$sigma)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
> a<-table.element(a, sum(myerror*myerror))
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/www/wessaorg/rcomp/tmp/13xazs1293642378.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Time or Index', 1, TRUE)
> a<-table.element(a, 'Actuals', 1, TRUE)
> a<-table.element(a, 'Interpolation
Forecast', 1, TRUE)
> a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE)
> a<-table.row.end(a)
> for (i in 1:n) {
+ a<-table.row.start(a)
+ a<-table.element(a,i, 1, TRUE)
+ a<-table.element(a,x[i])
+ a<-table.element(a,x[i]-mysum$resid[i])
+ a<-table.element(a,mysum$resid[i])
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/www/wessaorg/rcomp/tmp/148jyv1293642378.tab")
> if (n > n25) {
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'p-values',header=TRUE)
+ a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'breakpoint index',header=TRUE)
+ a<-table.element(a,'greater',header=TRUE)
+ a<-table.element(a,'2-sided',header=TRUE)
+ a<-table.element(a,'less',header=TRUE)
+ a<-table.row.end(a)
+ for (mypoint in kp3:nmkm3) {
+ a<-table.row.start(a)
+ a<-table.element(a,mypoint,header=TRUE)
+ a<-table.element(a,gqarr[mypoint-kp3+1,1])
+ a<-table.element(a,gqarr[mypoint-kp3+1,2])
+ a<-table.element(a,gqarr[mypoint-kp3+1,3])
+ a<-table.row.end(a)
+ }
+ a<-table.end(a)
+ table.save(a,file="/var/www/wessaorg/rcomp/tmp/15tke11293642378.tab")
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'Description',header=TRUE)
+ a<-table.element(a,'# significant tests',header=TRUE)
+ a<-table.element(a,'% significant tests',header=TRUE)
+ a<-table.element(a,'OK/NOK',header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'1% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant1)
+ a<-table.element(a,numsignificant1/numgqtests)
+ if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'5% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant5)
+ a<-table.element(a,numsignificant5/numgqtests)
+ if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'10% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant10)
+ a<-table.element(a,numsignificant10/numgqtests)
+ if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.end(a)
+ table.save(a,file="/var/www/wessaorg/rcomp/tmp/16pccs1293642378.tab")
+ }
>
> try(system("convert tmp/1v78b1293642378.ps tmp/1v78b1293642378.png",intern=TRUE))
character(0)
> try(system("convert tmp/2v78b1293642378.ps tmp/2v78b1293642378.png",intern=TRUE))
character(0)
> try(system("convert tmp/35g7w1293642378.ps tmp/35g7w1293642378.png",intern=TRUE))
character(0)
> try(system("convert tmp/45g7w1293642378.ps tmp/45g7w1293642378.png",intern=TRUE))
character(0)
> try(system("convert tmp/55g7w1293642378.ps tmp/55g7w1293642378.png",intern=TRUE))
character(0)
> try(system("convert tmp/6g76h1293642378.ps tmp/6g76h1293642378.png",intern=TRUE))
character(0)
> try(system("convert tmp/7w2v81293642378.ps tmp/7w2v81293642378.png",intern=TRUE))
character(0)
> try(system("convert tmp/8w2v81293642378.ps tmp/8w2v81293642378.png",intern=TRUE))
character(0)
> try(system("convert tmp/9w2v81293642378.ps tmp/9w2v81293642378.png",intern=TRUE))
character(0)
> try(system("convert tmp/107buc1293642378.ps tmp/107buc1293642378.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
6.67 0.36 7.22