R version 2.9.0 (2009-04-17)
Copyright (C) 2009 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
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(66
+ ,4818
+ ,4488
+ ,5
+ ,73
+ ,68
+ ,0
+ ,4964
+ ,54
+ ,3132
+ ,2916
+ ,12
+ ,58
+ ,54
+ ,1
+ ,3132
+ ,82
+ ,5576
+ ,3362
+ ,11
+ ,68
+ ,41
+ ,1
+ ,2788
+ ,61
+ ,3782
+ ,2989
+ ,6
+ ,62
+ ,49
+ ,1
+ ,3038
+ ,65
+ ,4225
+ ,3185
+ ,12
+ ,65
+ ,49
+ ,1
+ ,3185
+ ,77
+ ,6237
+ ,5544
+ ,11
+ ,81
+ ,72
+ ,1
+ ,5832
+ ,66
+ ,4818
+ ,5148
+ ,12
+ ,73
+ ,78
+ ,1
+ ,5694
+ ,66
+ ,4224
+ ,3828
+ ,7
+ ,64
+ ,58
+ ,0
+ ,3712
+ ,66
+ ,4488
+ ,3828
+ ,8
+ ,68
+ ,58
+ ,1
+ ,3944
+ ,48
+ ,2448
+ ,1104
+ ,13
+ ,51
+ ,23
+ ,1
+ ,1173
+ ,57
+ ,3876
+ ,2223
+ ,12
+ ,68
+ ,39
+ ,1
+ ,2652
+ ,80
+ ,4880
+ ,5040
+ ,13
+ ,61
+ ,63
+ ,1
+ ,3843
+ ,60
+ ,4140
+ ,2760
+ ,12
+ ,69
+ ,46
+ ,1
+ ,3174
+ ,70
+ ,5110
+ ,4060
+ ,12
+ ,73
+ ,58
+ ,1
+ ,4234
+ ,85
+ ,5185
+ ,3315
+ ,11
+ ,61
+ ,39
+ ,0
+ ,2379
+ ,59
+ ,3658
+ ,2596
+ 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4410
+ ,79
+ ,4819
+ ,3160
+ ,12
+ ,61
+ ,40
+ ,0
+ ,2440
+ ,73
+ ,5402
+ ,4453
+ ,11
+ ,74
+ ,61
+ ,1
+ ,4514
+ ,59
+ ,4779
+ ,2065
+ ,12
+ ,81
+ ,35
+ ,0
+ ,2835
+ ,64
+ ,3968
+ ,2496
+ ,12
+ ,62
+ ,39
+ ,1
+ ,2418
+ ,75
+ ,4800
+ ,2325
+ ,7
+ ,64
+ ,31
+ ,1
+ ,1984
+ ,68
+ ,4216
+ ,2448
+ ,12
+ ,62
+ ,36
+ ,1
+ ,2232
+ ,84
+ ,7140
+ ,4284
+ ,12
+ ,85
+ ,51
+ ,1
+ ,4335
+ ,68
+ ,5032
+ ,3740
+ ,9
+ ,74
+ ,55
+ ,1
+ ,4070
+ ,68
+ ,3468
+ ,4556
+ ,12
+ ,51
+ ,67
+ ,1
+ ,3417
+ ,69
+ ,4554
+ ,2760
+ ,12
+ ,66
+ ,40
+ ,1
+ ,2640)
+ ,dim=c(8
+ ,146)
+ ,dimnames=list(c('Groepsgevoel'
+ ,'InteractieGR_NV'
+ ,'InteractieGR_U'
+ ,'Vrienden_vinden'
+ ,'NVC'
+ ,'Uitingsangst'
+ ,'Geslacht'
+ ,'InteractieNV_U')
+ ,1:146))
> y <- array(NA,dim=c(8,146),dimnames=list(c('Groepsgevoel','InteractieGR_NV','InteractieGR_U','Vrienden_vinden','NVC','Uitingsangst','Geslacht','InteractieNV_U'),1:146))
> 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 = '4'
> #'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
Attaching package: 'zoo'
The following object(s) are masked from package:base :
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
Vrienden_vinden Groepsgevoel InteractieGR_NV InteractieGR_U NVC
1 5 66 4818 4488 73
2 12 54 3132 2916 58
3 11 82 5576 3362 68
4 6 61 3782 2989 62
5 12 65 4225 3185 65
6 11 77 6237 5544 81
7 12 66 4818 5148 73
8 7 66 4224 3828 64
9 8 66 4488 3828 68
10 13 48 2448 1104 51
11 12 57 3876 2223 68
12 13 80 4880 5040 61
13 12 60 4140 2760 69
14 12 70 5110 4060 73
15 11 85 5185 3315 61
16 12 59 3658 2596 62
17 12 72 4536 3528 63
18 12 70 4830 3990 69
19 11 74 3478 5624 47
20 13 70 4620 4410 66
21 9 51 2958 918 58
22 11 70 4410 2800 63
23 11 71 4899 4189 69
24 11 72 4248 4464 59
25 9 50 2950 3500 59
26 11 69 4347 4485 63
27 12 73 4745 4088 65
28 12 66 4290 2970 65
29 10 73 5183 4161 71
30 12 58 3480 2900 60
31 12 78 6318 3120 81
32 12 83 5561 4814 67
33 9 76 5016 3724 66
34 9 77 4774 3773 62
35 12 79 4977 2133 63
36 14 71 5183 3621 73
37 12 79 4345 5925 55
38 11 60 3540 3900 59
39 9 73 4672 3431 64
40 11 70 4410 3430 63
41 7 42 2688 2730 64
42 15 74 5402 4514 73
43 11 68 3672 3128 54
44 12 83 6308 5727 76
45 12 62 4588 3410 74
46 9 79 4977 6162 63
47 12 61 4453 3538 73
48 11 86 5762 2924 67
49 11 64 4352 4288 68
50 8 75 4950 3375 66
51 7 59 3658 4012 62
52 12 82 5822 4018 71
53 8 61 3843 1159 63
54 10 69 5175 4968 75
55 12 60 4620 3540 77
56 15 59 3658 2714 62
57 12 81 5994 4536 74
58 12 65 4355 2925 67
59 12 60 3360 3180 56
60 12 60 3600 4020 60
61 8 45 2610 3285 58
62 10 75 4875 3450 65
63 14 84 4116 5880 49
64 10 77 4697 2926 61
65 12 64 4224 3456 66
66 14 54 3456 2484 64
67 6 72 4680 3312 65
68 11 56 2576 2520 46
69 10 67 4355 3149 65
70 14 81 6561 2025 81
71 12 73 5256 4599 72
72 13 67 4355 3082 65
73 11 72 5328 4968 74
74 11 69 4071 2967 59
75 12 71 4899 3479 69
76 13 77 4466 3003 58
77 12 63 4473 4095 71
78 8 49 3871 2646 79
79 12 74 5032 3700 68
80 11 76 5016 3192 66
81 10 65 4030 2925 62
82 12 65 4485 3250 69
83 11 69 4347 3795 63
84 12 71 4402 2698 62
85 12 68 4148 2720 61
86 10 49 3185 2499 65
87 12 86 5504 4214 64
88 12 63 3528 2457 56
89 11 77 4312 4389 56
90 10 52 2496 1560 48
91 12 73 5402 3723 74
92 11 63 4347 3024 69
93 12 54 3348 3024 62
94 12 56 4088 3696 73
95 10 54 3456 3888 64
96 11 61 3477 1708 57
97 10 70 3990 3640 57
98 11 68 4080 3604 60
99 11 63 3843 4410 61
100 12 76 5472 4788 72
101 11 69 3933 3174 57
102 11 71 3621 3195 51
103 7 39 2457 2652 63
104 12 54 2916 2916 54
105 8 64 4608 3840 72
106 10 70 4340 3500 62
107 12 76 5168 5016 68
108 11 71 4402 3976 62
109 13 73 4599 3942 63
110 9 81 6237 5832 77
111 11 50 2850 1700 57
112 13 42 2394 1638 57
113 8 66 4026 4356 61
114 12 77 5005 2079 65
115 11 62 3906 3906 63
116 11 66 4356 4290 66
117 12 69 4692 4347 68
118 13 72 5184 3528 72
119 11 67 4556 2814 68
120 10 59 3481 3009 59
121 10 66 3696 3300 56
122 10 68 4216 4352 62
123 12 72 5184 4896 72
124 12 73 4964 4818 68
125 13 69 4623 4071 67
126 11 57 3078 1824 54
127 11 55 3795 3410 69
128 12 72 4392 3744 61
129 9 68 3740 2312 55
130 11 83 6225 5229 75
131 12 74 4070 3552 55
132 12 72 3528 3816 49
133 13 66 3564 2574 54
134 6 61 4026 3111 66
135 11 86 6278 5160 73
136 10 81 5103 5670 63
137 12 79 4819 3160 61
138 11 73 5402 4453 74
139 12 59 4779 2065 81
140 12 64 3968 2496 62
141 7 75 4800 2325 64
142 12 68 4216 2448 62
143 12 84 7140 4284 85
144 9 68 5032 3740 74
145 12 68 3468 4556 51
146 12 69 4554 2760 66
Uitingsangst Geslacht InteractieNV_U
1 68 0 4964
2 54 1 3132
3 41 1 2788
4 49 1 3038
5 49 1 3185
6 72 1 5832
7 78 1 5694
8 58 0 3712
9 58 1 3944
10 23 1 1173
11 39 1 2652
12 63 1 3843
13 46 1 3174
14 58 1 4234
15 39 0 2379
16 44 0 2728
17 49 1 3087
18 57 1 3933
19 76 0 3572
20 63 0 4158
21 18 1 1044
22 40 0 2520
23 59 1 4071
24 62 0 3658
25 70 1 4130
26 65 0 4095
27 56 0 3640
28 45 1 2925
29 57 0 4047
30 50 1 3000
31 40 0 3240
32 58 1 3886
33 49 0 3234
34 49 1 3038
35 27 1 1701
36 51 0 3723
37 75 0 4125
38 65 1 3835
39 47 1 3008
40 49 0 3087
41 65 1 4160
42 61 1 4453
43 46 1 2484
44 69 1 5244
45 55 0 4070
46 78 0 4914
47 58 0 4234
48 34 0 2278
49 67 0 4556
50 45 1 2970
51 68 0 4216
52 49 0 3479
53 19 1 1197
54 72 1 5400
55 59 1 4543
56 46 0 2852
57 56 1 4144
58 45 0 3015
59 53 0 2968
60 67 0 4020
61 73 0 4234
62 46 1 2990
63 70 0 3430
64 38 1 2318
65 54 0 3564
66 46 0 2944
67 46 0 2990
68 45 1 2070
69 47 0 3055
70 25 0 2025
71 63 1 4536
72 46 0 2990
73 69 0 5106
74 43 1 2537
75 49 1 3381
76 39 0 2262
77 65 1 4615
78 54 0 4266
79 50 0 3400
80 42 1 2772
81 45 0 2790
82 50 1 3450
83 55 0 3465
84 38 1 2356
85 40 1 2440
86 51 0 3315
87 49 1 3136
88 39 0 2184
89 57 0 3192
90 30 1 1440
91 51 1 3774
92 48 1 3312
93 56 1 3472
94 66 1 4818
95 72 1 4608
96 28 1 1596
97 52 1 2964
98 53 0 3180
99 70 0 4270
100 63 1 4536
101 46 1 2622
102 45 1 2295
103 68 1 4284
104 54 1 2916
105 60 1 4320
106 50 1 3100
107 66 1 4488
108 56 1 3472
109 54 0 3402
110 72 1 5544
111 34 1 1938
112 39 1 2223
113 66 1 4026
114 27 1 1755
115 63 1 3969
116 65 0 4290
117 63 1 4284
118 49 1 3528
119 42 1 2856
120 51 1 3009
121 50 1 2800
122 64 1 3968
123 68 0 4896
124 66 0 4488
125 59 1 3953
126 32 1 1728
127 62 0 4278
128 52 1 3172
129 34 1 1870
130 63 0 4725
131 48 1 2640
132 53 1 2597
133 39 0 2106
134 51 1 3366
135 60 1 4380
136 70 0 4410
137 40 0 2440
138 61 1 4514
139 35 0 2835
140 39 1 2418
141 31 1 1984
142 36 1 2232
143 51 1 4335
144 55 1 4070
145 67 1 3417
146 40 1 2640
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Groepsgevoel InteractieGR_NV InteractieGR_U
16.344796 -0.197146 0.001497 0.002537
NVC Uitingsangst Geslacht InteractieNV_U
0.037805 -0.026187 -0.203207 -0.002508
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-5.4611 -0.8165 0.3071 1.0426 3.9388
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 16.344796 8.896113 1.837 0.0683 .
Groepsgevoel -0.197146 0.136624 -1.443 0.1513
InteractieGR_NV 0.001497 0.001978 0.757 0.4504
InteractieGR_U 0.002537 0.001083 2.343 0.0205 *
NVC 0.037805 0.146736 0.258 0.7971
Uitingsangst -0.026187 0.101626 -0.258 0.7970
Geslacht -0.203207 0.315033 -0.645 0.5200
InteractieNV_U -0.002508 0.001589 -1.579 0.1166
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 1.746 on 138 degrees of freedom
Multiple R-squared: 0.1013, Adjusted R-squared: 0.05574
F-statistic: 2.223 on 7 and 138 DF, p-value: 0.03591
> 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.99593411 0.008131787 0.0040658934
[2,] 0.99388237 0.012235263 0.0061176314
[3,] 0.99021503 0.019569939 0.0097849697
[4,] 0.98350179 0.032996418 0.0164982090
[5,] 0.98593793 0.028124131 0.0140620656
[6,] 0.99655286 0.006894273 0.0034471366
[7,] 0.99363700 0.012725996 0.0063629980
[8,] 0.99006000 0.019880000 0.0099399999
[9,] 0.98442815 0.031143697 0.0155718487
[10,] 0.99452644 0.010947112 0.0054735559
[11,] 0.99746090 0.005078209 0.0025391043
[12,] 0.99609937 0.007801263 0.0039006313
[13,] 0.99347451 0.013050987 0.0065254936
[14,] 0.98978825 0.020423505 0.0102117527
[15,] 0.98500732 0.029985365 0.0149926825
[16,] 0.97891368 0.042172634 0.0210863172
[17,] 0.97399738 0.052005233 0.0260026167
[18,] 0.96537486 0.069250287 0.0346251437
[19,] 0.95366898 0.092662038 0.0463310190
[20,] 0.94376147 0.112477056 0.0562385281
[21,] 0.92546960 0.149060799 0.0745303994
[22,] 0.90345619 0.193087619 0.0965438093
[23,] 0.90765282 0.184694365 0.0923471825
[24,] 0.92458102 0.150837964 0.0754189820
[25,] 0.90766356 0.184672872 0.0923364358
[26,] 0.94632944 0.107341118 0.0536705588
[27,] 0.92981011 0.140379781 0.0701898905
[28,] 0.90968302 0.180633966 0.0903169828
[29,] 0.91884495 0.162310095 0.0811550477
[30,] 0.89702520 0.205949608 0.1029748041
[31,] 0.89204316 0.215913674 0.1079568370
[32,] 0.94926383 0.101472339 0.0507361697
[33,] 0.93361179 0.132776420 0.0663882099
[34,] 0.92032943 0.159341143 0.0796705714
[35,] 0.91952060 0.160958803 0.0804794015
[36,] 0.94248742 0.115025157 0.0575125783
[37,] 0.94152350 0.116952993 0.0584764963
[38,] 0.92473137 0.150537264 0.0752686322
[39,] 0.90885157 0.182296865 0.0911484323
[40,] 0.94815680 0.103686403 0.0518432014
[41,] 0.97038204 0.059235916 0.0296179582
[42,] 0.96091968 0.078160637 0.0390803184
[43,] 0.98413853 0.031722943 0.0158614716
[44,] 0.97878279 0.042434427 0.0212172133
[45,] 0.97933744 0.041325118 0.0206625591
[46,] 0.99515290 0.009694201 0.0048471004
[47,] 0.99318216 0.013635687 0.0068178434
[48,] 0.99099548 0.018009038 0.0090045190
[49,] 0.98932975 0.021340494 0.0106702472
[50,] 0.98808410 0.023831791 0.0119158956
[51,] 0.98717278 0.025654430 0.0128272152
[52,] 0.98436405 0.031271899 0.0156359494
[53,] 0.98369472 0.032610565 0.0163052825
[54,] 0.97930300 0.041393993 0.0206969966
[55,] 0.97461760 0.050764803 0.0253824015
[56,] 0.98510347 0.029793057 0.0148965287
[57,] 0.99939356 0.001212877 0.0006064387
[58,] 0.99911199 0.001776028 0.0008880141
[59,] 0.99896274 0.002074528 0.0010372639
[60,] 0.99856595 0.002868098 0.0014340490
[61,] 0.99819008 0.003619844 0.0018099218
[62,] 0.99813469 0.003730624 0.0018653118
[63,] 0.99724024 0.005519530 0.0027597649
[64,] 0.99600420 0.007991592 0.0039957962
[65,] 0.99473594 0.010528117 0.0052640583
[66,] 0.99532242 0.009355151 0.0046775753
[67,] 0.99579021 0.008419582 0.0042097910
[68,] 0.99621625 0.007567500 0.0037837499
[69,] 0.99466782 0.010664353 0.0053321764
[70,] 0.99240059 0.015198811 0.0075994054
[71,] 0.99135715 0.017285690 0.0086428451
[72,] 0.98944193 0.021116143 0.0105580717
[73,] 0.98554738 0.028905240 0.0144526198
[74,] 0.98205049 0.035899010 0.0179495051
[75,] 0.97807585 0.043848297 0.0219241483
[76,] 0.97299267 0.054014667 0.0270073336
[77,] 0.96584053 0.068318930 0.0341594651
[78,] 0.95692113 0.086157738 0.0430788692
[79,] 0.94629417 0.107411664 0.0537058319
[80,] 0.93742104 0.125157927 0.0625789633
[81,] 0.92579843 0.148403142 0.0742015708
[82,] 0.90566702 0.188665964 0.0943329819
[83,] 0.90261011 0.194779787 0.0973898934
[84,] 0.94470158 0.110596834 0.0552984170
[85,] 0.93380929 0.132381411 0.0661907057
[86,] 0.91453708 0.170925842 0.0854629209
[87,] 0.89849553 0.203008935 0.1015044677
[88,] 0.87826234 0.243475318 0.1217376588
[89,] 0.84988279 0.300234414 0.1501172069
[90,] 0.84048942 0.319021155 0.1595105775
[91,] 0.80421002 0.391579962 0.1957899811
[92,] 0.76411022 0.471779556 0.2358897780
[93,] 0.76307814 0.473843722 0.2369218612
[94,] 0.72594713 0.548105745 0.2740528726
[95,] 0.73788688 0.524226244 0.2621131221
[96,] 0.70045596 0.599088084 0.2995440420
[97,] 0.68368364 0.632632725 0.3163163626
[98,] 0.63017624 0.739647520 0.3698237599
[99,] 0.60239309 0.795213812 0.3976069058
[100,] 0.59225459 0.815490817 0.4077454084
[101,] 0.53817833 0.923643343 0.4618216717
[102,] 0.52599668 0.948006643 0.4740033217
[103,] 0.61444686 0.771106286 0.3855531430
[104,] 0.57046898 0.859062030 0.4295310150
[105,] 0.50775181 0.984496377 0.4922481885
[106,] 0.44611940 0.892238806 0.5538805969
[107,] 0.42124229 0.842484581 0.5787577097
[108,] 0.46199437 0.923988737 0.5380056315
[109,] 0.39794465 0.795889297 0.6020553513
[110,] 0.34702461 0.694049226 0.6529753868
[111,] 0.30211499 0.604229980 0.6978850100
[112,] 0.25563883 0.511277653 0.7443611734
[113,] 0.21109582 0.422191648 0.7889041759
[114,] 0.16416677 0.328333536 0.8358332322
[115,] 0.21793050 0.435860998 0.7820695009
[116,] 0.16523146 0.330462916 0.8347685418
[117,] 0.13981008 0.279620165 0.8601899177
[118,] 0.12120385 0.242407694 0.8787961528
[119,] 0.12365988 0.247319758 0.8763401209
[120,] 0.08552286 0.171045722 0.9144771388
[121,] 0.07052818 0.141056368 0.9294718161
[122,] 0.05278000 0.105560004 0.9472199981
[123,] 0.03051120 0.061022392 0.9694888041
[124,] 0.36094895 0.721897904 0.6390510481
[125,] 0.39560568 0.791211361 0.6043943193
> postscript(file="/var/www/html/rcomp/tmp/1pbv11291290953.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/html/rcomp/tmp/2z2dm1291290953.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/html/rcomp/tmp/3z2dm1291290953.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/html/rcomp/tmp/4z2dm1291290953.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/html/rcomp/tmp/5abup1291290953.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 = 146
Frequency = 1
1 2 3 4 5 6
-5.461089547 1.494245411 -0.357552933 -4.802009216 1.081364560 0.086532648
7 8 9 10 11 12
2.160486015 -3.959265944 -2.720589288 1.471901501 0.755284144 1.519703801
13 14 15 16 17 18
1.043836944 1.086539362 -0.078338840 0.874751776 0.955312359 1.053368456
19 20 21 22 23 24
-1.059213441 1.933828864 -2.947405492 -0.264346742 0.040827079 -0.267669662
25 26 27 28 29 30
-0.619122580 -0.037131346 0.710304843 0.969792496 -1.310409031 1.290974926
31 32 33 34 35 36
-0.230089235 0.415111618 -2.419913877 -2.121992432 1.161900166 2.619974906
37 38 39 40 41 42
-0.076716536 0.583265995 -2.093373999 -0.204902162 -2.095095983 3.913947943
43 44 45 46 47 48
0.224296171 0.334380156 1.209124153 -2.869037159 1.417052607 -0.364077947
49 50 51 52 53 54
0.489165461 -3.196494916 -3.357103018 0.235855893 -3.691428474 -0.296020268
55 56 57 58 59 60
1.818055724 3.938763876 0.408051930 0.736440537 1.100806362 1.464372124
61 62 63 64 65 66
-1.376308302 -1.160344900 1.718647861 -0.913922804 1.038701098 2.994166824
67 68 69 70 71 72
-5.312915614 0.279823619 -1.209289150 1.335407149 1.018085325 1.771477629
73 74 75 76 77 78
0.084953817 0.097941329 0.849651352 2.032474193 1.785960670 -2.065487629
79 80 81 82 83 84
0.589690180 -0.209053147 -1.152342636 1.066864883 -0.128553063 0.980847561
85 86 87 88 89 90
1.014734621 -0.600190928 0.610717787 0.942008267 -0.373855542 -1.001907642
91 92 93 94 95 96
0.720927731 0.054066228 1.650828439 2.454442924 0.489801121 -0.073092585
97 98 99 100 101 102
-0.908855788 -0.095187661 0.370328398 0.806611766 0.146715227 0.335250343
103 104 105 106 107 108
-1.715401578 1.427046668 -2.480703062 -0.977903128 0.792629871 0.008917273
109 110 111 112 113 114
1.725576121 -2.426776289 -0.267746154 1.840880694 -2.688764066 0.922538108
115 116 117 118 119 120
0.546910861 0.228420278 1.232379359 1.751102687 -0.200536156 -0.703366749
121 122 123 124 125 126
-0.820564742 -0.804435614 1.005896218 0.805766326 2.138760093 -0.009386445
127 128 129 130 131 132
0.910374976 0.990233997 -1.699285518 -0.902159104 1.141404184 1.138628761
133 134 135 136 137 138
2.062656728 -4.752966217 -0.880110981 -1.888752368 0.859192425 -0.013225595
139 140 141 142 143 144
-0.141833405 0.944794352 -4.072046173 0.938774036 -0.144525457 -1.906795231
145 146
0.910149409 0.815200917
> postscript(file="/var/www/html/rcomp/tmp/6abup1291290953.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 = 146
Frequency = 1
lag(myerror, k = 1) myerror
0 -5.461089547 NA
1 1.494245411 -5.461089547
2 -0.357552933 1.494245411
3 -4.802009216 -0.357552933
4 1.081364560 -4.802009216
5 0.086532648 1.081364560
6 2.160486015 0.086532648
7 -3.959265944 2.160486015
8 -2.720589288 -3.959265944
9 1.471901501 -2.720589288
10 0.755284144 1.471901501
11 1.519703801 0.755284144
12 1.043836944 1.519703801
13 1.086539362 1.043836944
14 -0.078338840 1.086539362
15 0.874751776 -0.078338840
16 0.955312359 0.874751776
17 1.053368456 0.955312359
18 -1.059213441 1.053368456
19 1.933828864 -1.059213441
20 -2.947405492 1.933828864
21 -0.264346742 -2.947405492
22 0.040827079 -0.264346742
23 -0.267669662 0.040827079
24 -0.619122580 -0.267669662
25 -0.037131346 -0.619122580
26 0.710304843 -0.037131346
27 0.969792496 0.710304843
28 -1.310409031 0.969792496
29 1.290974926 -1.310409031
30 -0.230089235 1.290974926
31 0.415111618 -0.230089235
32 -2.419913877 0.415111618
33 -2.121992432 -2.419913877
34 1.161900166 -2.121992432
35 2.619974906 1.161900166
36 -0.076716536 2.619974906
37 0.583265995 -0.076716536
38 -2.093373999 0.583265995
39 -0.204902162 -2.093373999
40 -2.095095983 -0.204902162
41 3.913947943 -2.095095983
42 0.224296171 3.913947943
43 0.334380156 0.224296171
44 1.209124153 0.334380156
45 -2.869037159 1.209124153
46 1.417052607 -2.869037159
47 -0.364077947 1.417052607
48 0.489165461 -0.364077947
49 -3.196494916 0.489165461
50 -3.357103018 -3.196494916
51 0.235855893 -3.357103018
52 -3.691428474 0.235855893
53 -0.296020268 -3.691428474
54 1.818055724 -0.296020268
55 3.938763876 1.818055724
56 0.408051930 3.938763876
57 0.736440537 0.408051930
58 1.100806362 0.736440537
59 1.464372124 1.100806362
60 -1.376308302 1.464372124
61 -1.160344900 -1.376308302
62 1.718647861 -1.160344900
63 -0.913922804 1.718647861
64 1.038701098 -0.913922804
65 2.994166824 1.038701098
66 -5.312915614 2.994166824
67 0.279823619 -5.312915614
68 -1.209289150 0.279823619
69 1.335407149 -1.209289150
70 1.018085325 1.335407149
71 1.771477629 1.018085325
72 0.084953817 1.771477629
73 0.097941329 0.084953817
74 0.849651352 0.097941329
75 2.032474193 0.849651352
76 1.785960670 2.032474193
77 -2.065487629 1.785960670
78 0.589690180 -2.065487629
79 -0.209053147 0.589690180
80 -1.152342636 -0.209053147
81 1.066864883 -1.152342636
82 -0.128553063 1.066864883
83 0.980847561 -0.128553063
84 1.014734621 0.980847561
85 -0.600190928 1.014734621
86 0.610717787 -0.600190928
87 0.942008267 0.610717787
88 -0.373855542 0.942008267
89 -1.001907642 -0.373855542
90 0.720927731 -1.001907642
91 0.054066228 0.720927731
92 1.650828439 0.054066228
93 2.454442924 1.650828439
94 0.489801121 2.454442924
95 -0.073092585 0.489801121
96 -0.908855788 -0.073092585
97 -0.095187661 -0.908855788
98 0.370328398 -0.095187661
99 0.806611766 0.370328398
100 0.146715227 0.806611766
101 0.335250343 0.146715227
102 -1.715401578 0.335250343
103 1.427046668 -1.715401578
104 -2.480703062 1.427046668
105 -0.977903128 -2.480703062
106 0.792629871 -0.977903128
107 0.008917273 0.792629871
108 1.725576121 0.008917273
109 -2.426776289 1.725576121
110 -0.267746154 -2.426776289
111 1.840880694 -0.267746154
112 -2.688764066 1.840880694
113 0.922538108 -2.688764066
114 0.546910861 0.922538108
115 0.228420278 0.546910861
116 1.232379359 0.228420278
117 1.751102687 1.232379359
118 -0.200536156 1.751102687
119 -0.703366749 -0.200536156
120 -0.820564742 -0.703366749
121 -0.804435614 -0.820564742
122 1.005896218 -0.804435614
123 0.805766326 1.005896218
124 2.138760093 0.805766326
125 -0.009386445 2.138760093
126 0.910374976 -0.009386445
127 0.990233997 0.910374976
128 -1.699285518 0.990233997
129 -0.902159104 -1.699285518
130 1.141404184 -0.902159104
131 1.138628761 1.141404184
132 2.062656728 1.138628761
133 -4.752966217 2.062656728
134 -0.880110981 -4.752966217
135 -1.888752368 -0.880110981
136 0.859192425 -1.888752368
137 -0.013225595 0.859192425
138 -0.141833405 -0.013225595
139 0.944794352 -0.141833405
140 -4.072046173 0.944794352
141 0.938774036 -4.072046173
142 -0.144525457 0.938774036
143 -1.906795231 -0.144525457
144 0.910149409 -1.906795231
145 0.815200917 0.910149409
146 NA 0.815200917
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 1.494245411 -5.461089547
[2,] -0.357552933 1.494245411
[3,] -4.802009216 -0.357552933
[4,] 1.081364560 -4.802009216
[5,] 0.086532648 1.081364560
[6,] 2.160486015 0.086532648
[7,] -3.959265944 2.160486015
[8,] -2.720589288 -3.959265944
[9,] 1.471901501 -2.720589288
[10,] 0.755284144 1.471901501
[11,] 1.519703801 0.755284144
[12,] 1.043836944 1.519703801
[13,] 1.086539362 1.043836944
[14,] -0.078338840 1.086539362
[15,] 0.874751776 -0.078338840
[16,] 0.955312359 0.874751776
[17,] 1.053368456 0.955312359
[18,] -1.059213441 1.053368456
[19,] 1.933828864 -1.059213441
[20,] -2.947405492 1.933828864
[21,] -0.264346742 -2.947405492
[22,] 0.040827079 -0.264346742
[23,] -0.267669662 0.040827079
[24,] -0.619122580 -0.267669662
[25,] -0.037131346 -0.619122580
[26,] 0.710304843 -0.037131346
[27,] 0.969792496 0.710304843
[28,] -1.310409031 0.969792496
[29,] 1.290974926 -1.310409031
[30,] -0.230089235 1.290974926
[31,] 0.415111618 -0.230089235
[32,] -2.419913877 0.415111618
[33,] -2.121992432 -2.419913877
[34,] 1.161900166 -2.121992432
[35,] 2.619974906 1.161900166
[36,] -0.076716536 2.619974906
[37,] 0.583265995 -0.076716536
[38,] -2.093373999 0.583265995
[39,] -0.204902162 -2.093373999
[40,] -2.095095983 -0.204902162
[41,] 3.913947943 -2.095095983
[42,] 0.224296171 3.913947943
[43,] 0.334380156 0.224296171
[44,] 1.209124153 0.334380156
[45,] -2.869037159 1.209124153
[46,] 1.417052607 -2.869037159
[47,] -0.364077947 1.417052607
[48,] 0.489165461 -0.364077947
[49,] -3.196494916 0.489165461
[50,] -3.357103018 -3.196494916
[51,] 0.235855893 -3.357103018
[52,] -3.691428474 0.235855893
[53,] -0.296020268 -3.691428474
[54,] 1.818055724 -0.296020268
[55,] 3.938763876 1.818055724
[56,] 0.408051930 3.938763876
[57,] 0.736440537 0.408051930
[58,] 1.100806362 0.736440537
[59,] 1.464372124 1.100806362
[60,] -1.376308302 1.464372124
[61,] -1.160344900 -1.376308302
[62,] 1.718647861 -1.160344900
[63,] -0.913922804 1.718647861
[64,] 1.038701098 -0.913922804
[65,] 2.994166824 1.038701098
[66,] -5.312915614 2.994166824
[67,] 0.279823619 -5.312915614
[68,] -1.209289150 0.279823619
[69,] 1.335407149 -1.209289150
[70,] 1.018085325 1.335407149
[71,] 1.771477629 1.018085325
[72,] 0.084953817 1.771477629
[73,] 0.097941329 0.084953817
[74,] 0.849651352 0.097941329
[75,] 2.032474193 0.849651352
[76,] 1.785960670 2.032474193
[77,] -2.065487629 1.785960670
[78,] 0.589690180 -2.065487629
[79,] -0.209053147 0.589690180
[80,] -1.152342636 -0.209053147
[81,] 1.066864883 -1.152342636
[82,] -0.128553063 1.066864883
[83,] 0.980847561 -0.128553063
[84,] 1.014734621 0.980847561
[85,] -0.600190928 1.014734621
[86,] 0.610717787 -0.600190928
[87,] 0.942008267 0.610717787
[88,] -0.373855542 0.942008267
[89,] -1.001907642 -0.373855542
[90,] 0.720927731 -1.001907642
[91,] 0.054066228 0.720927731
[92,] 1.650828439 0.054066228
[93,] 2.454442924 1.650828439
[94,] 0.489801121 2.454442924
[95,] -0.073092585 0.489801121
[96,] -0.908855788 -0.073092585
[97,] -0.095187661 -0.908855788
[98,] 0.370328398 -0.095187661
[99,] 0.806611766 0.370328398
[100,] 0.146715227 0.806611766
[101,] 0.335250343 0.146715227
[102,] -1.715401578 0.335250343
[103,] 1.427046668 -1.715401578
[104,] -2.480703062 1.427046668
[105,] -0.977903128 -2.480703062
[106,] 0.792629871 -0.977903128
[107,] 0.008917273 0.792629871
[108,] 1.725576121 0.008917273
[109,] -2.426776289 1.725576121
[110,] -0.267746154 -2.426776289
[111,] 1.840880694 -0.267746154
[112,] -2.688764066 1.840880694
[113,] 0.922538108 -2.688764066
[114,] 0.546910861 0.922538108
[115,] 0.228420278 0.546910861
[116,] 1.232379359 0.228420278
[117,] 1.751102687 1.232379359
[118,] -0.200536156 1.751102687
[119,] -0.703366749 -0.200536156
[120,] -0.820564742 -0.703366749
[121,] -0.804435614 -0.820564742
[122,] 1.005896218 -0.804435614
[123,] 0.805766326 1.005896218
[124,] 2.138760093 0.805766326
[125,] -0.009386445 2.138760093
[126,] 0.910374976 -0.009386445
[127,] 0.990233997 0.910374976
[128,] -1.699285518 0.990233997
[129,] -0.902159104 -1.699285518
[130,] 1.141404184 -0.902159104
[131,] 1.138628761 1.141404184
[132,] 2.062656728 1.138628761
[133,] -4.752966217 2.062656728
[134,] -0.880110981 -4.752966217
[135,] -1.888752368 -0.880110981
[136,] 0.859192425 -1.888752368
[137,] -0.013225595 0.859192425
[138,] -0.141833405 -0.013225595
[139,] 0.944794352 -0.141833405
[140,] -4.072046173 0.944794352
[141,] 0.938774036 -4.072046173
[142,] -0.144525457 0.938774036
[143,] -1.906795231 -0.144525457
[144,] 0.910149409 -1.906795231
[145,] 0.815200917 0.910149409
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 1.494245411 -5.461089547
2 -0.357552933 1.494245411
3 -4.802009216 -0.357552933
4 1.081364560 -4.802009216
5 0.086532648 1.081364560
6 2.160486015 0.086532648
7 -3.959265944 2.160486015
8 -2.720589288 -3.959265944
9 1.471901501 -2.720589288
10 0.755284144 1.471901501
11 1.519703801 0.755284144
12 1.043836944 1.519703801
13 1.086539362 1.043836944
14 -0.078338840 1.086539362
15 0.874751776 -0.078338840
16 0.955312359 0.874751776
17 1.053368456 0.955312359
18 -1.059213441 1.053368456
19 1.933828864 -1.059213441
20 -2.947405492 1.933828864
21 -0.264346742 -2.947405492
22 0.040827079 -0.264346742
23 -0.267669662 0.040827079
24 -0.619122580 -0.267669662
25 -0.037131346 -0.619122580
26 0.710304843 -0.037131346
27 0.969792496 0.710304843
28 -1.310409031 0.969792496
29 1.290974926 -1.310409031
30 -0.230089235 1.290974926
31 0.415111618 -0.230089235
32 -2.419913877 0.415111618
33 -2.121992432 -2.419913877
34 1.161900166 -2.121992432
35 2.619974906 1.161900166
36 -0.076716536 2.619974906
37 0.583265995 -0.076716536
38 -2.093373999 0.583265995
39 -0.204902162 -2.093373999
40 -2.095095983 -0.204902162
41 3.913947943 -2.095095983
42 0.224296171 3.913947943
43 0.334380156 0.224296171
44 1.209124153 0.334380156
45 -2.869037159 1.209124153
46 1.417052607 -2.869037159
47 -0.364077947 1.417052607
48 0.489165461 -0.364077947
49 -3.196494916 0.489165461
50 -3.357103018 -3.196494916
51 0.235855893 -3.357103018
52 -3.691428474 0.235855893
53 -0.296020268 -3.691428474
54 1.818055724 -0.296020268
55 3.938763876 1.818055724
56 0.408051930 3.938763876
57 0.736440537 0.408051930
58 1.100806362 0.736440537
59 1.464372124 1.100806362
60 -1.376308302 1.464372124
61 -1.160344900 -1.376308302
62 1.718647861 -1.160344900
63 -0.913922804 1.718647861
64 1.038701098 -0.913922804
65 2.994166824 1.038701098
66 -5.312915614 2.994166824
67 0.279823619 -5.312915614
68 -1.209289150 0.279823619
69 1.335407149 -1.209289150
70 1.018085325 1.335407149
71 1.771477629 1.018085325
72 0.084953817 1.771477629
73 0.097941329 0.084953817
74 0.849651352 0.097941329
75 2.032474193 0.849651352
76 1.785960670 2.032474193
77 -2.065487629 1.785960670
78 0.589690180 -2.065487629
79 -0.209053147 0.589690180
80 -1.152342636 -0.209053147
81 1.066864883 -1.152342636
82 -0.128553063 1.066864883
83 0.980847561 -0.128553063
84 1.014734621 0.980847561
85 -0.600190928 1.014734621
86 0.610717787 -0.600190928
87 0.942008267 0.610717787
88 -0.373855542 0.942008267
89 -1.001907642 -0.373855542
90 0.720927731 -1.001907642
91 0.054066228 0.720927731
92 1.650828439 0.054066228
93 2.454442924 1.650828439
94 0.489801121 2.454442924
95 -0.073092585 0.489801121
96 -0.908855788 -0.073092585
97 -0.095187661 -0.908855788
98 0.370328398 -0.095187661
99 0.806611766 0.370328398
100 0.146715227 0.806611766
101 0.335250343 0.146715227
102 -1.715401578 0.335250343
103 1.427046668 -1.715401578
104 -2.480703062 1.427046668
105 -0.977903128 -2.480703062
106 0.792629871 -0.977903128
107 0.008917273 0.792629871
108 1.725576121 0.008917273
109 -2.426776289 1.725576121
110 -0.267746154 -2.426776289
111 1.840880694 -0.267746154
112 -2.688764066 1.840880694
113 0.922538108 -2.688764066
114 0.546910861 0.922538108
115 0.228420278 0.546910861
116 1.232379359 0.228420278
117 1.751102687 1.232379359
118 -0.200536156 1.751102687
119 -0.703366749 -0.200536156
120 -0.820564742 -0.703366749
121 -0.804435614 -0.820564742
122 1.005896218 -0.804435614
123 0.805766326 1.005896218
124 2.138760093 0.805766326
125 -0.009386445 2.138760093
126 0.910374976 -0.009386445
127 0.990233997 0.910374976
128 -1.699285518 0.990233997
129 -0.902159104 -1.699285518
130 1.141404184 -0.902159104
131 1.138628761 1.141404184
132 2.062656728 1.138628761
133 -4.752966217 2.062656728
134 -0.880110981 -4.752966217
135 -1.888752368 -0.880110981
136 0.859192425 -1.888752368
137 -0.013225595 0.859192425
138 -0.141833405 -0.013225595
139 0.944794352 -0.141833405
140 -4.072046173 0.944794352
141 0.938774036 -4.072046173
142 -0.144525457 0.938774036
143 -1.906795231 -0.144525457
144 0.910149409 -1.906795231
145 0.815200917 0.910149409
> 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/html/rcomp/tmp/73kta1291290953.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/html/rcomp/tmp/83kta1291290953.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/html/rcomp/tmp/9dcsv1291290953.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/html/rcomp/tmp/10dcsv1291290953.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/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/www/html/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/html/rcomp/tmp/11hcr11291290953.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/html/rcomp/tmp/127gwv1291290953.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/html/rcomp/tmp/139wmi1291290953.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/html/rcomp/tmp/142n431291290953.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/html/rcomp/tmp/15n6k91291290953.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/html/rcomp/tmp/16jf001291290953.tab")
+ }
>
> try(system("convert tmp/1pbv11291290953.ps tmp/1pbv11291290953.png",intern=TRUE))
character(0)
> try(system("convert tmp/2z2dm1291290953.ps tmp/2z2dm1291290953.png",intern=TRUE))
character(0)
> try(system("convert tmp/3z2dm1291290953.ps tmp/3z2dm1291290953.png",intern=TRUE))
character(0)
> try(system("convert tmp/4z2dm1291290953.ps tmp/4z2dm1291290953.png",intern=TRUE))
character(0)
> try(system("convert tmp/5abup1291290953.ps tmp/5abup1291290953.png",intern=TRUE))
character(0)
> try(system("convert tmp/6abup1291290953.ps tmp/6abup1291290953.png",intern=TRUE))
character(0)
> try(system("convert tmp/73kta1291290953.ps tmp/73kta1291290953.png",intern=TRUE))
character(0)
> try(system("convert tmp/83kta1291290953.ps tmp/83kta1291290953.png",intern=TRUE))
character(0)
> try(system("convert tmp/9dcsv1291290953.ps tmp/9dcsv1291290953.png",intern=TRUE))
character(0)
> try(system("convert tmp/10dcsv1291290953.ps tmp/10dcsv1291290953.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
3.955 1.777 9.431