R version 2.15.2 (2012-10-26) -- "Trick or Treat"
Copyright (C) 2012 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i686-pc-linux-gnu (32-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(27.72
+ ,41837160
+ ,91.51
+ ,2747.48
+ ,0.016
+ ,62.7
+ ,0.16
+ ,26.90
+ ,35204750
+ ,91.09
+ ,2760.01
+ ,0.016
+ ,62.7
+ ,0.17
+ ,25.86
+ ,42367740
+ ,93.00
+ ,2778.11
+ ,0.016
+ ,62.7
+ ,0.17
+ ,26.81
+ ,61427940
+ ,93.08
+ ,2844.72
+ ,0.016
+ ,62.7
+ ,0.16
+ ,26.31
+ ,26132090
+ ,94.13
+ ,2831.02
+ ,0.016
+ ,62.7
+ ,0.16
+ ,27.10
+ ,3799718
+ ,96.26
+ ,2858.42
+ ,0.016
+ ,62.7
+ ,0.17
+ ,27.00
+ ,28202230
+ ,94.29
+ ,2809.73
+ ,0.016
+ ,62.7
+ ,0.17
+ ,27.40
+ ,15809640
+ ,94.46
+ ,2843.07
+ ,0.016
+ ,62.7
+ ,0.16
+ ,27.27
+ ,17110160
+ ,95.53
+ ,2818.61
+ ,0.016
+ ,62.7
+ ,0.17
+ ,28.29
+ ,16835510
+ ,98.29
+ ,2836.33
+ ,0.016
+ ,62.7
+ ,0.17
+ ,30.01
+ ,43517670
+ ,102.01
+ ,2872.80
+ ,0.016
+ ,62.7
+ ,0.18
+ ,31.41
+ ,42958450
+ ,105.16
+ ,2895.33
+ ,0.016
+ ,62.7
+ ,0.17
+ ,31.91
+ ,30826830
+ ,105.34
+ ,2929.76
+ ,0.016
+ ,62.7
+ ,0.17
+ ,31.60
+ ,15549740
+ ,105.27
+ ,2930.45
+ ,0.016
+ ,62.7
+ ,0.16
+ ,31.84
+ ,21843070
+ ,102.19
+ ,2859.09
+ ,0.016
+ ,62.7
+ ,0.17
+ ,33.05
+ ,73424890
+ ,106.85
+ ,2892.42
+ ,0.016
+ ,62.7
+ ,0.17
+ ,32.06
+ ,24330740
+ ,103.05
+ ,2836.16
+ ,0.016
+ ,62.7
+ ,0.17
+ ,33.10
+ ,24785970
+ ,106.42
+ ,2854.06
+ ,0.016
+ ,62.7
+ ,0.16
+ ,32.23
+ ,28553940
+ ,105.17
+ ,2875.32
+ ,0.016
+ ,62.7
+ ,0.15
+ ,31.36
+ ,17659080
+ ,102.74
+ ,2849.49
+ ,0.016
+ ,62.7
+ ,0.15
+ ,31.09
+ ,19508980
+ ,106.27
+ ,2935.05
+ ,0.016
+ ,62.7
+ ,0.09
+ ,30.77
+ ,14110230
+ ,107.63
+ ,2951.23
+ ,0.0141
+ ,65.4
+ ,0.18
+ ,31.20
+ ,8765498
+ ,108.54
+ ,2976.08
+ ,0.0141
+ ,65.4
+ ,0.17
+ ,31.47
+ ,10027250
+ ,108.24
+ ,2976.12
+ ,0.0141
+ ,65.4
+ ,0.17
+ ,31.73
+ ,10943350
+ ,108.86
+ ,2937.33
+ ,0.0141
+ ,65.4
+ ,0.17
+ ,32.17
+ ,17755740
+ ,102.98
+ ,2931.77
+ ,0.0141
+ ,65.4
+ ,0.17
+ ,31.47
+ ,14238190
+ ,99.53
+ ,2902.33
+ ,0.0141
+ ,65.4
+ ,0.17
+ ,30.97
+ ,12997760
+ ,101.08
+ ,2887.98
+ ,0.0141
+ ,65.4
+ ,0.17
+ ,30.81
+ ,11299240
+ ,104.64
+ ,2866.19
+ ,0.0141
+ ,65.4
+ ,0.18
+ ,30.72
+ ,8102653
+ ,105.59
+ ,2908.47
+ ,0.0141
+ ,65.4
+ ,0.19
+ ,28.24
+ ,24549800
+ ,103.21
+ ,2896.94
+ ,0.0141
+ ,65.4
+ ,0.18
+ ,28.09
+ ,30410530
+ ,103.84
+ ,2910.04
+ ,0.0141
+ ,65.4
+ ,0.17
+ ,29.11
+ ,16807730
+ ,104.61
+ ,2942.60
+ ,0.0141
+ ,65.4
+ ,0.16
+ ,29.00
+ ,13671200
+ ,108.65
+ ,2965.90
+ ,0.0141
+ ,65.4
+ ,0.13
+ ,28.76
+ ,11854290
+ ,106.26
+ ,2925.30
+ ,0.0141
+ ,65.4
+ ,0.13
+ ,28.75
+ ,12383610
+ ,104.20
+ ,2890.15
+ ,0.0141
+ ,65.4
+ ,0.14
+ ,28.45
+ ,11512350
+ ,102.99
+ ,2862.99
+ ,0.0141
+ ,65.4
+ ,0.15
+ ,29.34
+ ,16749990
+ ,102.19
+ ,2854.24
+ ,0.0141
+ ,65.4
+ ,0.15
+ ,26.84
+ ,61009290
+ ,100.82
+ ,2893.25
+ ,0.0141
+ ,65.4
+ ,0.14
+ ,23.70
+ ,123011300
+ ,103.42
+ ,2958.09
+ ,0.0141
+ ,65.4
+ ,0.14
+ ,23.15
+ ,29253590
+ ,104.18
+ ,2945.84
+ ,0.0141
+ ,65.4
+ ,0.14
+ ,21.71
+ ,55998620
+ ,102.65
+ ,2939.52
+ ,0.0141
+ ,65.4
+ ,0.13
+ ,20.88
+ ,44488370
+ ,95.64
+ ,2920.21
+ ,0.0169
+ ,61.3
+ ,0.14
+ ,20.04
+ ,56264460
+ ,93.51
+ ,2909.77
+ ,0.0169
+ ,61.3
+ ,0.14
+ ,21.09
+ ,80626220
+ ,108.51
+ ,2967.90
+ ,0.0169
+ ,61.3
+ ,0.14
+ ,21.92
+ ,27733830
+ ,111.55
+ ,2989.91
+ ,0.0169
+ ,61.3
+ ,0.14
+ ,20.72
+ ,36699380
+ ,106.70
+ ,3015.86
+ ,0.0169
+ ,61.3
+ ,0.13
+ ,20.72
+ ,29514550
+ ,104.93
+ ,3011.25
+ ,0.0169
+ ,61.3
+ ,0.13
+ ,21.01
+ ,15605960
+ ,105.23
+ ,3018.64
+ ,0.0169
+ ,61.3
+ ,0.13
+ ,21.80
+ ,25714310
+ ,104.92
+ ,3020.86
+ ,0.0169
+ ,61.3
+ ,0.13
+ ,21.60
+ ,24904700
+ ,104.60
+ ,3022.52
+ ,0.0169
+ ,61.3
+ ,0.13
+ ,20.38
+ ,38971320
+ ,101.76
+ ,3016.98
+ ,0.0169
+ ,61.3
+ ,0.13
+ ,21.20
+ ,47682050
+ ,102.23
+ ,3030.93
+ ,0.0169
+ ,61.3
+ ,0.13
+ ,19.87
+ ,157188200
+ ,103.99
+ ,3062.39
+ ,0.0169
+ ,61.3
+ ,0.13
+ ,19.05
+ ,129057400
+ ,101.36
+ ,3076.59
+ ,0.0169
+ ,61.3
+ ,0.13
+ ,20.01
+ ,100818300
+ ,102.92
+ ,3076.21
+ ,0.0169
+ ,61.3
+ ,0.13
+ ,19.15
+ ,70483330
+ ,105.25
+ ,3067.26
+ ,0.0169
+ ,61.3
+ ,0.13
+ ,19.43
+ ,49779450
+ ,105.71
+ ,3073.67
+ ,0.0169
+ ,61.3
+ ,0.13
+ ,19.44
+ ,32747000
+ ,105.42
+ ,3053.40
+ ,0.0169
+ ,61.3
+ ,0.13
+ ,19.40
+ ,29588690
+ ,105.11
+ ,3069.79
+ ,0.0169
+ ,61.3
+ ,0.13
+ ,19.15
+ ,20663220
+ ,104.67
+ ,3073.19
+ ,0.0169
+ ,61.3
+ ,0.13
+ ,19.34
+ ,25402980
+ ,107.51
+ ,3077.14
+ ,0.0169
+ ,61.3
+ ,0.13
+ ,19.10
+ ,16071190
+ ,109.00
+ ,3081.19
+ ,0.0169
+ ,61.3
+ ,0.13
+ ,19.08
+ ,30571430
+ ,107.37
+ ,3048.71
+ ,0.0169
+ ,61.3
+ ,0.14
+ ,18.05
+ ,58612440
+ ,107.30
+ ,3066.96
+ ,0.0169
+ ,61.3
+ ,0.13
+ ,17.72
+ ,46177000
+ ,107.37
+ ,3075.06
+ ,0.0199
+ ,70.3
+ ,0.14
+ ,18.58
+ ,60657900
+ ,113.28
+ ,3069.27
+ ,0.0199
+ ,70.3
+ ,0.16
+ ,18.96
+ ,46028860
+ ,119.10
+ ,3135.81
+ ,0.0199
+ ,70.3
+ ,0.16
+ ,18.98
+ ,36325880
+ ,119.04
+ ,3136.42
+ ,0.0199
+ ,70.3
+ ,0.15
+ ,18.81
+ ,24752340
+ ,117.80
+ ,3104.02
+ ,0.0199
+ ,70.3
+ ,0.15
+ ,19.43
+ ,47343020
+ ,117.90
+ ,3104.53
+ ,0.0199
+ ,70.3
+ ,0.15
+ ,20.93
+ ,121399400
+ ,119.55
+ ,3114.31
+ ,0.0199
+ ,70.3
+ ,0.15
+ ,20.71
+ ,64896660
+ ,119.47
+ ,3155.83
+ ,0.0199
+ ,70.3
+ ,0.15
+ ,22.00
+ ,72707430
+ ,123.23
+ ,3183.95
+ ,0.0199
+ ,70.3
+ ,0.16
+ ,21.52
+ ,50593510
+ ,121.40
+ ,3178.67
+ ,0.0199
+ ,70.3
+ ,0.16
+ ,21.87
+ ,36696330
+ ,121.43
+ ,3177.80
+ ,0.0199
+ ,70.3
+ ,0.16
+ ,23.29
+ ,78525460
+ ,122.51
+ ,3182.62
+ ,0.0199
+ ,70.3
+ ,0.15
+ ,22.59
+ ,57115160
+ ,122.78
+ ,3175.96
+ ,0.0199
+ ,70.3
+ ,0.16
+ ,22.86
+ ,51163120
+ ,122.84
+ ,3179.96
+ ,0.0199
+ ,70.3
+ ,0.15
+ ,20.79
+ ,78968380
+ ,122.70
+ ,3160.78
+ ,0.0199
+ ,70.3
+ ,0.16
+ ,20.28
+ ,46169460
+ ,119.89
+ ,3117.73
+ ,0.0199
+ ,70.3
+ ,0.15
+ ,20.62
+ ,38212360
+ ,118.00
+ ,3093.70
+ ,0.0199
+ ,70.3
+ ,0.16
+ ,20.32
+ ,30061050
+ ,119.61
+ ,3136.60
+ ,0.0199
+ ,70.3
+ ,0.14
+ ,21.66
+ ,65415370
+ ,120.40
+ ,3116.23
+ ,0.0199
+ ,70.3
+ ,0.09
+ ,21.99
+ ,51198150
+ ,117.94
+ ,3113.53
+ ,0.0216
+ ,73.1
+ ,0.15
+ ,22.27
+ ,29276680
+ ,118.77
+ ,3120.04
+ ,0.0216
+ ,73.1
+ ,0.16
+ ,21.83
+ ,31940720
+ ,121.68
+ ,3135.23
+ ,0.0216
+ ,73.1
+ ,0.16
+ ,21.94
+ ,46549400
+ ,121.98
+ ,3149.46
+ ,0.0216
+ ,73.1
+ ,0.15
+ ,20.91
+ ,40483780
+ ,118.83
+ ,3136.19
+ ,0.0216
+ ,73.1
+ ,0.15
+ ,20.40
+ ,32190200
+ ,117.97
+ ,3112.35
+ ,0.0216
+ ,73.1
+ ,0.15
+ ,20.22
+ ,27125670
+ ,113.07
+ ,3065.02
+ ,0.0216
+ ,73.1
+ ,0.16
+ ,19.64
+ ,39282420
+ ,111.98
+ ,3051.78
+ ,0.0216
+ ,73.1
+ ,0.16
+ ,19.75
+ ,21803710
+ ,113.77
+ ,3049.41
+ ,0.0216
+ ,73.1
+ ,0.16
+ ,19.51
+ ,18743920
+ ,110.41
+ ,3044.11
+ ,0.0216
+ ,73.1
+ ,0.16
+ ,19.52
+ ,20154860
+ ,110.85
+ ,3064.18
+ ,0.0216
+ ,73.1
+ ,0.16
+ ,19.48
+ ,21816100
+ ,111.18
+ ,3101.17
+ ,0.0216
+ ,73.1
+ ,0.16
+ ,19.88
+ ,44020450
+ ,109.42
+ ,3104.12
+ ,0.0216
+ ,73.1
+ ,0.15
+ ,18.97
+ ,52059860
+ ,108.87
+ ,3072.87
+ ,0.0216
+ ,73.1
+ ,0.15
+ ,19.00
+ ,34769600
+ ,106.72
+ ,3005.62
+ ,0.0216
+ ,73.1
+ ,0.16
+ ,19.32
+ ,32269470
+ ,107.28
+ ,3016.96
+ ,0.0216
+ ,73.1
+ ,0.15
+ ,19.50
+ ,72281000
+ ,104.13
+ ,2990.46
+ ,0.0216
+ ,73.1
+ ,0.15
+ ,23.22
+ ,228364700
+ ,107.55
+ ,2981.70
+ ,0.0216
+ ,73.1
+ ,0.17
+ ,22.56
+ ,76050080
+ ,105.72
+ ,2986.12
+ ,0.0216
+ ,73.1
+ ,0.16
+ ,21.94
+ ,9999999
+ ,104.55
+ ,2987.95
+ ,0.0216
+ ,73.1
+ ,0.16
+ ,21.11
+ ,99311480
+ ,106.93
+ ,2977.23
+ ,0.0216
+ ,73.1
+ ,0.18
+ ,21.21
+ ,37631000
+ ,106.85
+ ,3020.06
+ ,0.0176
+ ,73.1
+ ,0.17
+ ,21.18
+ ,38308550
+ ,106.78
+ ,2982.13
+ ,0.0176
+ ,73.1
+ ,0.16
+ ,21.25
+ ,31752420
+ ,107.29
+ ,2999.66
+ ,0.0176
+ ,73.1
+ ,0.17
+ ,21.17
+ ,29030780
+ ,104.14
+ ,3011.93
+ ,0.0176
+ ,73.1
+ ,0.16
+ ,20.47
+ ,33352920
+ ,101.21
+ ,2937.29
+ ,0.0176
+ ,73.1
+ ,0.16
+ ,19.99
+ ,34106840
+ ,96.35
+ ,2895.58
+ ,0.0176
+ ,73.1
+ ,0.16
+ ,19.21
+ ,42257790
+ ,95.62
+ ,2904.87
+ ,0.0176
+ ,73.1
+ ,0.16
+ ,20.07
+ ,67220540
+ ,99.00
+ ,2904.26
+ ,0.0176
+ ,73.1
+ ,0.16
+ ,19.86
+ ,71524510
+ ,99.26
+ ,2883.89
+ ,0.0176
+ ,73.1
+ ,0.16
+ ,22.36
+ ,229081600
+ ,98.77
+ ,2846.81
+ ,0.0176
+ ,73.1
+ ,0.16
+ ,22.17
+ ,78808770
+ ,100.65
+ ,2836.94
+ ,0.0176
+ ,73.1
+ ,0.16
+ ,23.56
+ ,107091400
+ ,103.13
+ ,2853.13
+ ,0.0176
+ ,73.1
+ ,0.16
+ ,22.92
+ ,84944370
+ ,105.53
+ ,2916.07
+ ,0.0176
+ ,73.1
+ ,0.16
+ ,23.10
+ ,46515660
+ ,106.76
+ ,2916.68
+ ,0.0176
+ ,73.1
+ ,0.16
+ ,24.32
+ ,89720920
+ ,107.59
+ ,2926.55
+ ,0.0176
+ ,73.1
+ ,0.16
+ ,23.99
+ ,29520310
+ ,107.62
+ ,2966.85
+ ,0.0176
+ ,73.1
+ ,0.16
+ ,25.94
+ ,123513900
+ ,108.82
+ ,2976.78
+ ,0.0176
+ ,73.1
+ ,0.16
+ ,26.15
+ ,85687430
+ ,107.59
+ ,2967.79
+ ,0.0176
+ ,73.1
+ ,0.16
+ ,26.36
+ ,49113040
+ ,107.85
+ ,2991.78
+ ,0.0176
+ ,73.1
+ ,0.16
+ ,27.32
+ ,88572990
+ ,107.11
+ ,3012.03
+ ,0.0176
+ ,73.1
+ ,0.16
+ ,28.00
+ ,126867400
+ ,108.14
+ ,3010.24
+ ,0.0176
+ ,73.1
+ ,0.16)
+ ,dim=c(7
+ ,126)
+ ,dimnames=list(c('FACEBOOK'
+ ,'VOLUME'
+ ,'LINKEDIN'
+ ,'NASDAQ'
+ ,'INFLATION'
+ ,'CONS.CONF'
+ ,'FED.FUNDS.RATE')
+ ,1:126))
> y <- array(NA,dim=c(7,126),dimnames=list(c('FACEBOOK','VOLUME','LINKEDIN','NASDAQ','INFLATION','CONS.CONF','FED.FUNDS.RATE'),1:126))
> 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 = 'Include Monthly Dummies'
> par1 = '1'
> library(lattice)
> library(lmtest)
Loading required package: zoo
Attaching package: 'zoo'
The following object(s) are masked from 'package:base':
as.Date, as.Date.numeric
> 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
FACEBOOK VOLUME LINKEDIN NASDAQ INFLATION CONS.CONF FED.FUNDS.RATE M1
1 27.72 41837160 91.51 2747.48 0.0160 62.7 0.16 1
2 26.90 35204750 91.09 2760.01 0.0160 62.7 0.17 0
3 25.86 42367740 93.00 2778.11 0.0160 62.7 0.17 0
4 26.81 61427940 93.08 2844.72 0.0160 62.7 0.16 0
5 26.31 26132090 94.13 2831.02 0.0160 62.7 0.16 0
6 27.10 3799718 96.26 2858.42 0.0160 62.7 0.17 0
7 27.00 28202230 94.29 2809.73 0.0160 62.7 0.17 0
8 27.40 15809640 94.46 2843.07 0.0160 62.7 0.16 0
9 27.27 17110160 95.53 2818.61 0.0160 62.7 0.17 0
10 28.29 16835510 98.29 2836.33 0.0160 62.7 0.17 0
11 30.01 43517670 102.01 2872.80 0.0160 62.7 0.18 0
12 31.41 42958450 105.16 2895.33 0.0160 62.7 0.17 0
13 31.91 30826830 105.34 2929.76 0.0160 62.7 0.17 1
14 31.60 15549740 105.27 2930.45 0.0160 62.7 0.16 0
15 31.84 21843070 102.19 2859.09 0.0160 62.7 0.17 0
16 33.05 73424890 106.85 2892.42 0.0160 62.7 0.17 0
17 32.06 24330740 103.05 2836.16 0.0160 62.7 0.17 0
18 33.10 24785970 106.42 2854.06 0.0160 62.7 0.16 0
19 32.23 28553940 105.17 2875.32 0.0160 62.7 0.15 0
20 31.36 17659080 102.74 2849.49 0.0160 62.7 0.15 0
21 31.09 19508980 106.27 2935.05 0.0160 62.7 0.09 0
22 30.77 14110230 107.63 2951.23 0.0141 65.4 0.18 0
23 31.20 8765498 108.54 2976.08 0.0141 65.4 0.17 0
24 31.47 10027250 108.24 2976.12 0.0141 65.4 0.17 0
25 31.73 10943350 108.86 2937.33 0.0141 65.4 0.17 1
26 32.17 17755740 102.98 2931.77 0.0141 65.4 0.17 0
27 31.47 14238190 99.53 2902.33 0.0141 65.4 0.17 0
28 30.97 12997760 101.08 2887.98 0.0141 65.4 0.17 0
29 30.81 11299240 104.64 2866.19 0.0141 65.4 0.18 0
30 30.72 8102653 105.59 2908.47 0.0141 65.4 0.19 0
31 28.24 24549800 103.21 2896.94 0.0141 65.4 0.18 0
32 28.09 30410530 103.84 2910.04 0.0141 65.4 0.17 0
33 29.11 16807730 104.61 2942.60 0.0141 65.4 0.16 0
34 29.00 13671200 108.65 2965.90 0.0141 65.4 0.13 0
35 28.76 11854290 106.26 2925.30 0.0141 65.4 0.13 0
36 28.75 12383610 104.20 2890.15 0.0141 65.4 0.14 0
37 28.45 11512350 102.99 2862.99 0.0141 65.4 0.15 1
38 29.34 16749990 102.19 2854.24 0.0141 65.4 0.15 0
39 26.84 61009290 100.82 2893.25 0.0141 65.4 0.14 0
40 23.70 123011300 103.42 2958.09 0.0141 65.4 0.14 0
41 23.15 29253590 104.18 2945.84 0.0141 65.4 0.14 0
42 21.71 55998620 102.65 2939.52 0.0141 65.4 0.13 0
43 20.88 44488370 95.64 2920.21 0.0169 61.3 0.14 0
44 20.04 56264460 93.51 2909.77 0.0169 61.3 0.14 0
45 21.09 80626220 108.51 2967.90 0.0169 61.3 0.14 0
46 21.92 27733830 111.55 2989.91 0.0169 61.3 0.14 0
47 20.72 36699380 106.70 3015.86 0.0169 61.3 0.13 0
48 20.72 29514550 104.93 3011.25 0.0169 61.3 0.13 0
49 21.01 15605960 105.23 3018.64 0.0169 61.3 0.13 1
50 21.80 25714310 104.92 3020.86 0.0169 61.3 0.13 0
51 21.60 24904700 104.60 3022.52 0.0169 61.3 0.13 0
52 20.38 38971320 101.76 3016.98 0.0169 61.3 0.13 0
53 21.20 47682050 102.23 3030.93 0.0169 61.3 0.13 0
54 19.87 157188200 103.99 3062.39 0.0169 61.3 0.13 0
55 19.05 129057400 101.36 3076.59 0.0169 61.3 0.13 0
56 20.01 100818300 102.92 3076.21 0.0169 61.3 0.13 0
57 19.15 70483330 105.25 3067.26 0.0169 61.3 0.13 0
58 19.43 49779450 105.71 3073.67 0.0169 61.3 0.13 0
59 19.44 32747000 105.42 3053.40 0.0169 61.3 0.13 0
60 19.40 29588690 105.11 3069.79 0.0169 61.3 0.13 0
61 19.15 20663220 104.67 3073.19 0.0169 61.3 0.13 1
62 19.34 25402980 107.51 3077.14 0.0169 61.3 0.13 0
63 19.10 16071190 109.00 3081.19 0.0169 61.3 0.13 0
64 19.08 30571430 107.37 3048.71 0.0169 61.3 0.14 0
65 18.05 58612440 107.30 3066.96 0.0169 61.3 0.13 0
66 17.72 46177000 107.37 3075.06 0.0199 70.3 0.14 0
67 18.58 60657900 113.28 3069.27 0.0199 70.3 0.16 0
68 18.96 46028860 119.10 3135.81 0.0199 70.3 0.16 0
69 18.98 36325880 119.04 3136.42 0.0199 70.3 0.15 0
70 18.81 24752340 117.80 3104.02 0.0199 70.3 0.15 0
71 19.43 47343020 117.90 3104.53 0.0199 70.3 0.15 0
72 20.93 121399400 119.55 3114.31 0.0199 70.3 0.15 0
73 20.71 64896660 119.47 3155.83 0.0199 70.3 0.15 1
74 22.00 72707430 123.23 3183.95 0.0199 70.3 0.16 0
75 21.52 50593510 121.40 3178.67 0.0199 70.3 0.16 0
76 21.87 36696330 121.43 3177.80 0.0199 70.3 0.16 0
77 23.29 78525460 122.51 3182.62 0.0199 70.3 0.15 0
78 22.59 57115160 122.78 3175.96 0.0199 70.3 0.16 0
79 22.86 51163120 122.84 3179.96 0.0199 70.3 0.15 0
80 20.79 78968380 122.70 3160.78 0.0199 70.3 0.16 0
81 20.28 46169460 119.89 3117.73 0.0199 70.3 0.15 0
82 20.62 38212360 118.00 3093.70 0.0199 70.3 0.16 0
83 20.32 30061050 119.61 3136.60 0.0199 70.3 0.14 0
84 21.66 65415370 120.40 3116.23 0.0199 70.3 0.09 0
85 21.99 51198150 117.94 3113.53 0.0216 73.1 0.15 1
86 22.27 29276680 118.77 3120.04 0.0216 73.1 0.16 0
87 21.83 31940720 121.68 3135.23 0.0216 73.1 0.16 0
88 21.94 46549400 121.98 3149.46 0.0216 73.1 0.15 0
89 20.91 40483780 118.83 3136.19 0.0216 73.1 0.15 0
90 20.40 32190200 117.97 3112.35 0.0216 73.1 0.15 0
91 20.22 27125670 113.07 3065.02 0.0216 73.1 0.16 0
92 19.64 39282420 111.98 3051.78 0.0216 73.1 0.16 0
93 19.75 21803710 113.77 3049.41 0.0216 73.1 0.16 0
94 19.51 18743920 110.41 3044.11 0.0216 73.1 0.16 0
95 19.52 20154860 110.85 3064.18 0.0216 73.1 0.16 0
96 19.48 21816100 111.18 3101.17 0.0216 73.1 0.16 0
97 19.88 44020450 109.42 3104.12 0.0216 73.1 0.15 1
98 18.97 52059860 108.87 3072.87 0.0216 73.1 0.15 0
99 19.00 34769600 106.72 3005.62 0.0216 73.1 0.16 0
100 19.32 32269470 107.28 3016.96 0.0216 73.1 0.15 0
101 19.50 72281000 104.13 2990.46 0.0216 73.1 0.15 0
102 23.22 228364700 107.55 2981.70 0.0216 73.1 0.17 0
103 22.56 76050080 105.72 2986.12 0.0216 73.1 0.16 0
104 21.94 9999999 104.55 2987.95 0.0216 73.1 0.16 0
105 21.11 99311480 106.93 2977.23 0.0216 73.1 0.18 0
106 21.21 37631000 106.85 3020.06 0.0176 73.1 0.17 0
107 21.18 38308550 106.78 2982.13 0.0176 73.1 0.16 0
108 21.25 31752420 107.29 2999.66 0.0176 73.1 0.17 0
109 21.17 29030780 104.14 3011.93 0.0176 73.1 0.16 1
110 20.47 33352920 101.21 2937.29 0.0176 73.1 0.16 0
111 19.99 34106840 96.35 2895.58 0.0176 73.1 0.16 0
112 19.21 42257790 95.62 2904.87 0.0176 73.1 0.16 0
113 20.07 67220540 99.00 2904.26 0.0176 73.1 0.16 0
114 19.86 71524510 99.26 2883.89 0.0176 73.1 0.16 0
115 22.36 229081600 98.77 2846.81 0.0176 73.1 0.16 0
116 22.17 78808770 100.65 2836.94 0.0176 73.1 0.16 0
117 23.56 107091400 103.13 2853.13 0.0176 73.1 0.16 0
118 22.92 84944370 105.53 2916.07 0.0176 73.1 0.16 0
119 23.10 46515660 106.76 2916.68 0.0176 73.1 0.16 0
120 24.32 89720920 107.59 2926.55 0.0176 73.1 0.16 0
121 23.99 29520310 107.62 2966.85 0.0176 73.1 0.16 1
122 25.94 123513900 108.82 2976.78 0.0176 73.1 0.16 0
123 26.15 85687430 107.59 2967.79 0.0176 73.1 0.16 0
124 26.36 49113040 107.85 2991.78 0.0176 73.1 0.16 0
125 27.32 88572990 107.11 3012.03 0.0176 73.1 0.16 0
126 28.00 126867400 108.14 3010.24 0.0176 73.1 0.16 0
M2 M3 M4 M5 M6 M7 M8 M9 M10 M11
1 0 0 0 0 0 0 0 0 0 0
2 1 0 0 0 0 0 0 0 0 0
3 0 1 0 0 0 0 0 0 0 0
4 0 0 1 0 0 0 0 0 0 0
5 0 0 0 1 0 0 0 0 0 0
6 0 0 0 0 1 0 0 0 0 0
7 0 0 0 0 0 1 0 0 0 0
8 0 0 0 0 0 0 1 0 0 0
9 0 0 0 0 0 0 0 1 0 0
10 0 0 0 0 0 0 0 0 1 0
11 0 0 0 0 0 0 0 0 0 1
12 0 0 0 0 0 0 0 0 0 0
13 0 0 0 0 0 0 0 0 0 0
14 1 0 0 0 0 0 0 0 0 0
15 0 1 0 0 0 0 0 0 0 0
16 0 0 1 0 0 0 0 0 0 0
17 0 0 0 1 0 0 0 0 0 0
18 0 0 0 0 1 0 0 0 0 0
19 0 0 0 0 0 1 0 0 0 0
20 0 0 0 0 0 0 1 0 0 0
21 0 0 0 0 0 0 0 1 0 0
22 0 0 0 0 0 0 0 0 1 0
23 0 0 0 0 0 0 0 0 0 1
24 0 0 0 0 0 0 0 0 0 0
25 0 0 0 0 0 0 0 0 0 0
26 1 0 0 0 0 0 0 0 0 0
27 0 1 0 0 0 0 0 0 0 0
28 0 0 1 0 0 0 0 0 0 0
29 0 0 0 1 0 0 0 0 0 0
30 0 0 0 0 1 0 0 0 0 0
31 0 0 0 0 0 1 0 0 0 0
32 0 0 0 0 0 0 1 0 0 0
33 0 0 0 0 0 0 0 1 0 0
34 0 0 0 0 0 0 0 0 1 0
35 0 0 0 0 0 0 0 0 0 1
36 0 0 0 0 0 0 0 0 0 0
37 0 0 0 0 0 0 0 0 0 0
38 1 0 0 0 0 0 0 0 0 0
39 0 1 0 0 0 0 0 0 0 0
40 0 0 1 0 0 0 0 0 0 0
41 0 0 0 1 0 0 0 0 0 0
42 0 0 0 0 1 0 0 0 0 0
43 0 0 0 0 0 1 0 0 0 0
44 0 0 0 0 0 0 1 0 0 0
45 0 0 0 0 0 0 0 1 0 0
46 0 0 0 0 0 0 0 0 1 0
47 0 0 0 0 0 0 0 0 0 1
48 0 0 0 0 0 0 0 0 0 0
49 0 0 0 0 0 0 0 0 0 0
50 1 0 0 0 0 0 0 0 0 0
51 0 1 0 0 0 0 0 0 0 0
52 0 0 1 0 0 0 0 0 0 0
53 0 0 0 1 0 0 0 0 0 0
54 0 0 0 0 1 0 0 0 0 0
55 0 0 0 0 0 1 0 0 0 0
56 0 0 0 0 0 0 1 0 0 0
57 0 0 0 0 0 0 0 1 0 0
58 0 0 0 0 0 0 0 0 1 0
59 0 0 0 0 0 0 0 0 0 1
60 0 0 0 0 0 0 0 0 0 0
61 0 0 0 0 0 0 0 0 0 0
62 1 0 0 0 0 0 0 0 0 0
63 0 1 0 0 0 0 0 0 0 0
64 0 0 1 0 0 0 0 0 0 0
65 0 0 0 1 0 0 0 0 0 0
66 0 0 0 0 1 0 0 0 0 0
67 0 0 0 0 0 1 0 0 0 0
68 0 0 0 0 0 0 1 0 0 0
69 0 0 0 0 0 0 0 1 0 0
70 0 0 0 0 0 0 0 0 1 0
71 0 0 0 0 0 0 0 0 0 1
72 0 0 0 0 0 0 0 0 0 0
73 0 0 0 0 0 0 0 0 0 0
74 1 0 0 0 0 0 0 0 0 0
75 0 1 0 0 0 0 0 0 0 0
76 0 0 1 0 0 0 0 0 0 0
77 0 0 0 1 0 0 0 0 0 0
78 0 0 0 0 1 0 0 0 0 0
79 0 0 0 0 0 1 0 0 0 0
80 0 0 0 0 0 0 1 0 0 0
81 0 0 0 0 0 0 0 1 0 0
82 0 0 0 0 0 0 0 0 1 0
83 0 0 0 0 0 0 0 0 0 1
84 0 0 0 0 0 0 0 0 0 0
85 0 0 0 0 0 0 0 0 0 0
86 1 0 0 0 0 0 0 0 0 0
87 0 1 0 0 0 0 0 0 0 0
88 0 0 1 0 0 0 0 0 0 0
89 0 0 0 1 0 0 0 0 0 0
90 0 0 0 0 1 0 0 0 0 0
91 0 0 0 0 0 1 0 0 0 0
92 0 0 0 0 0 0 1 0 0 0
93 0 0 0 0 0 0 0 1 0 0
94 0 0 0 0 0 0 0 0 1 0
95 0 0 0 0 0 0 0 0 0 1
96 0 0 0 0 0 0 0 0 0 0
97 0 0 0 0 0 0 0 0 0 0
98 1 0 0 0 0 0 0 0 0 0
99 0 1 0 0 0 0 0 0 0 0
100 0 0 1 0 0 0 0 0 0 0
101 0 0 0 1 0 0 0 0 0 0
102 0 0 0 0 1 0 0 0 0 0
103 0 0 0 0 0 1 0 0 0 0
104 0 0 0 0 0 0 1 0 0 0
105 0 0 0 0 0 0 0 1 0 0
106 0 0 0 0 0 0 0 0 1 0
107 0 0 0 0 0 0 0 0 0 1
108 0 0 0 0 0 0 0 0 0 0
109 0 0 0 0 0 0 0 0 0 0
110 1 0 0 0 0 0 0 0 0 0
111 0 1 0 0 0 0 0 0 0 0
112 0 0 1 0 0 0 0 0 0 0
113 0 0 0 1 0 0 0 0 0 0
114 0 0 0 0 1 0 0 0 0 0
115 0 0 0 0 0 1 0 0 0 0
116 0 0 0 0 0 0 1 0 0 0
117 0 0 0 0 0 0 0 1 0 0
118 0 0 0 0 0 0 0 0 1 0
119 0 0 0 0 0 0 0 0 0 1
120 0 0 0 0 0 0 0 0 0 0
121 0 0 0 0 0 0 0 0 0 0
122 1 0 0 0 0 0 0 0 0 0
123 0 1 0 0 0 0 0 0 0 0
124 0 0 1 0 0 0 0 0 0 0
125 0 0 0 1 0 0 0 0 0 0
126 0 0 0 0 1 0 0 0 0 0
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) VOLUME LINKEDIN NASDAQ INFLATION
1.103e+02 -5.298e-09 5.296e-01 -4.221e-02 -7.151e+02
CONS.CONF FED.FUNDS.RATE M1 M2 M3
-1.910e-01 5.705e+01 4.967e-01 6.171e-01 5.830e-02
M4 M5 M6 M7 M8
4.171e-01 1.609e-01 2.856e-01 -1.417e-03 -4.343e-01
M9 M10 M11
-9.367e-01 -1.490e+00 -9.470e-01
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-4.2571 -1.5544 -0.1672 1.4290 7.6951
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.103e+02 1.100e+01 10.026 < 2e-16 ***
VOLUME -5.298e-09 6.064e-09 -0.874 0.384228
LINKEDIN 5.296e-01 5.862e-02 9.034 7.28e-15 ***
NASDAQ -4.221e-02 4.851e-03 -8.701 4.11e-14 ***
INFLATION -7.151e+02 1.476e+02 -4.844 4.29e-06 ***
CONS.CONF -1.910e-01 6.784e-02 -2.816 0.005779 **
FED.FUNDS.RATE 5.705e+01 1.581e+01 3.609 0.000467 ***
M1 4.967e-01 9.930e-01 0.500 0.617931
M2 6.171e-01 9.928e-01 0.622 0.535522
M3 5.830e-02 9.976e-01 0.058 0.953504
M4 4.171e-01 9.964e-01 0.419 0.676364
M5 1.609e-01 9.924e-01 0.162 0.871530
M6 2.856e-01 1.009e+00 0.283 0.777782
M7 -1.417e-03 1.043e+00 -0.001 0.998919
M8 -4.343e-01 1.028e+00 -0.422 0.673563
M9 -9.367e-01 1.017e+00 -0.921 0.358945
M10 -1.490e+00 1.013e+00 -1.471 0.144222
M11 -9.470e-01 1.009e+00 -0.938 0.350197
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 2.247 on 108 degrees of freedom
Multiple R-squared: 0.7827, Adjusted R-squared: 0.7485
F-statistic: 22.88 on 17 and 108 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,] 0.064541422 0.129082844 0.935458578
[2,] 0.019611708 0.039223416 0.980388292
[3,] 0.011721599 0.023443199 0.988278401
[4,] 0.003675699 0.007351398 0.996324301
[5,] 0.005524355 0.011048711 0.994475645
[6,] 0.027974766 0.055949533 0.972025234
[7,] 0.084324918 0.168649836 0.915675082
[8,] 0.061992657 0.123985314 0.938007343
[9,] 0.044783640 0.089567281 0.955216360
[10,] 0.029539591 0.059079182 0.970460409
[11,] 0.031976118 0.063952237 0.968023882
[12,] 0.032314892 0.064629784 0.967685108
[13,] 0.028736891 0.057473782 0.971263109
[14,] 0.044994005 0.089988010 0.955005995
[15,] 0.061348697 0.122697393 0.938651303
[16,] 0.063325231 0.126650463 0.936674769
[17,] 0.070144529 0.140289058 0.929855471
[18,] 0.078861409 0.157722818 0.921138591
[19,] 0.072069206 0.144138413 0.927930794
[20,] 0.076801881 0.153603762 0.923198119
[21,] 0.257888999 0.515777998 0.742111001
[22,] 0.252098957 0.504197914 0.747901043
[23,] 0.211265683 0.422531367 0.788734317
[24,] 0.174293007 0.348586015 0.825706993
[25,] 0.286869079 0.573738157 0.713130921
[26,] 0.505478212 0.989043576 0.494521788
[27,] 0.500053088 0.999893824 0.499946912
[28,] 0.478431269 0.956862537 0.521568731
[29,] 0.466888128 0.933776257 0.533111872
[30,] 0.446033770 0.892067540 0.553966230
[31,] 0.433701418 0.867402836 0.566298582
[32,] 0.396118425 0.792236850 0.603881575
[33,] 0.525773028 0.948453944 0.474226972
[34,] 0.702697483 0.594605035 0.297302517
[35,] 0.659067473 0.681865053 0.340932527
[36,] 0.611154111 0.777691779 0.388845889
[37,] 0.575693236 0.848613528 0.424306764
[38,] 0.542206839 0.915586322 0.457793161
[39,] 0.539701125 0.920597750 0.460298875
[40,] 0.552873912 0.894252175 0.447126088
[41,] 0.561487769 0.877024462 0.438512231
[42,] 0.644330031 0.711339938 0.355669969
[43,] 0.736070296 0.527859407 0.263929704
[44,] 0.801034022 0.397931956 0.198965978
[45,] 0.895067646 0.209864708 0.104932354
[46,] 0.997993415 0.004013171 0.002006585
[47,] 0.997807824 0.004384352 0.002192176
[48,] 0.997708917 0.004582165 0.002291083
[49,] 0.996856468 0.006287064 0.003143532
[50,] 0.995165636 0.009668728 0.004834364
[51,] 0.992586827 0.014826346 0.007413173
[52,] 0.989643092 0.020713816 0.010356908
[53,] 0.986386674 0.027226652 0.013613326
[54,] 0.980642673 0.038714653 0.019357327
[55,] 0.973648750 0.052702500 0.026351250
[56,] 0.963976998 0.072046005 0.036023002
[57,] 0.964745875 0.070508251 0.035254125
[58,] 0.952888274 0.094223452 0.047111726
[59,] 0.942907348 0.114185303 0.057092652
[60,] 0.947990042 0.104019917 0.052009958
[61,] 0.937212849 0.125574301 0.062787151
[62,] 0.913306140 0.173387719 0.086693860
[63,] 0.892681661 0.214636678 0.107318339
[64,] 0.866639988 0.266720024 0.133360012
[65,] 0.839576502 0.320846997 0.160423498
[66,] 0.798271586 0.403456829 0.201728414
[67,] 0.773150925 0.453698151 0.226849075
[68,] 0.775507426 0.448985147 0.224492574
[69,] 0.810427380 0.379145240 0.189572620
[70,] 0.831267655 0.337464689 0.168732345
[71,] 0.841124850 0.317750301 0.158875150
[72,] 0.945647750 0.108704501 0.054352250
[73,] 0.984933322 0.030133355 0.015066678
[74,] 0.974297710 0.051404580 0.025702290
[75,] 0.956953882 0.086092235 0.043046118
[76,] 0.931045207 0.137909586 0.068954793
[77,] 0.900864501 0.198270999 0.099135499
[78,] 0.872797382 0.254405236 0.127202618
[79,] 0.871449470 0.257101059 0.128550530
[80,] 0.934032522 0.131934957 0.065967478
[81,] 0.970358243 0.059283514 0.029641757
[82,] 0.953907199 0.092185602 0.046092801
[83,] 0.904795780 0.190408441 0.095204220
[84,] 0.820687876 0.358624248 0.179312124
[85,] 0.672811036 0.654377927 0.327188964
> postscript(file="/var/fisher/rcomp/tmp/1y8jw1356019656.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/fisher/rcomp/tmp/2zm4b1356019656.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/fisher/rcomp/tmp/3bg591356019656.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/fisher/rcomp/tmp/4djea1356019656.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/fisher/rcomp/tmp/5cqah1356019656.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 = 126
Frequency = 1
1 2 3 4 5 6
-1.08317452 -1.87789574 -2.56873841 1.46284224 -0.10220474 -0.09726110
7 8 9 10 11 12
-0.79269362 1.86207717 0.07191303 0.92976412 1.24709905 1.55035490
13 14 15 16 17 18
2.84716836 2.97251476 1.85350687 1.91688733 0.56092218 1.01989951
19 20 21 22 23 24
2.58656333 2.28842205 7.69506455 1.88516836 2.88143204 2.37170980
25 26 27 28 29 30
0.17437871 3.40933463 3.83399289 1.54215872 -1.74602429 -1.26679053
31 32 33 34 35 36
-2.02843982 -0.92479917 2.06241341 3.04414146 1.80390217 -0.11331111
37 38 39 40 41 42
-1.99060869 -1.13886633 0.09680080 -1.71380731 -3.42380910 -3.73284427
43 44 45 46 47 48
-0.79101232 -0.44837933 -4.25714945 -3.83528595 -1.29643465 -1.53868645
49 50 51 52 53 54
-1.66606242 -0.68501645 -0.09099951 -0.32508029 1.13714222 0.65831960
55 56 57 58 59 60
1.96836596 2.36945510 0.23948841 0.98978678 -0.33513950 -0.48292975
61 62 63 64 65 66
-0.90041892 -2.14295903 -2.49175113 -3.87178807 -3.11923937 -0.04078152
67 68 69 70 71 72
-3.33214903 -2.87057379 -1.77160695 -2.16064085 -1.99515697 -1.51080771
73 74 75 76 77 78
-0.73214725 -0.89599098 -0.18809009 -0.32310173 1.77667106 -0.15599853
79 80 81 82 83 84
1.07696678 -1.71866650 -1.65840754 -1.39126487 -0.17830679 1.97626564
85 86 87 88 89 90
1.25084340 0.55907896 -0.20798993 0.63279669 0.93496966 -0.29441003
91 92 93 94 95 96
-0.18736995 -0.25165159 -0.77982667 1.07270052 1.16145175 1.56969319
97 98 99 100 101 102
3.21763722 1.20221472 -0.57077902 0.12970375 1.32761808 2.42805274
103 104 105 106 107 108
2.97421584 3.13399435 0.42580199 0.31218733 -1.25029748 -2.26268929
109 110 111 112 113 114
-0.09734260 -2.49335256 -1.59722150 -1.91414276 -2.48138466 -3.79069424
115 116 117 118 119 120
-1.47444716 -3.43987829 -2.02769077 -0.84655690 -2.03854961 -1.55959920
121 122 123 124 125 126
-1.02027330 1.09093803 1.93126903 2.46353143 5.13533896 5.27250837
> postscript(file="/var/fisher/rcomp/tmp/6sh2c1356019656.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 = 126
Frequency = 1
lag(myerror, k = 1) myerror
0 -1.08317452 NA
1 -1.87789574 -1.08317452
2 -2.56873841 -1.87789574
3 1.46284224 -2.56873841
4 -0.10220474 1.46284224
5 -0.09726110 -0.10220474
6 -0.79269362 -0.09726110
7 1.86207717 -0.79269362
8 0.07191303 1.86207717
9 0.92976412 0.07191303
10 1.24709905 0.92976412
11 1.55035490 1.24709905
12 2.84716836 1.55035490
13 2.97251476 2.84716836
14 1.85350687 2.97251476
15 1.91688733 1.85350687
16 0.56092218 1.91688733
17 1.01989951 0.56092218
18 2.58656333 1.01989951
19 2.28842205 2.58656333
20 7.69506455 2.28842205
21 1.88516836 7.69506455
22 2.88143204 1.88516836
23 2.37170980 2.88143204
24 0.17437871 2.37170980
25 3.40933463 0.17437871
26 3.83399289 3.40933463
27 1.54215872 3.83399289
28 -1.74602429 1.54215872
29 -1.26679053 -1.74602429
30 -2.02843982 -1.26679053
31 -0.92479917 -2.02843982
32 2.06241341 -0.92479917
33 3.04414146 2.06241341
34 1.80390217 3.04414146
35 -0.11331111 1.80390217
36 -1.99060869 -0.11331111
37 -1.13886633 -1.99060869
38 0.09680080 -1.13886633
39 -1.71380731 0.09680080
40 -3.42380910 -1.71380731
41 -3.73284427 -3.42380910
42 -0.79101232 -3.73284427
43 -0.44837933 -0.79101232
44 -4.25714945 -0.44837933
45 -3.83528595 -4.25714945
46 -1.29643465 -3.83528595
47 -1.53868645 -1.29643465
48 -1.66606242 -1.53868645
49 -0.68501645 -1.66606242
50 -0.09099951 -0.68501645
51 -0.32508029 -0.09099951
52 1.13714222 -0.32508029
53 0.65831960 1.13714222
54 1.96836596 0.65831960
55 2.36945510 1.96836596
56 0.23948841 2.36945510
57 0.98978678 0.23948841
58 -0.33513950 0.98978678
59 -0.48292975 -0.33513950
60 -0.90041892 -0.48292975
61 -2.14295903 -0.90041892
62 -2.49175113 -2.14295903
63 -3.87178807 -2.49175113
64 -3.11923937 -3.87178807
65 -0.04078152 -3.11923937
66 -3.33214903 -0.04078152
67 -2.87057379 -3.33214903
68 -1.77160695 -2.87057379
69 -2.16064085 -1.77160695
70 -1.99515697 -2.16064085
71 -1.51080771 -1.99515697
72 -0.73214725 -1.51080771
73 -0.89599098 -0.73214725
74 -0.18809009 -0.89599098
75 -0.32310173 -0.18809009
76 1.77667106 -0.32310173
77 -0.15599853 1.77667106
78 1.07696678 -0.15599853
79 -1.71866650 1.07696678
80 -1.65840754 -1.71866650
81 -1.39126487 -1.65840754
82 -0.17830679 -1.39126487
83 1.97626564 -0.17830679
84 1.25084340 1.97626564
85 0.55907896 1.25084340
86 -0.20798993 0.55907896
87 0.63279669 -0.20798993
88 0.93496966 0.63279669
89 -0.29441003 0.93496966
90 -0.18736995 -0.29441003
91 -0.25165159 -0.18736995
92 -0.77982667 -0.25165159
93 1.07270052 -0.77982667
94 1.16145175 1.07270052
95 1.56969319 1.16145175
96 3.21763722 1.56969319
97 1.20221472 3.21763722
98 -0.57077902 1.20221472
99 0.12970375 -0.57077902
100 1.32761808 0.12970375
101 2.42805274 1.32761808
102 2.97421584 2.42805274
103 3.13399435 2.97421584
104 0.42580199 3.13399435
105 0.31218733 0.42580199
106 -1.25029748 0.31218733
107 -2.26268929 -1.25029748
108 -0.09734260 -2.26268929
109 -2.49335256 -0.09734260
110 -1.59722150 -2.49335256
111 -1.91414276 -1.59722150
112 -2.48138466 -1.91414276
113 -3.79069424 -2.48138466
114 -1.47444716 -3.79069424
115 -3.43987829 -1.47444716
116 -2.02769077 -3.43987829
117 -0.84655690 -2.02769077
118 -2.03854961 -0.84655690
119 -1.55959920 -2.03854961
120 -1.02027330 -1.55959920
121 1.09093803 -1.02027330
122 1.93126903 1.09093803
123 2.46353143 1.93126903
124 5.13533896 2.46353143
125 5.27250837 5.13533896
126 NA 5.27250837
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -1.87789574 -1.08317452
[2,] -2.56873841 -1.87789574
[3,] 1.46284224 -2.56873841
[4,] -0.10220474 1.46284224
[5,] -0.09726110 -0.10220474
[6,] -0.79269362 -0.09726110
[7,] 1.86207717 -0.79269362
[8,] 0.07191303 1.86207717
[9,] 0.92976412 0.07191303
[10,] 1.24709905 0.92976412
[11,] 1.55035490 1.24709905
[12,] 2.84716836 1.55035490
[13,] 2.97251476 2.84716836
[14,] 1.85350687 2.97251476
[15,] 1.91688733 1.85350687
[16,] 0.56092218 1.91688733
[17,] 1.01989951 0.56092218
[18,] 2.58656333 1.01989951
[19,] 2.28842205 2.58656333
[20,] 7.69506455 2.28842205
[21,] 1.88516836 7.69506455
[22,] 2.88143204 1.88516836
[23,] 2.37170980 2.88143204
[24,] 0.17437871 2.37170980
[25,] 3.40933463 0.17437871
[26,] 3.83399289 3.40933463
[27,] 1.54215872 3.83399289
[28,] -1.74602429 1.54215872
[29,] -1.26679053 -1.74602429
[30,] -2.02843982 -1.26679053
[31,] -0.92479917 -2.02843982
[32,] 2.06241341 -0.92479917
[33,] 3.04414146 2.06241341
[34,] 1.80390217 3.04414146
[35,] -0.11331111 1.80390217
[36,] -1.99060869 -0.11331111
[37,] -1.13886633 -1.99060869
[38,] 0.09680080 -1.13886633
[39,] -1.71380731 0.09680080
[40,] -3.42380910 -1.71380731
[41,] -3.73284427 -3.42380910
[42,] -0.79101232 -3.73284427
[43,] -0.44837933 -0.79101232
[44,] -4.25714945 -0.44837933
[45,] -3.83528595 -4.25714945
[46,] -1.29643465 -3.83528595
[47,] -1.53868645 -1.29643465
[48,] -1.66606242 -1.53868645
[49,] -0.68501645 -1.66606242
[50,] -0.09099951 -0.68501645
[51,] -0.32508029 -0.09099951
[52,] 1.13714222 -0.32508029
[53,] 0.65831960 1.13714222
[54,] 1.96836596 0.65831960
[55,] 2.36945510 1.96836596
[56,] 0.23948841 2.36945510
[57,] 0.98978678 0.23948841
[58,] -0.33513950 0.98978678
[59,] -0.48292975 -0.33513950
[60,] -0.90041892 -0.48292975
[61,] -2.14295903 -0.90041892
[62,] -2.49175113 -2.14295903
[63,] -3.87178807 -2.49175113
[64,] -3.11923937 -3.87178807
[65,] -0.04078152 -3.11923937
[66,] -3.33214903 -0.04078152
[67,] -2.87057379 -3.33214903
[68,] -1.77160695 -2.87057379
[69,] -2.16064085 -1.77160695
[70,] -1.99515697 -2.16064085
[71,] -1.51080771 -1.99515697
[72,] -0.73214725 -1.51080771
[73,] -0.89599098 -0.73214725
[74,] -0.18809009 -0.89599098
[75,] -0.32310173 -0.18809009
[76,] 1.77667106 -0.32310173
[77,] -0.15599853 1.77667106
[78,] 1.07696678 -0.15599853
[79,] -1.71866650 1.07696678
[80,] -1.65840754 -1.71866650
[81,] -1.39126487 -1.65840754
[82,] -0.17830679 -1.39126487
[83,] 1.97626564 -0.17830679
[84,] 1.25084340 1.97626564
[85,] 0.55907896 1.25084340
[86,] -0.20798993 0.55907896
[87,] 0.63279669 -0.20798993
[88,] 0.93496966 0.63279669
[89,] -0.29441003 0.93496966
[90,] -0.18736995 -0.29441003
[91,] -0.25165159 -0.18736995
[92,] -0.77982667 -0.25165159
[93,] 1.07270052 -0.77982667
[94,] 1.16145175 1.07270052
[95,] 1.56969319 1.16145175
[96,] 3.21763722 1.56969319
[97,] 1.20221472 3.21763722
[98,] -0.57077902 1.20221472
[99,] 0.12970375 -0.57077902
[100,] 1.32761808 0.12970375
[101,] 2.42805274 1.32761808
[102,] 2.97421584 2.42805274
[103,] 3.13399435 2.97421584
[104,] 0.42580199 3.13399435
[105,] 0.31218733 0.42580199
[106,] -1.25029748 0.31218733
[107,] -2.26268929 -1.25029748
[108,] -0.09734260 -2.26268929
[109,] -2.49335256 -0.09734260
[110,] -1.59722150 -2.49335256
[111,] -1.91414276 -1.59722150
[112,] -2.48138466 -1.91414276
[113,] -3.79069424 -2.48138466
[114,] -1.47444716 -3.79069424
[115,] -3.43987829 -1.47444716
[116,] -2.02769077 -3.43987829
[117,] -0.84655690 -2.02769077
[118,] -2.03854961 -0.84655690
[119,] -1.55959920 -2.03854961
[120,] -1.02027330 -1.55959920
[121,] 1.09093803 -1.02027330
[122,] 1.93126903 1.09093803
[123,] 2.46353143 1.93126903
[124,] 5.13533896 2.46353143
[125,] 5.27250837 5.13533896
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -1.87789574 -1.08317452
2 -2.56873841 -1.87789574
3 1.46284224 -2.56873841
4 -0.10220474 1.46284224
5 -0.09726110 -0.10220474
6 -0.79269362 -0.09726110
7 1.86207717 -0.79269362
8 0.07191303 1.86207717
9 0.92976412 0.07191303
10 1.24709905 0.92976412
11 1.55035490 1.24709905
12 2.84716836 1.55035490
13 2.97251476 2.84716836
14 1.85350687 2.97251476
15 1.91688733 1.85350687
16 0.56092218 1.91688733
17 1.01989951 0.56092218
18 2.58656333 1.01989951
19 2.28842205 2.58656333
20 7.69506455 2.28842205
21 1.88516836 7.69506455
22 2.88143204 1.88516836
23 2.37170980 2.88143204
24 0.17437871 2.37170980
25 3.40933463 0.17437871
26 3.83399289 3.40933463
27 1.54215872 3.83399289
28 -1.74602429 1.54215872
29 -1.26679053 -1.74602429
30 -2.02843982 -1.26679053
31 -0.92479917 -2.02843982
32 2.06241341 -0.92479917
33 3.04414146 2.06241341
34 1.80390217 3.04414146
35 -0.11331111 1.80390217
36 -1.99060869 -0.11331111
37 -1.13886633 -1.99060869
38 0.09680080 -1.13886633
39 -1.71380731 0.09680080
40 -3.42380910 -1.71380731
41 -3.73284427 -3.42380910
42 -0.79101232 -3.73284427
43 -0.44837933 -0.79101232
44 -4.25714945 -0.44837933
45 -3.83528595 -4.25714945
46 -1.29643465 -3.83528595
47 -1.53868645 -1.29643465
48 -1.66606242 -1.53868645
49 -0.68501645 -1.66606242
50 -0.09099951 -0.68501645
51 -0.32508029 -0.09099951
52 1.13714222 -0.32508029
53 0.65831960 1.13714222
54 1.96836596 0.65831960
55 2.36945510 1.96836596
56 0.23948841 2.36945510
57 0.98978678 0.23948841
58 -0.33513950 0.98978678
59 -0.48292975 -0.33513950
60 -0.90041892 -0.48292975
61 -2.14295903 -0.90041892
62 -2.49175113 -2.14295903
63 -3.87178807 -2.49175113
64 -3.11923937 -3.87178807
65 -0.04078152 -3.11923937
66 -3.33214903 -0.04078152
67 -2.87057379 -3.33214903
68 -1.77160695 -2.87057379
69 -2.16064085 -1.77160695
70 -1.99515697 -2.16064085
71 -1.51080771 -1.99515697
72 -0.73214725 -1.51080771
73 -0.89599098 -0.73214725
74 -0.18809009 -0.89599098
75 -0.32310173 -0.18809009
76 1.77667106 -0.32310173
77 -0.15599853 1.77667106
78 1.07696678 -0.15599853
79 -1.71866650 1.07696678
80 -1.65840754 -1.71866650
81 -1.39126487 -1.65840754
82 -0.17830679 -1.39126487
83 1.97626564 -0.17830679
84 1.25084340 1.97626564
85 0.55907896 1.25084340
86 -0.20798993 0.55907896
87 0.63279669 -0.20798993
88 0.93496966 0.63279669
89 -0.29441003 0.93496966
90 -0.18736995 -0.29441003
91 -0.25165159 -0.18736995
92 -0.77982667 -0.25165159
93 1.07270052 -0.77982667
94 1.16145175 1.07270052
95 1.56969319 1.16145175
96 3.21763722 1.56969319
97 1.20221472 3.21763722
98 -0.57077902 1.20221472
99 0.12970375 -0.57077902
100 1.32761808 0.12970375
101 2.42805274 1.32761808
102 2.97421584 2.42805274
103 3.13399435 2.97421584
104 0.42580199 3.13399435
105 0.31218733 0.42580199
106 -1.25029748 0.31218733
107 -2.26268929 -1.25029748
108 -0.09734260 -2.26268929
109 -2.49335256 -0.09734260
110 -1.59722150 -2.49335256
111 -1.91414276 -1.59722150
112 -2.48138466 -1.91414276
113 -3.79069424 -2.48138466
114 -1.47444716 -3.79069424
115 -3.43987829 -1.47444716
116 -2.02769077 -3.43987829
117 -0.84655690 -2.02769077
118 -2.03854961 -0.84655690
119 -1.55959920 -2.03854961
120 -1.02027330 -1.55959920
121 1.09093803 -1.02027330
122 1.93126903 1.09093803
123 2.46353143 1.93126903
124 5.13533896 2.46353143
125 5.27250837 5.13533896
> 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/fisher/rcomp/tmp/7m1lj1356019656.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/fisher/rcomp/tmp/8aecs1356019656.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/fisher/rcomp/tmp/9fcdi1356019656.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/fisher/rcomp/tmp/10an4i1356019656.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/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/fisher/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/fisher/rcomp/tmp/11mfad1356019656.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/fisher/rcomp/tmp/12jqgz1356019656.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/fisher/rcomp/tmp/13xtdp1356019656.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/fisher/rcomp/tmp/14vl7f1356019657.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/fisher/rcomp/tmp/15ak5d1356019657.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/fisher/rcomp/tmp/163sf51356019657.tab")
+ }
>
> try(system("convert tmp/1y8jw1356019656.ps tmp/1y8jw1356019656.png",intern=TRUE))
character(0)
> try(system("convert tmp/2zm4b1356019656.ps tmp/2zm4b1356019656.png",intern=TRUE))
character(0)
> try(system("convert tmp/3bg591356019656.ps tmp/3bg591356019656.png",intern=TRUE))
character(0)
> try(system("convert tmp/4djea1356019656.ps tmp/4djea1356019656.png",intern=TRUE))
character(0)
> try(system("convert tmp/5cqah1356019656.ps tmp/5cqah1356019656.png",intern=TRUE))
character(0)
> try(system("convert tmp/6sh2c1356019656.ps tmp/6sh2c1356019656.png",intern=TRUE))
character(0)
> try(system("convert tmp/7m1lj1356019656.ps tmp/7m1lj1356019656.png",intern=TRUE))
character(0)
> try(system("convert tmp/8aecs1356019656.ps tmp/8aecs1356019656.png",intern=TRUE))
character(0)
> try(system("convert tmp/9fcdi1356019656.ps tmp/9fcdi1356019656.png",intern=TRUE))
character(0)
> try(system("convert tmp/10an4i1356019656.ps tmp/10an4i1356019656.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
7.321 1.701 9.031