R version 2.6.1 (2007-11-26)
Copyright (C) 2007 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(106
+ ,87
+ ,1
+ ,65.3
+ ,170
+ ,2.2
+ ,70
+ ,1
+ ,65.73
+ ,165
+ ,62.3
+ ,75
+ ,1
+ ,69.44
+ ,168
+ ,14.7
+ ,79
+ ,1
+ ,73.74
+ ,170
+ ,5
+ ,64.5
+ ,1
+ ,74.31
+ ,157
+ ,74.4
+ ,75
+ ,0
+ ,70.53
+ ,146
+ ,66.1
+ ,70
+ ,0
+ ,69.42
+ ,149
+ ,22
+ ,67
+ ,1
+ ,69.77
+ ,159
+ ,3.4
+ ,52
+ ,0
+ ,65.47
+ ,151
+ ,0.3
+ ,67.2
+ ,1
+ ,66.2
+ ,174
+ ,53.2
+ ,47
+ ,0
+ ,70.46
+ ,156
+ ,0
+ ,46.4
+ ,0
+ ,74.44
+ ,151.5
+ ,57.2
+ ,76
+ ,0
+ ,69.28
+ ,146
+ ,9.2
+ ,71.6
+ ,1
+ ,67.67
+ ,157
+ ,15.9
+ ,63.8
+ ,1
+ ,67.22
+ ,171.5
+ ,17.6
+ ,48.2
+ ,1
+ ,64.85
+ ,150
+ ,21
+ ,64.5
+ ,1
+ ,71.35
+ ,170
+ ,7.6
+ ,75.9
+ ,1
+ ,72.28
+ ,164.5
+ ,71.6
+ ,80
+ ,1
+ ,71.87
+ ,163
+ ,12.9
+ ,56
+ ,1
+ ,67.34
+ ,162.5
+ ,10.5
+ ,75.5
+ ,0
+ ,73.5
+ ,161
+ ,25.7
+ ,77
+ ,1
+ ,64.91
+ ,166.5
+ ,26.8
+ ,88
+ ,0
+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+ ,75.67
+ ,163
+ ,43.4
+ ,73
+ ,1
+ ,76.07
+ ,168
+ ,13
+ ,56
+ ,1
+ ,82.88
+ ,165.5
+ ,27.8
+ ,49
+ ,0
+ ,77.14
+ ,147
+ ,6.5
+ ,54.7
+ ,0
+ ,77.31
+ ,158
+ ,7.1
+ ,67
+ ,1
+ ,76.58
+ ,168
+ ,6
+ ,47
+ ,0
+ ,82.86
+ ,154.5
+ ,6.5
+ ,47
+ ,0
+ ,76.64
+ ,147)
+ ,dim=c(5
+ ,117)
+ ,dimnames=list(c('y'
+ ,'weight'
+ ,'sex'
+ ,'age'
+ ,'height
')
+ ,1:117))
> y <- array(NA,dim=c(5,117),dimnames=list(c('y','weight','sex','age','height
'),1:117))
> for (i in 1:dim(x)[1])
+ {
+ for (j in 1:dim(x)[2])
+ {
+ y[i,j] <- as.numeric(x[i,j])
+ }
+ }
> par3 = 'No Linear Trend'
> par2 = 'Do not include Seasonal Dummies'
> par1 = '1'
> #'GNU S' R Code compiled by R2WASP v. 1.0.44 ()
> #Author: Prof. Dr. P. Wessa
> #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/
> #Source of accompanying publication: Office for Research, Development, and Education
> #Technical description: Write here your technical program description (don't use hard returns!)
> library(lattice)
> library(lmtest)
Loading required package: zoo
> n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
> par1 <- as.numeric(par1)
> x <- t(y)
> k <- length(x[1,])
> n <- length(x[,1])
> x1 <- cbind(x[,par1], x[,1:k!=par1])
> mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
> colnames(x1) <- mycolnames #colnames(x)[par1]
> x <- x1
> if (par3 == 'First Differences'){
+ x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
+ for (i in 1:n-1) {
+ for (j in 1:k) {
+ x2[i,j] <- x[i+1,j] - x[i,j]
+ }
+ }
+ x <- x2
+ }
> if (par2 == 'Include Monthly Dummies'){
+ x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
+ for (i in 1:11){
+ x2[seq(i,n,12),i] <- 1
+ }
+ x <- cbind(x, x2)
+ }
> if (par2 == 'Include Quarterly Dummies'){
+ x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
+ for (i in 1:3){
+ x2[seq(i,n,4),i] <- 1
+ }
+ x <- cbind(x, x2)
+ }
> k <- length(x[1,])
> if (par3 == 'Linear Trend'){
+ x <- cbind(x, c(1:n))
+ colnames(x)[k+1] <- 't'
+ }
> x
y weight sex age height\r
1 106.0 87.0 1 65.30 170.0
2 2.2 70.0 1 65.73 165.0
3 62.3 75.0 1 69.44 168.0
4 14.7 79.0 1 73.74 170.0
5 5.0 64.5 1 74.31 157.0
6 74.4 75.0 0 70.53 146.0
7 66.1 70.0 0 69.42 149.0
8 22.0 67.0 1 69.77 159.0
9 3.4 52.0 0 65.47 151.0
10 0.3 67.2 1 66.20 174.0
11 53.2 47.0 0 70.46 156.0
12 0.0 46.4 0 74.44 151.5
13 57.2 76.0 0 69.28 146.0
14 9.2 71.6 1 67.67 157.0
15 15.9 63.8 1 67.22 171.5
16 17.6 48.2 1 64.85 150.0
17 21.0 64.5 1 71.35 170.0
18 7.6 75.9 1 72.28 164.5
19 71.6 80.0 1 71.87 163.0
20 12.9 56.0 1 67.34 162.5
21 10.5 75.5 0 73.50 161.0
22 25.7 77.0 1 64.91 166.5
23 26.8 88.0 0 68.13 160.0
24 7.3 48.0 0 72.50 147.0
25 17.1 73.0 1 72.36 162.5
26 27.3 72.0 1 70.59 161.0
27 16.5 64.0 1 74.76 163.5
28 5.4 76.0 0 65.63 161.0
29 5.6 67.4 1 67.04 172.5
30 36.5 73.7 1 66.72 169.5
31 1.1 59.2 0 65.80 158.0
32 3.9 53.0 0 72.44 153.5
33 34.2 41.9 1 71.83 165.5
34 40.3 65.5 1 72.67 153.5
35 15.6 63.0 1 69.56 157.5
36 15.5 54.0 0 67.00 145.5
37 52.9 77.7 0 68.86 156.0
38 1.6 47.6 0 71.25 163.0
39 14.2 53.1 1 69.88 159.0
40 7.5 55.5 1 67.18 167.0
41 2.0 64.0 1 67.47 157.5
42 71.4 75.6 1 73.20 156.0
43 3.2 57.0 0 69.60 156.5
44 20.0 63.0 0 71.24 148.5
45 2.8 59.5 1 73.83 162.5
46 15.3 84.5 1 66.07 164.0
47 8.0 59.9 0 70.68 152.0
48 36.6 60.0 1 74.01 157.5
49 3.8 64.0 0 68.53 148.0
50 25.5 54.0 0 66.72 145.5
51 3.2 53.8 0 72.69 154.5
52 33.1 84.0 1 67.46 166.5
53 42.0 63.2 0 73.81 157.0
54 16.2 54.3 1 72.96 150.0
55 0.0 60.0 0 71.65 152.0
56 22.7 68.0 1 72.79 171.0
57 36.4 74.0 1 73.83 165.5
58 69.0 74.0 1 66.74 165.0
59 11.2 68.5 1 65.62 168.5
60 12.5 76.0 0 66.18 154.0
61 51.7 83.0 0 67.78 156.5
62 3.6 62.5 0 68.84 152.0
63 22.2 57.0 1 65.27 164.5
64 39.2 85.0 1 72.84 161.0
65 27.9 50.0 1 75.36 162.0
66 58.8 53.0 1 76.88 169.0
67 1.0 57.0 0 76.51 150.0
68 4.7 46.0 1 80.63 146.0
69 25.6 65.4 1 75.27 165.0
70 5.3 71.4 1 81.19 165.5
71 38.7 41.0 1 81.30 164.0
72 31.6 66.0 1 77.77 163.0
73 19.3 69.5 1 75.51 167.5
74 26.5 59.0 1 78.64 166.0
75 12.8 80.0 1 80.68 167.5
76 18.3 72.0 1 77.40 162.0
77 13.2 73.0 0 80.71 165.0
78 36.0 66.4 0 83.16 145.0
79 34.1 37.0 0 87.99 139.0
80 71.5 70.0 1 72.21 164.0
81 43.3 75.0 1 70.24 167.0
82 47.7 54.0 1 66.06 163.0
83 74.9 76.2 1 68.67 162.5
84 0.9 74.9 1 68.77 159.5
85 35.9 98.0 1 68.07 169.0
86 45.8 86.5 0 67.33 152.5
87 54.2 72.8 1 69.47 165.0
88 34.0 65.0 1 70.81 166.0
89 7.9 50.0 1 73.17 163.0
90 54.5 81.0 1 71.28 167.5
91 8.2 52.0 0 69.47 157.5
92 49.3 68.0 1 65.31 160.0
93 46.9 58.5 1 70.23 162.0
94 16.8 65.5 1 73.23 164.5
95 2.8 62.5 0 68.67 150.0
96 60.9 64.0 1 72.66 167.0
97 5.6 55.7 0 74.79 155.0
98 6.6 84.0 1 73.04 173.5
99 22.9 63.7 1 69.95 173.0
100 51.1 65.0 0 67.51 156.0
101 23.3 87.5 0 67.50 149.5
102 11.5 79.0 1 71.32 167.0
103 79.1 58.5 0 71.23 146.0
104 53.6 75.0 1 67.49 166.0
105 1.5 52.5 0 68.62 151.5
106 40.4 57.5 1 72.53 164.0
107 25.4 70.0 1 66.67 160.0
108 6.7 72.0 1 66.19 152.5
109 76.0 88.0 1 78.40 160.0
110 0.6 58.0 1 75.67 163.0
111 43.4 73.0 1 76.07 168.0
112 13.0 56.0 1 82.88 165.5
113 27.8 49.0 0 77.14 147.0
114 6.5 54.7 0 77.31 158.0
115 7.1 67.0 1 76.58 168.0
116 6.0 47.0 0 82.86 154.5
117 6.5 47.0 0 76.64 147.0
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) weight sex age `height\r`
61.5198 0.7170 10.0572 0.1191 -0.6090
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-35.44 -15.46 -6.87 12.73 67.79
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 61.5198 66.9729 0.919 0.360290
weight 0.7170 0.1870 3.835 0.000208 ***
sex 10.0572 5.8829 1.710 0.090113 .
age 0.1191 0.4454 0.267 0.789637
`height\r` -0.6090 0.3809 -1.599 0.112723
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 21.61 on 112 degrees of freedom
Multiple R-Squared: 0.1436, Adjusted R-squared: 0.113
F-statistic: 4.696 on 4 and 112 DF, p-value: 0.001534
> 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.8622350 0.27553002 0.13776501
[2,] 0.7873390 0.42532198 0.21266099
[3,] 0.6817775 0.63644491 0.31822246
[4,] 0.9786323 0.04273537 0.02136769
[5,] 0.9640280 0.07194394 0.03597197
[6,] 0.9615334 0.07693325 0.03846662
[7,] 0.9446293 0.11074134 0.05537067
[8,] 0.9146363 0.17072748 0.08536374
[9,] 0.9545314 0.09093728 0.04546864
[10,] 0.9343329 0.13133429 0.06566715
[11,] 0.9343950 0.13121007 0.06560503
[12,] 0.9578525 0.08429498 0.04214749
[13,] 0.9414408 0.11711833 0.05855917
[14,] 0.9702323 0.05953535 0.02976767
[15,] 0.9648547 0.07029059 0.03514529
[16,] 0.9791069 0.04178620 0.02089310
[17,] 0.9697706 0.06045886 0.03022943
[18,] 0.9602273 0.07954534 0.03977267
[19,] 0.9441197 0.11176068 0.05588034
[20,] 0.9260818 0.14783631 0.07391816
[21,] 0.9462341 0.10753185 0.05376592
[22,] 0.9337205 0.13255903 0.06627952
[23,] 0.9149596 0.17008086 0.08504043
[24,] 0.9026191 0.19476186 0.09738093
[25,] 0.8769337 0.24613269 0.12306634
[26,] 0.9210284 0.15794323 0.07897162
[27,] 0.8987375 0.20252506 0.10126253
[28,] 0.8793442 0.24131160 0.12065580
[29,] 0.8498182 0.30036351 0.15018175
[30,] 0.8413531 0.31729380 0.15864690
[31,] 0.8042282 0.39154356 0.19577178
[32,] 0.7651102 0.46977952 0.23488976
[33,] 0.7278809 0.54423819 0.27211910
[34,] 0.7521674 0.49566526 0.24783263
[35,] 0.7973611 0.40527786 0.20263893
[36,] 0.7697837 0.46043268 0.23021634
[37,] 0.7301682 0.53966351 0.26983176
[38,] 0.7219709 0.55605822 0.27802911
[39,] 0.7431556 0.51368883 0.25684442
[40,] 0.7140285 0.57194307 0.28597154
[41,] 0.6770036 0.64599279 0.32299640
[42,] 0.6831586 0.63368270 0.31684135
[43,] 0.6356070 0.72878602 0.36439301
[44,] 0.5988579 0.80228421 0.40114210
[45,] 0.5484342 0.90313158 0.45156579
[46,] 0.5459279 0.90814426 0.45407213
[47,] 0.5095267 0.98094662 0.49047331
[48,] 0.5090736 0.98185286 0.49092643
[49,] 0.4567116 0.91342320 0.54328840
[50,] 0.4042021 0.80840420 0.59579790
[51,] 0.5029373 0.99412539 0.49706269
[52,] 0.4819014 0.96380283 0.51809859
[53,] 0.4722317 0.94446345 0.52776828
[54,] 0.4525839 0.90516774 0.54741613
[55,] 0.4441167 0.88823346 0.55588327
[56,] 0.4058344 0.81166875 0.59416563
[57,] 0.3572421 0.71448415 0.64275793
[58,] 0.3214013 0.64280265 0.67859868
[59,] 0.4532365 0.90647307 0.54676346
[60,] 0.4495310 0.89906197 0.55046901
[61,] 0.4671234 0.93424676 0.53287662
[62,] 0.4129606 0.82592111 0.58703944
[63,] 0.4338129 0.86762572 0.56618714
[64,] 0.4550531 0.91010623 0.54494689
[65,] 0.3997222 0.79944446 0.60027777
[66,] 0.3558103 0.71162064 0.64418968
[67,] 0.3051735 0.61034693 0.69482654
[68,] 0.3058761 0.61175211 0.69412395
[69,] 0.2855313 0.57106260 0.71446870
[70,] 0.2425512 0.48510244 0.75744878
[71,] 0.2017721 0.40354414 0.79822793
[72,] 0.1895306 0.37906115 0.81046943
[73,] 0.2843346 0.56866926 0.71566537
[74,] 0.2450802 0.49016044 0.75491978
[75,] 0.2540176 0.50803519 0.74598240
[76,] 0.3553866 0.71077310 0.64461345
[77,] 0.4611449 0.92228978 0.53885511
[78,] 0.4161674 0.83233483 0.58383258
[79,] 0.3594707 0.71894137 0.64052931
[80,] 0.3508261 0.70165212 0.64917394
[81,] 0.2984440 0.59688803 0.70155599
[82,] 0.2580747 0.51614932 0.74192534
[83,] 0.2434090 0.48681809 0.75659096
[84,] 0.1952699 0.39053984 0.80473008
[85,] 0.1712074 0.34241484 0.82879258
[86,] 0.1690360 0.33807195 0.83096402
[87,] 0.1343044 0.26860883 0.86569558
[88,] 0.1307790 0.26155807 0.86922097
[89,] 0.2140137 0.42802741 0.78598630
[90,] 0.1779073 0.35581455 0.82209273
[91,] 0.1918222 0.38364439 0.80817780
[92,] 0.1443547 0.28870946 0.85564527
[93,] 0.1687679 0.33753579 0.83123210
[94,] 0.2306207 0.46124138 0.76937931
[95,] 0.2828329 0.56566581 0.71716709
[96,] 0.7019221 0.59615585 0.29807792
[97,] 0.7114726 0.57705471 0.28852735
[98,] 0.6086753 0.78264945 0.39132473
[99,] 0.8941614 0.21167722 0.10583861
[100,] 0.9024162 0.19516755 0.09758377
[101,] 0.8976953 0.20460950 0.10230475
[102,] 0.9248997 0.15020056 0.07510028
> postscript(file="/var/www/html/rcomp/tmp/1r58v1200837407.ps",horizontal=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/2xchl1200837407.ps",horizontal=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/3vc5l1200837407.ps",horizontal=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/484pt1200837407.ps",horizontal=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/5wldi1200837407.ps",horizontal=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 = 117
Frequency = 1
1 2 3 4 5 6 7
67.794913 -26.912425 30.987697 -18.774454 -26.062841 39.617391 36.861510
8 9 10 11 12 13 14
-9.096584 -11.244229 -21.379949 44.591300 -11.393004 21.849288 -26.162580
15 16 17 18 19 20 21
-4.986146 -4.912059 -1.793440 -26.827320 33.368378 -7.888811 -15.860045
22 23 24 25 26 27 28
-7.420199 -8.491781 -7.749559 -16.475555 -6.261224 -10.299527 -20.381151
29 30 31 32 33 34 35
-17.236880 7.357241 -14.482944 -10.768939 24.812899 6.584052 -13.517095
36 37 38 39 40 41 42
-4.109875 22.470307 -3.270076 -6.943536 -10.170816 -27.585147 31.901803
43 44 45 46 47 48 49
-12.171664 -4.740838 -21.271291 -24.858253 -12.320014 9.103837 -21.639535
50 51 52 53 54 55 56
5.923475 -11.463320 -5.342851 21.986048 -11.651667 -20.507249 -2.165432
57 58 59 60 61 62 63
3.759328 36.899318 -14.692383 -17.609574 17.903396 -18.365025 2.158730
64 65 66 67 68 69 70
-3.950079 10.153375 42.984275 -19.153126 -20.550173 -1.350576 -26.353143
71 72 73 74 75 76 77
27.916745 2.703483 -9.096349 4.345745 -23.740529 -15.463369 -9.790398
78 79 80 81 82 83 84
5.270163 20.220422 41.006760 11.283422 28.802120 39.469592 -35.437195
85 86 87 88 89 90 91
-11.130887 7.111583 22.634537 8.476434 -8.976789 18.362107 -2.962246
92 93 94 95 96 97 98
18.626641 23.669997 -10.283786 -20.362752 36.482059 -10.371235 -28.244567
99 100 101 102 103 104 105
2.673866 29.936867 -17.952617 -23.513173 56.064336 21.301984 -13.573423
106 107 108 109 110 111 112
18.831010 -6.869326 -31.513538 29.427720 -22.310475 12.731982 -7.812804
113 114 115 116 117
11.480786 -7.227438 -19.326829 -4.999133 -8.325681
> postscript(file="/var/www/html/rcomp/tmp/6f8hu1200837407.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> dum <- cbind(lag(myerror,k=1),myerror)
> dum
Time Series:
Start = 0
End = 117
Frequency = 1
lag(myerror, k = 1) myerror
0 67.794913 NA
1 -26.912425 67.794913
2 30.987697 -26.912425
3 -18.774454 30.987697
4 -26.062841 -18.774454
5 39.617391 -26.062841
6 36.861510 39.617391
7 -9.096584 36.861510
8 -11.244229 -9.096584
9 -21.379949 -11.244229
10 44.591300 -21.379949
11 -11.393004 44.591300
12 21.849288 -11.393004
13 -26.162580 21.849288
14 -4.986146 -26.162580
15 -4.912059 -4.986146
16 -1.793440 -4.912059
17 -26.827320 -1.793440
18 33.368378 -26.827320
19 -7.888811 33.368378
20 -15.860045 -7.888811
21 -7.420199 -15.860045
22 -8.491781 -7.420199
23 -7.749559 -8.491781
24 -16.475555 -7.749559
25 -6.261224 -16.475555
26 -10.299527 -6.261224
27 -20.381151 -10.299527
28 -17.236880 -20.381151
29 7.357241 -17.236880
30 -14.482944 7.357241
31 -10.768939 -14.482944
32 24.812899 -10.768939
33 6.584052 24.812899
34 -13.517095 6.584052
35 -4.109875 -13.517095
36 22.470307 -4.109875
37 -3.270076 22.470307
38 -6.943536 -3.270076
39 -10.170816 -6.943536
40 -27.585147 -10.170816
41 31.901803 -27.585147
42 -12.171664 31.901803
43 -4.740838 -12.171664
44 -21.271291 -4.740838
45 -24.858253 -21.271291
46 -12.320014 -24.858253
47 9.103837 -12.320014
48 -21.639535 9.103837
49 5.923475 -21.639535
50 -11.463320 5.923475
51 -5.342851 -11.463320
52 21.986048 -5.342851
53 -11.651667 21.986048
54 -20.507249 -11.651667
55 -2.165432 -20.507249
56 3.759328 -2.165432
57 36.899318 3.759328
58 -14.692383 36.899318
59 -17.609574 -14.692383
60 17.903396 -17.609574
61 -18.365025 17.903396
62 2.158730 -18.365025
63 -3.950079 2.158730
64 10.153375 -3.950079
65 42.984275 10.153375
66 -19.153126 42.984275
67 -20.550173 -19.153126
68 -1.350576 -20.550173
69 -26.353143 -1.350576
70 27.916745 -26.353143
71 2.703483 27.916745
72 -9.096349 2.703483
73 4.345745 -9.096349
74 -23.740529 4.345745
75 -15.463369 -23.740529
76 -9.790398 -15.463369
77 5.270163 -9.790398
78 20.220422 5.270163
79 41.006760 20.220422
80 11.283422 41.006760
81 28.802120 11.283422
82 39.469592 28.802120
83 -35.437195 39.469592
84 -11.130887 -35.437195
85 7.111583 -11.130887
86 22.634537 7.111583
87 8.476434 22.634537
88 -8.976789 8.476434
89 18.362107 -8.976789
90 -2.962246 18.362107
91 18.626641 -2.962246
92 23.669997 18.626641
93 -10.283786 23.669997
94 -20.362752 -10.283786
95 36.482059 -20.362752
96 -10.371235 36.482059
97 -28.244567 -10.371235
98 2.673866 -28.244567
99 29.936867 2.673866
100 -17.952617 29.936867
101 -23.513173 -17.952617
102 56.064336 -23.513173
103 21.301984 56.064336
104 -13.573423 21.301984
105 18.831010 -13.573423
106 -6.869326 18.831010
107 -31.513538 -6.869326
108 29.427720 -31.513538
109 -22.310475 29.427720
110 12.731982 -22.310475
111 -7.812804 12.731982
112 11.480786 -7.812804
113 -7.227438 11.480786
114 -19.326829 -7.227438
115 -4.999133 -19.326829
116 -8.325681 -4.999133
117 NA -8.325681
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -26.912425 67.794913
[2,] 30.987697 -26.912425
[3,] -18.774454 30.987697
[4,] -26.062841 -18.774454
[5,] 39.617391 -26.062841
[6,] 36.861510 39.617391
[7,] -9.096584 36.861510
[8,] -11.244229 -9.096584
[9,] -21.379949 -11.244229
[10,] 44.591300 -21.379949
[11,] -11.393004 44.591300
[12,] 21.849288 -11.393004
[13,] -26.162580 21.849288
[14,] -4.986146 -26.162580
[15,] -4.912059 -4.986146
[16,] -1.793440 -4.912059
[17,] -26.827320 -1.793440
[18,] 33.368378 -26.827320
[19,] -7.888811 33.368378
[20,] -15.860045 -7.888811
[21,] -7.420199 -15.860045
[22,] -8.491781 -7.420199
[23,] -7.749559 -8.491781
[24,] -16.475555 -7.749559
[25,] -6.261224 -16.475555
[26,] -10.299527 -6.261224
[27,] -20.381151 -10.299527
[28,] -17.236880 -20.381151
[29,] 7.357241 -17.236880
[30,] -14.482944 7.357241
[31,] -10.768939 -14.482944
[32,] 24.812899 -10.768939
[33,] 6.584052 24.812899
[34,] -13.517095 6.584052
[35,] -4.109875 -13.517095
[36,] 22.470307 -4.109875
[37,] -3.270076 22.470307
[38,] -6.943536 -3.270076
[39,] -10.170816 -6.943536
[40,] -27.585147 -10.170816
[41,] 31.901803 -27.585147
[42,] -12.171664 31.901803
[43,] -4.740838 -12.171664
[44,] -21.271291 -4.740838
[45,] -24.858253 -21.271291
[46,] -12.320014 -24.858253
[47,] 9.103837 -12.320014
[48,] -21.639535 9.103837
[49,] 5.923475 -21.639535
[50,] -11.463320 5.923475
[51,] -5.342851 -11.463320
[52,] 21.986048 -5.342851
[53,] -11.651667 21.986048
[54,] -20.507249 -11.651667
[55,] -2.165432 -20.507249
[56,] 3.759328 -2.165432
[57,] 36.899318 3.759328
[58,] -14.692383 36.899318
[59,] -17.609574 -14.692383
[60,] 17.903396 -17.609574
[61,] -18.365025 17.903396
[62,] 2.158730 -18.365025
[63,] -3.950079 2.158730
[64,] 10.153375 -3.950079
[65,] 42.984275 10.153375
[66,] -19.153126 42.984275
[67,] -20.550173 -19.153126
[68,] -1.350576 -20.550173
[69,] -26.353143 -1.350576
[70,] 27.916745 -26.353143
[71,] 2.703483 27.916745
[72,] -9.096349 2.703483
[73,] 4.345745 -9.096349
[74,] -23.740529 4.345745
[75,] -15.463369 -23.740529
[76,] -9.790398 -15.463369
[77,] 5.270163 -9.790398
[78,] 20.220422 5.270163
[79,] 41.006760 20.220422
[80,] 11.283422 41.006760
[81,] 28.802120 11.283422
[82,] 39.469592 28.802120
[83,] -35.437195 39.469592
[84,] -11.130887 -35.437195
[85,] 7.111583 -11.130887
[86,] 22.634537 7.111583
[87,] 8.476434 22.634537
[88,] -8.976789 8.476434
[89,] 18.362107 -8.976789
[90,] -2.962246 18.362107
[91,] 18.626641 -2.962246
[92,] 23.669997 18.626641
[93,] -10.283786 23.669997
[94,] -20.362752 -10.283786
[95,] 36.482059 -20.362752
[96,] -10.371235 36.482059
[97,] -28.244567 -10.371235
[98,] 2.673866 -28.244567
[99,] 29.936867 2.673866
[100,] -17.952617 29.936867
[101,] -23.513173 -17.952617
[102,] 56.064336 -23.513173
[103,] 21.301984 56.064336
[104,] -13.573423 21.301984
[105,] 18.831010 -13.573423
[106,] -6.869326 18.831010
[107,] -31.513538 -6.869326
[108,] 29.427720 -31.513538
[109,] -22.310475 29.427720
[110,] 12.731982 -22.310475
[111,] -7.812804 12.731982
[112,] 11.480786 -7.812804
[113,] -7.227438 11.480786
[114,] -19.326829 -7.227438
[115,] -4.999133 -19.326829
[116,] -8.325681 -4.999133
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -26.912425 67.794913
2 30.987697 -26.912425
3 -18.774454 30.987697
4 -26.062841 -18.774454
5 39.617391 -26.062841
6 36.861510 39.617391
7 -9.096584 36.861510
8 -11.244229 -9.096584
9 -21.379949 -11.244229
10 44.591300 -21.379949
11 -11.393004 44.591300
12 21.849288 -11.393004
13 -26.162580 21.849288
14 -4.986146 -26.162580
15 -4.912059 -4.986146
16 -1.793440 -4.912059
17 -26.827320 -1.793440
18 33.368378 -26.827320
19 -7.888811 33.368378
20 -15.860045 -7.888811
21 -7.420199 -15.860045
22 -8.491781 -7.420199
23 -7.749559 -8.491781
24 -16.475555 -7.749559
25 -6.261224 -16.475555
26 -10.299527 -6.261224
27 -20.381151 -10.299527
28 -17.236880 -20.381151
29 7.357241 -17.236880
30 -14.482944 7.357241
31 -10.768939 -14.482944
32 24.812899 -10.768939
33 6.584052 24.812899
34 -13.517095 6.584052
35 -4.109875 -13.517095
36 22.470307 -4.109875
37 -3.270076 22.470307
38 -6.943536 -3.270076
39 -10.170816 -6.943536
40 -27.585147 -10.170816
41 31.901803 -27.585147
42 -12.171664 31.901803
43 -4.740838 -12.171664
44 -21.271291 -4.740838
45 -24.858253 -21.271291
46 -12.320014 -24.858253
47 9.103837 -12.320014
48 -21.639535 9.103837
49 5.923475 -21.639535
50 -11.463320 5.923475
51 -5.342851 -11.463320
52 21.986048 -5.342851
53 -11.651667 21.986048
54 -20.507249 -11.651667
55 -2.165432 -20.507249
56 3.759328 -2.165432
57 36.899318 3.759328
58 -14.692383 36.899318
59 -17.609574 -14.692383
60 17.903396 -17.609574
61 -18.365025 17.903396
62 2.158730 -18.365025
63 -3.950079 2.158730
64 10.153375 -3.950079
65 42.984275 10.153375
66 -19.153126 42.984275
67 -20.550173 -19.153126
68 -1.350576 -20.550173
69 -26.353143 -1.350576
70 27.916745 -26.353143
71 2.703483 27.916745
72 -9.096349 2.703483
73 4.345745 -9.096349
74 -23.740529 4.345745
75 -15.463369 -23.740529
76 -9.790398 -15.463369
77 5.270163 -9.790398
78 20.220422 5.270163
79 41.006760 20.220422
80 11.283422 41.006760
81 28.802120 11.283422
82 39.469592 28.802120
83 -35.437195 39.469592
84 -11.130887 -35.437195
85 7.111583 -11.130887
86 22.634537 7.111583
87 8.476434 22.634537
88 -8.976789 8.476434
89 18.362107 -8.976789
90 -2.962246 18.362107
91 18.626641 -2.962246
92 23.669997 18.626641
93 -10.283786 23.669997
94 -20.362752 -10.283786
95 36.482059 -20.362752
96 -10.371235 36.482059
97 -28.244567 -10.371235
98 2.673866 -28.244567
99 29.936867 2.673866
100 -17.952617 29.936867
101 -23.513173 -17.952617
102 56.064336 -23.513173
103 21.301984 56.064336
104 -13.573423 21.301984
105 18.831010 -13.573423
106 -6.869326 18.831010
107 -31.513538 -6.869326
108 29.427720 -31.513538
109 -22.310475 29.427720
110 12.731982 -22.310475
111 -7.812804 12.731982
112 11.480786 -7.812804
113 -7.227438 11.480786
114 -19.326829 -7.227438
115 -4.999133 -19.326829
116 -8.325681 -4.999133
> 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/7wm4d1200837407.ps",horizontal=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/8nq3e1200837407.ps",horizontal=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/9eh0a1200837407.ps",horizontal=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/10blg31200837407.ps",horizontal=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
> 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/11uxgc1200837408.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/12as8m1200837408.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/13ndnh1200837408.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/14q4h11200837408.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/15tgep1200837408.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/164zjj1200837408.tab")
+ }
>
> system("convert tmp/1r58v1200837407.ps tmp/1r58v1200837407.png")
> system("convert tmp/2xchl1200837407.ps tmp/2xchl1200837407.png")
> system("convert tmp/3vc5l1200837407.ps tmp/3vc5l1200837407.png")
> system("convert tmp/484pt1200837407.ps tmp/484pt1200837407.png")
> system("convert tmp/5wldi1200837407.ps tmp/5wldi1200837407.png")
> system("convert tmp/6f8hu1200837407.ps tmp/6f8hu1200837407.png")
> system("convert tmp/7wm4d1200837407.ps tmp/7wm4d1200837407.png")
> system("convert tmp/8nq3e1200837407.ps tmp/8nq3e1200837407.png")
> system("convert tmp/9eh0a1200837407.ps tmp/9eh0a1200837407.png")
> system("convert tmp/10blg31200837407.ps tmp/10blg31200837407.png")
>
>
> proc.time()
user system elapsed
3.599 1.730 4.207