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(41
+ ,25
+ ,15
+ ,9
+ ,3
+ ,38
+ ,25
+ ,15
+ ,9
+ ,4
+ ,37
+ ,19
+ ,14
+ ,9
+ ,4
+ ,42
+ ,18
+ ,10
+ ,8
+ ,4
+ ,40
+ ,23
+ ,18
+ ,15
+ ,3
+ ,43
+ ,25
+ ,14
+ ,9
+ ,4
+ ,40
+ ,23
+ ,11
+ ,11
+ ,4
+ ,45
+ ,30
+ ,17
+ ,6
+ ,5
+ ,45
+ ,32
+ ,21
+ ,10
+ ,4
+ ,44
+ ,25
+ ,7
+ ,11
+ ,4
+ ,42
+ ,26
+ ,18
+ ,16
+ ,4
+ ,41
+ ,35
+ ,18
+ ,7
+ ,4
+ ,38
+ ,20
+ ,12
+ ,10
+ ,4
+ ,38
+ ,21
+ ,9
+ ,9
+ ,4
+ ,46
+ ,17
+ ,11
+ ,6
+ ,5
+ ,42
+ ,27
+ ,16
+ ,12
+ ,4
+ ,46
+ ,25
+ ,12
+ ,10
+ ,4
+ ,43
+ ,18
+ ,14
+ ,14
+ ,5
+ ,38
+ ,22
+ ,13
+ ,9
+ ,4
+ ,39
+ ,23
+ ,17
+ ,14
+ ,4
+ ,40
+ ,25
+ ,13
+ ,14
+ ,3
+ ,37
+ ,19
+ ,13
+ ,9
+ ,2
+ ,41
+ ,20
+ ,12
+ ,8
+ ,4
+ ,46
+ ,26
+ ,12
+ ,10
+ ,4
+ ,37
+ ,22
+ ,9
+ ,9
+ ,3
+ ,39
+ ,25
+ ,17
+ ,9
+ ,4
+ ,44
+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
+ ,'LeaderPreference')
+ ,1:126))
> y <- array(NA,dim=c(5,126),dimnames=list(c('StudyForCareer','PersonalStandards','ParentalExpectations','Doubts','LeaderPreference'),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 = '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
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
StudyForCareer PersonalStandards ParentalExpectations Doubts
1 41 25 15 9
2 38 25 15 9
3 37 19 14 9
4 42 18 10 8
5 40 23 18 15
6 43 25 14 9
7 40 23 11 11
8 45 30 17 6
9 45 32 21 10
10 44 25 7 11
11 42 26 18 16
12 41 35 18 7
13 38 20 12 10
14 38 21 9 9
15 46 17 11 6
16 42 27 16 12
17 46 25 12 10
18 43 18 14 14
19 38 22 13 9
20 39 23 17 14
21 40 25 13 14
22 37 19 13 9
23 41 20 12 8
24 46 26 12 10
25 37 22 9 9
26 39 25 17 9
27 44 29 18 11
28 38 22 12 10
29 38 32 12 8
30 38 23 9 14
31 33 18 13 10
32 43 26 11 14
33 41 14 13 15
34 45 25 11 10
35 38 23 15 10
36 39 24 11 11
37 40 21 14 10
38 36 17 12 16
39 49 29 8 6
40 41 25 11 11
41 42 25 17 14
42 41 25 16 9
43 43 21 13 11
44 46 23 15 8
45 41 25 16 8
46 39 25 7 11
47 42 24 16 16
48 35 21 13 12
49 36 22 15 14
50 41 20 12 10
51 41 22 15 10
52 36 28 18 12
53 46 25 17 9
54 44 21 15 8
55 43 27 11 16
56 40 19 12 13
57 40 20 14 8
58 39 22 10 8
59 44 26 11 7
60 38 17 12 11
61 39 15 6 6
62 41 27 15 9
63 39 25 14 14
64 40 19 16 12
65 44 18 16 8
66 42 15 11 8
67 46 29 15 12
68 44 24 12 13
69 37 24 13 11
70 39 22 14 12
71 40 22 12 13
72 42 25 17 14
73 37 21 11 9
74 33 21 13 8
75 35 18 9 8
76 42 10 12 9
77 36 18 10 14
78 44 23 9 14
79 45 24 11 14
80 47 32 9 14
81 40 24 16 9
82 48 30 24 8
83 45 23 11 11
84 41 21 12 9
85 34 24 8 13
86 38 23 5 16
87 37 19 10 12
88 48 27 15 4
89 39 26 10 10
90 34 26 18 14
91 35 16 12 10
92 41 27 13 9
93 43 14 11 8
94 41 18 12 9
95 39 21 7 15
96 36 22 17 8
97 46 23 10 12
98 42 24 12 9
99 42 19 10 13
100 45 22 7 7
101 39 24 13 10
102 45 28 9 11
103 48 24 9 8
104 35 21 11 9
105 38 21 14 16
106 42 13 8 11
107 36 20 11 12
108 37 22 11 8
109 38 19 12 7
110 43 26 20 13
111 35 19 8 20
112 36 20 11 11
113 33 14 15 10
114 39 17 12 16
115 45 21 12 8
116 35 19 11 10
117 38 17 9 11
118 36 19 8 14
119 42 17 12 10
120 41 19 13 12
121 35 20 16 11
122 43 20 11 14
123 40 29 9 16
124 46 23 11 9
125 44 23 11 11
126 35 19 13 9
LeaderPreference
1 3
2 4
3 4
4 4
5 3
6 4
7 4
8 5
9 4
10 4
11 4
12 4
13 4
14 4
15 5
16 4
17 4
18 5
19 4
20 4
21 3
22 2
23 4
24 4
25 3
26 4
27 5
28 2
29 0
30 4
31 3
32 4
33 2
34 5
35 4
36 4
37 4
38 2
39 5
40 4
41 3
42 5
43 4
44 3
45 5
46 4
47 4
48 5
49 3
50 4
51 3
52 4
53 4
54 4
55 2
56 5
57 3
58 4
59 4
60 2
61 4
62 5
63 3
64 4
65 4
66 4
67 5
68 4
69 4
70 2
71 3
72 3
73 3
74 2
75 4
76 2
77 2
78 4
79 4
80 4
81 4
82 5
83 5
84 4
85 2
86 2
87 3
88 5
89 4
90 4
91 2
92 3
93 4
94 3
95 2
96 4
97 4
98 4
99 2
100 3
101 4
102 4
103 5
104 2
105 4
106 4
107 3
108 4
109 3
110 4
111 2
112 4
113 2
114 4
115 3
116 4
117 3
118 3
119 3
120 4
121 3
122 3
123 4
124 4
125 5
126 3
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) PersonalStandards ParentalExpectations
32.3547 0.2525 -0.1070
Doubts LeaderPreference
-0.1410 1.4793
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-6.9703 -2.6283 0.1560 2.2403 6.7148
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 32.35470 2.20539 14.671 < 2e-16 ***
PersonalStandards 0.25248 0.07299 3.459 0.000749 ***
ParentalExpectations -0.10699 0.09316 -1.148 0.253086
Doubts -0.14101 0.10438 -1.351 0.179212
LeaderPreference 1.47931 0.32438 4.560 1.23e-05 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 3.161 on 121 degrees of freedom
Multiple R-squared: 0.2967, Adjusted R-squared: 0.2734
F-statistic: 12.76 on 4 and 121 DF, p-value: 1.074e-08
> 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.54500905 0.90998190 0.4549910
[2,] 0.41248252 0.82496503 0.5875175
[3,] 0.27758603 0.55517206 0.7224140
[4,] 0.17698372 0.35396745 0.8230163
[5,] 0.24705294 0.49410588 0.7529471
[6,] 0.20656134 0.41312267 0.7934387
[7,] 0.18691546 0.37383092 0.8130845
[8,] 0.32020816 0.64041632 0.6797918
[9,] 0.23781030 0.47562060 0.7621897
[10,] 0.31153889 0.62307779 0.6884611
[11,] 0.24079458 0.48158916 0.7592054
[12,] 0.23824812 0.47649624 0.7617519
[13,] 0.20404868 0.40809736 0.7959513
[14,] 0.15232342 0.30464683 0.8476766
[15,] 0.11937195 0.23874390 0.8806281
[16,] 0.08482841 0.16965682 0.9151716
[17,] 0.10408730 0.20817460 0.8959127
[18,] 0.09570732 0.19141464 0.9042927
[19,] 0.08264264 0.16528527 0.9173574
[20,] 0.05894920 0.11789841 0.9410508
[21,] 0.04363744 0.08727488 0.9563626
[22,] 0.03410076 0.06820152 0.9658992
[23,] 0.04292798 0.08585595 0.9570720
[24,] 0.07576439 0.15152878 0.9242356
[25,] 0.05642397 0.11284795 0.9435760
[26,] 0.12969492 0.25938985 0.8703051
[27,] 0.10683309 0.21366618 0.8931669
[28,] 0.10449769 0.20899538 0.8955023
[29,] 0.09721228 0.19442456 0.9027877
[30,] 0.07372551 0.14745101 0.9262745
[31,] 0.05554167 0.11108334 0.9444583
[32,] 0.06743417 0.13486833 0.9325658
[33,] 0.05191686 0.10383372 0.9480831
[34,] 0.04743363 0.09486726 0.9525664
[35,] 0.03913681 0.07827362 0.9608632
[36,] 0.03498703 0.06997405 0.9650130
[37,] 0.09640942 0.19281884 0.9035906
[38,] 0.08321319 0.16642639 0.9167868
[39,] 0.08673386 0.17346773 0.9132661
[40,] 0.07006673 0.14013345 0.9299333
[41,] 0.17404807 0.34809615 0.8259519
[42,] 0.16845675 0.33691350 0.8315432
[43,] 0.13744465 0.27488930 0.8625553
[44,] 0.11715563 0.23431125 0.8828444
[45,] 0.18945887 0.37891774 0.8105411
[46,] 0.23054769 0.46109538 0.7694523
[47,] 0.22861412 0.45722825 0.7713859
[48,] 0.26266669 0.52533338 0.7373333
[49,] 0.23030379 0.46060758 0.7696962
[50,] 0.19386910 0.38773820 0.8061309
[51,] 0.18169552 0.36339103 0.8183045
[52,] 0.15533769 0.31067538 0.8446623
[53,] 0.13009216 0.26018433 0.8699078
[54,] 0.11224909 0.22449818 0.8877509
[55,] 0.10560362 0.21120724 0.8943964
[56,] 0.08453734 0.16907467 0.9154627
[57,] 0.06601076 0.13202153 0.9339892
[58,] 0.07503032 0.15006064 0.9249697
[59,] 0.06436455 0.12872909 0.9356355
[60,] 0.05783694 0.11567387 0.9421631
[61,] 0.05453449 0.10906898 0.9454655
[62,] 0.06903213 0.13806427 0.9309679
[63,] 0.05740715 0.11481431 0.9425928
[64,] 0.04462411 0.08924823 0.9553759
[65,] 0.04424584 0.08849169 0.9557542
[66,] 0.04069593 0.08139187 0.9593041
[67,] 0.05962970 0.11925940 0.9403703
[68,] 0.11812113 0.23624225 0.8818789
[69,] 0.24442587 0.48885173 0.7555741
[70,] 0.20840179 0.41680358 0.7915982
[71,] 0.19806464 0.39612928 0.8019354
[72,] 0.21394448 0.42788896 0.7860555
[73,] 0.22076225 0.44152450 0.7792378
[74,] 0.18721548 0.37443096 0.8127845
[75,] 0.27734571 0.55469142 0.7226543
[76,] 0.24682758 0.49365515 0.7531724
[77,] 0.20528382 0.41056765 0.7947162
[78,] 0.24561431 0.49122861 0.7543857
[79,] 0.20524402 0.41048804 0.7947560
[80,] 0.17998859 0.35997719 0.8200114
[81,] 0.19370316 0.38740633 0.8062968
[82,] 0.20756764 0.41513528 0.7924324
[83,] 0.29367266 0.58734533 0.7063273
[84,] 0.25286799 0.50573597 0.7471320
[85,] 0.20773939 0.41547878 0.7922606
[86,] 0.20770629 0.41541257 0.7922937
[87,] 0.18899400 0.37798800 0.8110060
[88,] 0.15260500 0.30521000 0.8473950
[89,] 0.17443415 0.34886830 0.8255658
[90,] 0.20509848 0.41019696 0.7949015
[91,] 0.16257337 0.32514674 0.8374266
[92,] 0.23676831 0.47353661 0.7632317
[93,] 0.26725874 0.53451749 0.7327413
[94,] 0.24627422 0.49254845 0.7537258
[95,] 0.21257542 0.42515084 0.7874246
[96,] 0.22734192 0.45468384 0.7726581
[97,] 0.19521828 0.39043655 0.8047817
[98,] 0.15871225 0.31742450 0.8412877
[99,] 0.16813210 0.33626420 0.8318679
[100,] 0.14506025 0.29012051 0.8549397
[101,] 0.17641418 0.35282836 0.8235858
[102,] 0.13641615 0.27283230 0.8635839
[103,] 0.10855858 0.21711716 0.8914414
[104,] 0.07447192 0.14894385 0.9255281
[105,] 0.09714929 0.19429858 0.9028507
[106,] 0.07278565 0.14557129 0.9272144
[107,] 0.05383835 0.10767670 0.9461616
[108,] 0.06517974 0.13035949 0.9348203
[109,] 0.16949227 0.33898455 0.8305077
[110,] 0.11440582 0.22881163 0.8855942
[111,] 0.29238863 0.58477726 0.7076114
> postscript(file="/var/www/html/rcomp/tmp/1yecc1292766875.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/2yecc1292766875.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/39nbx1292766875.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/49nbx1292766875.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/59nbx1292766875.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
0.76932006 -3.70999232 -3.30211210 1.38141051 1.44131092 1.18302224
7 8 9 10 11 12
-1.35095245 0.33923850 2.30559031 1.71615054 1.34557892 -3.19583851
13 14 15 16 17 18
-2.62754739 -3.34199456 3.97953475 0.31507756 4.11006456 2.17611921
19 20 21 22 23 24
-3.16653038 -1.28600012 0.26041525 -0.45047279 0.09042618 3.85758695
25 26 27 28 29 30
-3.11515978 -2.49602142 0.40376763 -0.17387785 -0.02205562 -3.14188370
31 32 33 34 35 36
-5.53629434 1.31465437 5.65799456 1.52376673 -3.06402388 -2.60343006
37 38 39 40 41 42
-0.66605411 -0.06541050 3.62884709 -0.85590767 2.68835704 -2.08231925
43 44 45 46 47 48
2.36797366 6.13326207 -2.22333247 -3.28384946 1.63656325 -6.97032550
49 50 51 52 53 54
-2.76818103 0.37245261 1.66776611 -5.72342916 4.50397858 3.15890491
55 56 57 58 59 60
4.30282795 -1.43134251 0.78370945 -2.62849994 1.32756185 1.22952342
61 62 63 64 65 66
-1.57112488 -2.69425992 -0.63259930 0.33489844 4.02332318 2.24582878
67 68 69 70 71 72
2.22382451 2.78558182 -4.38945917 1.32211948 0.76984942 2.68835704
73 74 75 76 77 78
-2.64871128 -5.09644122 -5.72557494 6.71484026 -0.81388544 2.85811630
79 80 81 82 83 84
3.81960959 3.58581781 -1.35052926 4.37016305 2.16973517 -0.02103822
85 86 87 88 89 90
-4.68373521 -0.32917429 -1.82770186 3.60067400 -3.35638394 -6.93644751
91 92 93 94 95 96
-1.65901219 0.05039395 3.49830639 2.21570700 1.24873861 -4.87960181
97 98 99 100 101 102
4.68307532 0.22152895 4.79262374 4.38884289 -2.53047238 2.17268861
103 104 105 106 107 108
4.28024702 -3.16939890 -1.81997481 2.85286731 -2.97319402 -4.52151449
109 110 111 112 113 114
-1.31879705 2.13651017 -1.43425464 -4.59351962 -2.83310063 -0.02403526
115 116 117 118 119 120
5.31726095 -5.48205523 -0.57074530 -2.75964632 3.60919782 1.01394210
121 122 123 124 125 126
-3.57928001 4.30883241 -2.37472292 4.36702112 1.16973517 -3.92978517
> postscript(file="/var/www/html/rcomp/tmp/62ebi1292766875.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 0.76932006 NA
1 -3.70999232 0.76932006
2 -3.30211210 -3.70999232
3 1.38141051 -3.30211210
4 1.44131092 1.38141051
5 1.18302224 1.44131092
6 -1.35095245 1.18302224
7 0.33923850 -1.35095245
8 2.30559031 0.33923850
9 1.71615054 2.30559031
10 1.34557892 1.71615054
11 -3.19583851 1.34557892
12 -2.62754739 -3.19583851
13 -3.34199456 -2.62754739
14 3.97953475 -3.34199456
15 0.31507756 3.97953475
16 4.11006456 0.31507756
17 2.17611921 4.11006456
18 -3.16653038 2.17611921
19 -1.28600012 -3.16653038
20 0.26041525 -1.28600012
21 -0.45047279 0.26041525
22 0.09042618 -0.45047279
23 3.85758695 0.09042618
24 -3.11515978 3.85758695
25 -2.49602142 -3.11515978
26 0.40376763 -2.49602142
27 -0.17387785 0.40376763
28 -0.02205562 -0.17387785
29 -3.14188370 -0.02205562
30 -5.53629434 -3.14188370
31 1.31465437 -5.53629434
32 5.65799456 1.31465437
33 1.52376673 5.65799456
34 -3.06402388 1.52376673
35 -2.60343006 -3.06402388
36 -0.66605411 -2.60343006
37 -0.06541050 -0.66605411
38 3.62884709 -0.06541050
39 -0.85590767 3.62884709
40 2.68835704 -0.85590767
41 -2.08231925 2.68835704
42 2.36797366 -2.08231925
43 6.13326207 2.36797366
44 -2.22333247 6.13326207
45 -3.28384946 -2.22333247
46 1.63656325 -3.28384946
47 -6.97032550 1.63656325
48 -2.76818103 -6.97032550
49 0.37245261 -2.76818103
50 1.66776611 0.37245261
51 -5.72342916 1.66776611
52 4.50397858 -5.72342916
53 3.15890491 4.50397858
54 4.30282795 3.15890491
55 -1.43134251 4.30282795
56 0.78370945 -1.43134251
57 -2.62849994 0.78370945
58 1.32756185 -2.62849994
59 1.22952342 1.32756185
60 -1.57112488 1.22952342
61 -2.69425992 -1.57112488
62 -0.63259930 -2.69425992
63 0.33489844 -0.63259930
64 4.02332318 0.33489844
65 2.24582878 4.02332318
66 2.22382451 2.24582878
67 2.78558182 2.22382451
68 -4.38945917 2.78558182
69 1.32211948 -4.38945917
70 0.76984942 1.32211948
71 2.68835704 0.76984942
72 -2.64871128 2.68835704
73 -5.09644122 -2.64871128
74 -5.72557494 -5.09644122
75 6.71484026 -5.72557494
76 -0.81388544 6.71484026
77 2.85811630 -0.81388544
78 3.81960959 2.85811630
79 3.58581781 3.81960959
80 -1.35052926 3.58581781
81 4.37016305 -1.35052926
82 2.16973517 4.37016305
83 -0.02103822 2.16973517
84 -4.68373521 -0.02103822
85 -0.32917429 -4.68373521
86 -1.82770186 -0.32917429
87 3.60067400 -1.82770186
88 -3.35638394 3.60067400
89 -6.93644751 -3.35638394
90 -1.65901219 -6.93644751
91 0.05039395 -1.65901219
92 3.49830639 0.05039395
93 2.21570700 3.49830639
94 1.24873861 2.21570700
95 -4.87960181 1.24873861
96 4.68307532 -4.87960181
97 0.22152895 4.68307532
98 4.79262374 0.22152895
99 4.38884289 4.79262374
100 -2.53047238 4.38884289
101 2.17268861 -2.53047238
102 4.28024702 2.17268861
103 -3.16939890 4.28024702
104 -1.81997481 -3.16939890
105 2.85286731 -1.81997481
106 -2.97319402 2.85286731
107 -4.52151449 -2.97319402
108 -1.31879705 -4.52151449
109 2.13651017 -1.31879705
110 -1.43425464 2.13651017
111 -4.59351962 -1.43425464
112 -2.83310063 -4.59351962
113 -0.02403526 -2.83310063
114 5.31726095 -0.02403526
115 -5.48205523 5.31726095
116 -0.57074530 -5.48205523
117 -2.75964632 -0.57074530
118 3.60919782 -2.75964632
119 1.01394210 3.60919782
120 -3.57928001 1.01394210
121 4.30883241 -3.57928001
122 -2.37472292 4.30883241
123 4.36702112 -2.37472292
124 1.16973517 4.36702112
125 -3.92978517 1.16973517
126 NA -3.92978517
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -3.70999232 0.76932006
[2,] -3.30211210 -3.70999232
[3,] 1.38141051 -3.30211210
[4,] 1.44131092 1.38141051
[5,] 1.18302224 1.44131092
[6,] -1.35095245 1.18302224
[7,] 0.33923850 -1.35095245
[8,] 2.30559031 0.33923850
[9,] 1.71615054 2.30559031
[10,] 1.34557892 1.71615054
[11,] -3.19583851 1.34557892
[12,] -2.62754739 -3.19583851
[13,] -3.34199456 -2.62754739
[14,] 3.97953475 -3.34199456
[15,] 0.31507756 3.97953475
[16,] 4.11006456 0.31507756
[17,] 2.17611921 4.11006456
[18,] -3.16653038 2.17611921
[19,] -1.28600012 -3.16653038
[20,] 0.26041525 -1.28600012
[21,] -0.45047279 0.26041525
[22,] 0.09042618 -0.45047279
[23,] 3.85758695 0.09042618
[24,] -3.11515978 3.85758695
[25,] -2.49602142 -3.11515978
[26,] 0.40376763 -2.49602142
[27,] -0.17387785 0.40376763
[28,] -0.02205562 -0.17387785
[29,] -3.14188370 -0.02205562
[30,] -5.53629434 -3.14188370
[31,] 1.31465437 -5.53629434
[32,] 5.65799456 1.31465437
[33,] 1.52376673 5.65799456
[34,] -3.06402388 1.52376673
[35,] -2.60343006 -3.06402388
[36,] -0.66605411 -2.60343006
[37,] -0.06541050 -0.66605411
[38,] 3.62884709 -0.06541050
[39,] -0.85590767 3.62884709
[40,] 2.68835704 -0.85590767
[41,] -2.08231925 2.68835704
[42,] 2.36797366 -2.08231925
[43,] 6.13326207 2.36797366
[44,] -2.22333247 6.13326207
[45,] -3.28384946 -2.22333247
[46,] 1.63656325 -3.28384946
[47,] -6.97032550 1.63656325
[48,] -2.76818103 -6.97032550
[49,] 0.37245261 -2.76818103
[50,] 1.66776611 0.37245261
[51,] -5.72342916 1.66776611
[52,] 4.50397858 -5.72342916
[53,] 3.15890491 4.50397858
[54,] 4.30282795 3.15890491
[55,] -1.43134251 4.30282795
[56,] 0.78370945 -1.43134251
[57,] -2.62849994 0.78370945
[58,] 1.32756185 -2.62849994
[59,] 1.22952342 1.32756185
[60,] -1.57112488 1.22952342
[61,] -2.69425992 -1.57112488
[62,] -0.63259930 -2.69425992
[63,] 0.33489844 -0.63259930
[64,] 4.02332318 0.33489844
[65,] 2.24582878 4.02332318
[66,] 2.22382451 2.24582878
[67,] 2.78558182 2.22382451
[68,] -4.38945917 2.78558182
[69,] 1.32211948 -4.38945917
[70,] 0.76984942 1.32211948
[71,] 2.68835704 0.76984942
[72,] -2.64871128 2.68835704
[73,] -5.09644122 -2.64871128
[74,] -5.72557494 -5.09644122
[75,] 6.71484026 -5.72557494
[76,] -0.81388544 6.71484026
[77,] 2.85811630 -0.81388544
[78,] 3.81960959 2.85811630
[79,] 3.58581781 3.81960959
[80,] -1.35052926 3.58581781
[81,] 4.37016305 -1.35052926
[82,] 2.16973517 4.37016305
[83,] -0.02103822 2.16973517
[84,] -4.68373521 -0.02103822
[85,] -0.32917429 -4.68373521
[86,] -1.82770186 -0.32917429
[87,] 3.60067400 -1.82770186
[88,] -3.35638394 3.60067400
[89,] -6.93644751 -3.35638394
[90,] -1.65901219 -6.93644751
[91,] 0.05039395 -1.65901219
[92,] 3.49830639 0.05039395
[93,] 2.21570700 3.49830639
[94,] 1.24873861 2.21570700
[95,] -4.87960181 1.24873861
[96,] 4.68307532 -4.87960181
[97,] 0.22152895 4.68307532
[98,] 4.79262374 0.22152895
[99,] 4.38884289 4.79262374
[100,] -2.53047238 4.38884289
[101,] 2.17268861 -2.53047238
[102,] 4.28024702 2.17268861
[103,] -3.16939890 4.28024702
[104,] -1.81997481 -3.16939890
[105,] 2.85286731 -1.81997481
[106,] -2.97319402 2.85286731
[107,] -4.52151449 -2.97319402
[108,] -1.31879705 -4.52151449
[109,] 2.13651017 -1.31879705
[110,] -1.43425464 2.13651017
[111,] -4.59351962 -1.43425464
[112,] -2.83310063 -4.59351962
[113,] -0.02403526 -2.83310063
[114,] 5.31726095 -0.02403526
[115,] -5.48205523 5.31726095
[116,] -0.57074530 -5.48205523
[117,] -2.75964632 -0.57074530
[118,] 3.60919782 -2.75964632
[119,] 1.01394210 3.60919782
[120,] -3.57928001 1.01394210
[121,] 4.30883241 -3.57928001
[122,] -2.37472292 4.30883241
[123,] 4.36702112 -2.37472292
[124,] 1.16973517 4.36702112
[125,] -3.92978517 1.16973517
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -3.70999232 0.76932006
2 -3.30211210 -3.70999232
3 1.38141051 -3.30211210
4 1.44131092 1.38141051
5 1.18302224 1.44131092
6 -1.35095245 1.18302224
7 0.33923850 -1.35095245
8 2.30559031 0.33923850
9 1.71615054 2.30559031
10 1.34557892 1.71615054
11 -3.19583851 1.34557892
12 -2.62754739 -3.19583851
13 -3.34199456 -2.62754739
14 3.97953475 -3.34199456
15 0.31507756 3.97953475
16 4.11006456 0.31507756
17 2.17611921 4.11006456
18 -3.16653038 2.17611921
19 -1.28600012 -3.16653038
20 0.26041525 -1.28600012
21 -0.45047279 0.26041525
22 0.09042618 -0.45047279
23 3.85758695 0.09042618
24 -3.11515978 3.85758695
25 -2.49602142 -3.11515978
26 0.40376763 -2.49602142
27 -0.17387785 0.40376763
28 -0.02205562 -0.17387785
29 -3.14188370 -0.02205562
30 -5.53629434 -3.14188370
31 1.31465437 -5.53629434
32 5.65799456 1.31465437
33 1.52376673 5.65799456
34 -3.06402388 1.52376673
35 -2.60343006 -3.06402388
36 -0.66605411 -2.60343006
37 -0.06541050 -0.66605411
38 3.62884709 -0.06541050
39 -0.85590767 3.62884709
40 2.68835704 -0.85590767
41 -2.08231925 2.68835704
42 2.36797366 -2.08231925
43 6.13326207 2.36797366
44 -2.22333247 6.13326207
45 -3.28384946 -2.22333247
46 1.63656325 -3.28384946
47 -6.97032550 1.63656325
48 -2.76818103 -6.97032550
49 0.37245261 -2.76818103
50 1.66776611 0.37245261
51 -5.72342916 1.66776611
52 4.50397858 -5.72342916
53 3.15890491 4.50397858
54 4.30282795 3.15890491
55 -1.43134251 4.30282795
56 0.78370945 -1.43134251
57 -2.62849994 0.78370945
58 1.32756185 -2.62849994
59 1.22952342 1.32756185
60 -1.57112488 1.22952342
61 -2.69425992 -1.57112488
62 -0.63259930 -2.69425992
63 0.33489844 -0.63259930
64 4.02332318 0.33489844
65 2.24582878 4.02332318
66 2.22382451 2.24582878
67 2.78558182 2.22382451
68 -4.38945917 2.78558182
69 1.32211948 -4.38945917
70 0.76984942 1.32211948
71 2.68835704 0.76984942
72 -2.64871128 2.68835704
73 -5.09644122 -2.64871128
74 -5.72557494 -5.09644122
75 6.71484026 -5.72557494
76 -0.81388544 6.71484026
77 2.85811630 -0.81388544
78 3.81960959 2.85811630
79 3.58581781 3.81960959
80 -1.35052926 3.58581781
81 4.37016305 -1.35052926
82 2.16973517 4.37016305
83 -0.02103822 2.16973517
84 -4.68373521 -0.02103822
85 -0.32917429 -4.68373521
86 -1.82770186 -0.32917429
87 3.60067400 -1.82770186
88 -3.35638394 3.60067400
89 -6.93644751 -3.35638394
90 -1.65901219 -6.93644751
91 0.05039395 -1.65901219
92 3.49830639 0.05039395
93 2.21570700 3.49830639
94 1.24873861 2.21570700
95 -4.87960181 1.24873861
96 4.68307532 -4.87960181
97 0.22152895 4.68307532
98 4.79262374 0.22152895
99 4.38884289 4.79262374
100 -2.53047238 4.38884289
101 2.17268861 -2.53047238
102 4.28024702 2.17268861
103 -3.16939890 4.28024702
104 -1.81997481 -3.16939890
105 2.85286731 -1.81997481
106 -2.97319402 2.85286731
107 -4.52151449 -2.97319402
108 -1.31879705 -4.52151449
109 2.13651017 -1.31879705
110 -1.43425464 2.13651017
111 -4.59351962 -1.43425464
112 -2.83310063 -4.59351962
113 -0.02403526 -2.83310063
114 5.31726095 -0.02403526
115 -5.48205523 5.31726095
116 -0.57074530 -5.48205523
117 -2.75964632 -0.57074530
118 3.60919782 -2.75964632
119 1.01394210 3.60919782
120 -3.57928001 1.01394210
121 4.30883241 -3.57928001
122 -2.37472292 4.30883241
123 4.36702112 -2.37472292
124 1.16973517 4.36702112
125 -3.92978517 1.16973517
> 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/7uosl1292766875.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/8uosl1292766875.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/9uosl1292766875.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/105x961292766875.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/119y8c1292766875.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/12ug601292766875.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/13884q1292766875.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/14c83w1292766875.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/15xr121292766875.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/16i9iq1292766875.tab")
+ }
>
> try(system("convert tmp/1yecc1292766875.ps tmp/1yecc1292766875.png",intern=TRUE))
character(0)
> try(system("convert tmp/2yecc1292766875.ps tmp/2yecc1292766875.png",intern=TRUE))
character(0)
> try(system("convert tmp/39nbx1292766875.ps tmp/39nbx1292766875.png",intern=TRUE))
character(0)
> try(system("convert tmp/49nbx1292766875.ps tmp/49nbx1292766875.png",intern=TRUE))
character(0)
> try(system("convert tmp/59nbx1292766875.ps tmp/59nbx1292766875.png",intern=TRUE))
character(0)
> try(system("convert tmp/62ebi1292766875.ps tmp/62ebi1292766875.png",intern=TRUE))
character(0)
> try(system("convert tmp/7uosl1292766875.ps tmp/7uosl1292766875.png",intern=TRUE))
character(0)
> try(system("convert tmp/8uosl1292766875.ps tmp/8uosl1292766875.png",intern=TRUE))
character(0)
> try(system("convert tmp/9uosl1292766875.ps tmp/9uosl1292766875.png",intern=TRUE))
character(0)
> try(system("convert tmp/105x961292766875.ps tmp/105x961292766875.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
3.446 1.804 10.273