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(6.5
+ ,8.9
+ ,-0.6
+ ,9
+ ,6.3
+ ,8.4
+ ,1.1
+ ,11
+ ,5.9
+ ,8.1
+ ,1.4
+ ,13
+ ,5.5
+ ,8.3
+ ,1.4
+ ,12
+ ,5.2
+ ,8.1
+ ,1.3
+ ,13
+ ,4.9
+ ,8
+ ,1.4
+ ,15
+ ,5.4
+ ,8.7
+ ,-0.1
+ ,13
+ ,5.8
+ ,9.2
+ ,1.8
+ ,16
+ ,5.7
+ ,9
+ ,1.5
+ ,10
+ ,5.6
+ ,8.9
+ ,1.5
+ ,14
+ ,5.5
+ ,8.5
+ ,1.4
+ ,14
+ ,5.4
+ ,8.1
+ ,1.6
+ ,15
+ ,5.4
+ ,7.5
+ ,1.6
+ ,13
+ ,5.4
+ ,7.1
+ ,1.6
+ ,8
+ ,5.5
+ ,6.9
+ ,1.4
+ ,7
+ ,5.8
+ ,7.1
+ ,1.7
+ ,3
+ ,5.7
+ ,7
+ ,1.8
+ ,3
+ ,5.4
+ ,6.7
+ ,1.9
+ ,4
+ ,5.6
+ ,7
+ ,2.2
+ ,4
+ ,5.8
+ ,7.3
+ ,2.1
+ ,0
+ ,6.2
+ ,7.7
+ ,2.4
+ ,-4
+ ,6.8
+ ,8.4
+ ,2.6
+ ,-14
+ ,6.7
+ ,8.4
+ ,2.8
+ ,-18
+ ,6.7
+ ,8.8
+ ,2.7
+ ,-8
+ ,6.4
+ ,9.1
+ ,2.6
+ ,-1
+ ,6.3
+ ,9
+ ,2.9
+ ,1
+ ,6.3
+ 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 = '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
Mannen Vrouwen Inflatie Consumvertr
1 6.5 8.9 -0.6 9
2 6.3 8.4 1.1 11
3 5.9 8.1 1.4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8.9 1.3 -11
66 7.1 9.0 1.5 -11
67 7.5 10.1 1.1 -11
68 7.5 10.3 1.4 -10
69 7.6 10.2 1.3 -14
70 7.7 9.6 1.5 -8
71 7.7 9.2 1.6 -9
72 7.9 9.3 1.7 -5
73 8.1 9.4 1.1 -1
74 8.2 9.4 1.6 -2
75 8.2 9.2 1.3 -5
76 8.2 9.0 1.7 -4
77 7.9 9.0 1.6 -6
78 7.3 9.0 1.7 -2
79 6.9 9.8 1.9 -2
80 6.6 10.0 1.8 -2
81 6.7 9.8 1.9 -2
82 6.9 9.3 1.6 2
83 7.0 9.0 1.5 1
84 7.1 9.0 1.6 -8
85 7.2 9.1 1.6 -1
86 7.1 9.1 1.7 1
87 6.9 9.1 2.0 -1
88 7.0 9.2 2.0 2
89 6.8 8.8 1.9 2
90 6.4 8.3 1.7 1
91 6.7 8.4 1.8 -1
92 6.6 8.1 1.9 -2
93 6.4 7.7 1.7 -2
94 6.3 7.9 2.0 -1
95 6.2 7.9 2.1 -8
96 6.5 8.0 2.4 -4
97 6.8 7.9 2.5 -6
98 6.8 7.6 2.5 -3
99 6.4 7.1 2.6 -3
100 6.1 6.8 2.2 -7
101 5.8 6.5 2.5 -9
102 6.1 6.9 2.8 -11
103 7.2 8.2 2.8 -13
104 7.3 8.7 2.9 -11
105 6.9 8.3 3.0 -9
106 6.1 7.9 3.1 -17
107 5.8 7.5 2.9 -22
108 6.2 7.8 2.7 -25
109 7.1 8.3 2.2 -20
110 7.7 8.4 2.5 -24
111 8.0 8.2 2.3 -24
112 7.8 7.6 2.6 -22
113 7.4 7.2 2.3 -19
114 7.4 7.5 2.2 -18
115 7.7 8.7 1.8 -17
116 7.8 9.0 1.8 -11
117 7.8 8.6 2.0 -11
118 8.0 7.9 1.6 -12
119 8.1 7.8 1.5 -10
120 8.4 8.2 1.4 -15
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Vrouwen Inflatie Consumvertr
3.6845 0.4269 -0.3940 -0.0659
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-1.398236 -0.273745 -0.001446 0.281379 1.079374
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 3.684527 0.563644 6.537 1.75e-09 ***
Vrouwen 0.426922 0.054908 7.775 3.38e-12 ***
Inflatie -0.393999 0.096037 -4.103 7.62e-05 ***
Consumvertr -0.065901 0.005595 -11.778 < 2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.4911 on 116 degrees of freedom
Multiple R-squared: 0.6852, Adjusted R-squared: 0.677
F-statistic: 84.15 on 3 and 116 DF, p-value: < 2.2e-16
> if (n > n25) {
+ kp3 <- k + 3
+ nmkm3 <- n - k - 3
+ gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
+ numgqtests <- 0
+ numsignificant1 <- 0
+ numsignificant5 <- 0
+ numsignificant10 <- 0
+ for (mypoint in kp3:nmkm3) {
+ j <- 0
+ numgqtests <- numgqtests + 1
+ for (myalt in c('greater', 'two.sided', 'less')) {
+ j <- j + 1
+ gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
+ }
+ if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
+ if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
+ if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
+ }
+ gqarr
+ }
[,1] [,2] [,3]
[1,] 0.3718980825 0.7437961649 0.62810192
[2,] 0.2517307940 0.5034615880 0.74826921
[3,] 0.5457459918 0.9085080163 0.45425401
[4,] 0.4241401274 0.8482802548 0.57585987
[5,] 0.3179813800 0.6359627600 0.68201862
[6,] 0.2409673008 0.4819346017 0.75903270
[7,] 0.1706951569 0.3413903139 0.82930484
[8,] 0.1315056080 0.2630112160 0.86849439
[9,] 0.0896824488 0.1793648976 0.91031755
[10,] 0.0596897724 0.1193795447 0.94031023
[11,] 0.0391063851 0.0782127702 0.96089361
[12,] 0.0276751360 0.0553502720 0.97232486
[13,] 0.0166286529 0.0332573058 0.98337135
[14,] 0.0118625035 0.0237250070 0.98813750
[15,] 0.0069156488 0.0138312975 0.99308435
[16,] 0.0042852260 0.0085704519 0.99571477
[17,] 0.0034923855 0.0069847710 0.99650761
[18,] 0.0020786104 0.0041572208 0.99792139
[19,] 0.0011293955 0.0022587911 0.99887060
[20,] 0.0006242652 0.0012485303 0.99937573
[21,] 0.0004428424 0.0008856848 0.99955716
[22,] 0.0004839716 0.0009679432 0.99951603
[23,] 0.0004925972 0.0009851944 0.99950740
[24,] 0.0002799175 0.0005598349 0.99972008
[25,] 0.0002169141 0.0004338282 0.99978309
[26,] 0.0002634439 0.0005268878 0.99973656
[27,] 0.0001804199 0.0003608399 0.99981958
[28,] 0.0049164665 0.0098329330 0.99508353
[29,] 0.0608641858 0.1217283716 0.93913581
[30,] 0.1171231539 0.2342463077 0.88287685
[31,] 0.1098441581 0.2196883162 0.89015584
[32,] 0.0877741577 0.1755483153 0.91222584
[33,] 0.0841244609 0.1682489219 0.91587554
[34,] 0.0955568836 0.1911137671 0.90444312
[35,] 0.1038581837 0.2077163674 0.89614182
[36,] 0.0869645853 0.1739291705 0.91303541
[37,] 0.0662831783 0.1325663566 0.93371682
[38,] 0.0510967101 0.1021934202 0.94890329
[39,] 0.0511992768 0.1023985535 0.94880072
[40,] 0.0402644018 0.0805288035 0.95973560
[41,] 0.0727526649 0.1455053298 0.92724734
[42,] 0.1267460274 0.2534920548 0.87325397
[43,] 0.2044748806 0.4089497611 0.79552512
[44,] 0.2969034593 0.5938069187 0.70309654
[45,] 0.2662101149 0.5324202298 0.73378989
[46,] 0.2338197838 0.4676395675 0.76618022
[47,] 0.2474966105 0.4949932209 0.75250339
[48,] 0.2397484734 0.4794969467 0.76025153
[49,] 0.2058154436 0.4116308872 0.79418456
[50,] 0.1715226636 0.3430453273 0.82847734
[51,] 0.1468456413 0.2936912826 0.85315436
[52,] 0.1195247228 0.2390494455 0.88047528
[53,] 0.0983302382 0.1966604764 0.90166976
[54,] 0.0792557844 0.1585115687 0.92074422
[55,] 0.0645282102 0.1290564205 0.93547179
[56,] 0.0543942985 0.1087885970 0.94560570
[57,] 0.0564336108 0.1128672216 0.94356639
[58,] 0.0444788651 0.0889577301 0.95552113
[59,] 0.0370605527 0.0741211053 0.96293945
[60,] 0.0461963929 0.0923927858 0.95380361
[61,] 0.0783836611 0.1567673222 0.92161634
[62,] 0.1000633845 0.2001267689 0.89993662
[63,] 0.1708983775 0.3417967549 0.82910162
[64,] 0.1432406103 0.2864812205 0.85675939
[65,] 0.1174354981 0.2348709962 0.88256450
[66,] 0.1251046160 0.2502092320 0.87489538
[67,] 0.1511660420 0.3023320840 0.84883396
[68,] 0.2531850985 0.5063701970 0.74681490
[69,] 0.2873709179 0.5747418359 0.71262908
[70,] 0.4591106481 0.9182212962 0.54088935
[71,] 0.4702594504 0.9405189008 0.52974055
[72,] 0.4278601097 0.8557202194 0.57213989
[73,] 0.3941788371 0.7883576742 0.60582116
[74,] 0.4746701273 0.9493402546 0.52532987
[75,] 0.5040554422 0.9918891155 0.49594456
[76,] 0.4635951138 0.9271902276 0.53640489
[77,] 0.4204116754 0.8408233507 0.57958832
[78,] 0.4336476194 0.8672952388 0.56635238
[79,] 0.3878603993 0.7757207987 0.61213960
[80,] 0.3419902354 0.6839804709 0.65800976
[81,] 0.2982899519 0.5965799038 0.70171005
[82,] 0.2540975814 0.5081951627 0.74590242
[83,] 0.2157297304 0.4314594608 0.78427027
[84,] 0.2266698132 0.4533396264 0.77333019
[85,] 0.2144055370 0.4288110739 0.78559446
[86,] 0.1986987397 0.3973974795 0.80130126
[87,] 0.2259163754 0.4518327507 0.77408362
[88,] 0.2655760715 0.5311521430 0.73442393
[89,] 0.4607196154 0.9214392308 0.53928038
[90,] 0.4492432344 0.8984864688 0.55075677
[91,] 0.3855283123 0.7710566246 0.61447169
[92,] 0.3419693486 0.6839386973 0.65803065
[93,] 0.2914699108 0.5829398216 0.70853009
[94,] 0.2838208130 0.5676416260 0.71617919
[95,] 0.3059595465 0.6119190930 0.69404045
[96,] 0.2815095117 0.5630190233 0.71849049
[97,] 0.2378964661 0.4757929322 0.76210353
[98,] 0.2341078326 0.4682156651 0.76589217
[99,] 0.2734028047 0.5468056095 0.72659720
[100,] 0.2417424761 0.4834849522 0.75825752
[101,] 0.4559520034 0.9119040068 0.54404800
[102,] 0.8917980414 0.2164039172 0.10820196
[103,] 0.9714540612 0.0570918775 0.02854594
[104,] 0.9389324706 0.1221350589 0.06106753
[105,] 0.9043905899 0.1912188201 0.09560941
[106,] 0.9870428807 0.0259142386 0.01295712
[107,] 0.9568136105 0.0863727790 0.04318639
> postscript(file="/var/www/html/rcomp/tmp/1mf3z1292699982.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/2x6221292699982.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/3x6221292699982.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/4x6221292699982.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/5x6221292699982.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 = 120
Frequency = 1
1 2 3 4 5
-0.6274224522 0.1876378587 0.1657154158 -0.3855696114 -0.5736844722
6 7 8 9 10
-0.6597910133 -1.1814358705 -0.0485966897 -0.5768162610 -0.3705212802
11 12 13 14 15
-0.3391525237 -0.1236833984 0.0006681583 -0.1580667219 -0.1173828805
16 17 18 19 20
-0.0481703585 -0.0660783095 -0.1327012332 0.0574219474 -0.1736572436
21 22 23 24 25
-0.0898290439 -0.3688814449 -0.6536844887 -0.2048459718 -0.2110174086
26 27 28 29 30
-0.0183241738 0.1789452876 0.2095896777 0.2608747048 -0.1477181612
31 32 33 34 35
-0.5901088976 -0.8072946296 -0.5401099713 0.4551511703 0.7779270607
36 37 38 39 40
0.5683398067 0.1922705694 -0.3140244114 -0.5333594036 0.4778056642
41 42 43 44 45
0.5194838935 0.2929830765 -0.1564248595 -0.2920998209 0.2427042966
46 47 48 49 50
0.0905735066 0.6869721241 0.7194957528 0.7216450129 0.7749383598
51 52 53 54 55
0.2777979796 -0.1005810023 -0.4043059288 -0.2011622807 -0.2365162735
56 57 58 59 60
-0.0035599914 0.1424244429 -0.1369489269 -0.1007122309 0.0257885860
61 62 63 64 65
0.2159117666 0.2921219444 0.5189144743 0.0343814521 -0.1968386793
66 67 68 69 70
-0.5607310645 -0.7879443885 -0.6892283419 -0.8495388885 -0.0191819163
71 72 73 74 75
0.1250859111 0.5853964577 0.7699077885 1.0010065234 0.7704890669
76 77 78 79 80
1.0793736459 0.6081723481 0.3111750558 -0.3515624571 -0.7763466673
81 82 83 84 85
-0.5515624571 0.0073015042 0.1300773946 -0.3236290617 0.1949837116
86 87 88 89 90
0.2661850095 0.0525832635 0.3075932172 0.2389619737 -0.0922777017
91 92 93 94 95
0.0726286153 0.0742042817 -0.0338268498 -0.0351108032 -0.5570158497
96 97 98 99 100
0.0820944728 0.3323851120 0.6581637101 0.5110244036 -0.0821014846
101 102 103 104 105
-0.2676267473 -0.1519971376 0.2612033581 0.3189438504 0.2609137927
106 107 108 109 110
-0.8561233143 -1.3936579705 -1.3982363445 -0.5791930653 -0.1672883822
111 112 113 114 115
0.1392961641 0.4454502045 0.2957212998 0.1941456334 -0.1098591468
116 117 118 119 120
0.2574685994 0.5070370198 0.7823818907 1.0174755737 0.7778035167
> postscript(file="/var/www/html/rcomp/tmp/6qgk51292699982.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 = 120
Frequency = 1
lag(myerror, k = 1) myerror
0 -0.6274224522 NA
1 0.1876378587 -0.6274224522
2 0.1657154158 0.1876378587
3 -0.3855696114 0.1657154158
4 -0.5736844722 -0.3855696114
5 -0.6597910133 -0.5736844722
6 -1.1814358705 -0.6597910133
7 -0.0485966897 -1.1814358705
8 -0.5768162610 -0.0485966897
9 -0.3705212802 -0.5768162610
10 -0.3391525237 -0.3705212802
11 -0.1236833984 -0.3391525237
12 0.0006681583 -0.1236833984
13 -0.1580667219 0.0006681583
14 -0.1173828805 -0.1580667219
15 -0.0481703585 -0.1173828805
16 -0.0660783095 -0.0481703585
17 -0.1327012332 -0.0660783095
18 0.0574219474 -0.1327012332
19 -0.1736572436 0.0574219474
20 -0.0898290439 -0.1736572436
21 -0.3688814449 -0.0898290439
22 -0.6536844887 -0.3688814449
23 -0.2048459718 -0.6536844887
24 -0.2110174086 -0.2048459718
25 -0.0183241738 -0.2110174086
26 0.1789452876 -0.0183241738
27 0.2095896777 0.1789452876
28 0.2608747048 0.2095896777
29 -0.1477181612 0.2608747048
30 -0.5901088976 -0.1477181612
31 -0.8072946296 -0.5901088976
32 -0.5401099713 -0.8072946296
33 0.4551511703 -0.5401099713
34 0.7779270607 0.4551511703
35 0.5683398067 0.7779270607
36 0.1922705694 0.5683398067
37 -0.3140244114 0.1922705694
38 -0.5333594036 -0.3140244114
39 0.4778056642 -0.5333594036
40 0.5194838935 0.4778056642
41 0.2929830765 0.5194838935
42 -0.1564248595 0.2929830765
43 -0.2920998209 -0.1564248595
44 0.2427042966 -0.2920998209
45 0.0905735066 0.2427042966
46 0.6869721241 0.0905735066
47 0.7194957528 0.6869721241
48 0.7216450129 0.7194957528
49 0.7749383598 0.7216450129
50 0.2777979796 0.7749383598
51 -0.1005810023 0.2777979796
52 -0.4043059288 -0.1005810023
53 -0.2011622807 -0.4043059288
54 -0.2365162735 -0.2011622807
55 -0.0035599914 -0.2365162735
56 0.1424244429 -0.0035599914
57 -0.1369489269 0.1424244429
58 -0.1007122309 -0.1369489269
59 0.0257885860 -0.1007122309
60 0.2159117666 0.0257885860
61 0.2921219444 0.2159117666
62 0.5189144743 0.2921219444
63 0.0343814521 0.5189144743
64 -0.1968386793 0.0343814521
65 -0.5607310645 -0.1968386793
66 -0.7879443885 -0.5607310645
67 -0.6892283419 -0.7879443885
68 -0.8495388885 -0.6892283419
69 -0.0191819163 -0.8495388885
70 0.1250859111 -0.0191819163
71 0.5853964577 0.1250859111
72 0.7699077885 0.5853964577
73 1.0010065234 0.7699077885
74 0.7704890669 1.0010065234
75 1.0793736459 0.7704890669
76 0.6081723481 1.0793736459
77 0.3111750558 0.6081723481
78 -0.3515624571 0.3111750558
79 -0.7763466673 -0.3515624571
80 -0.5515624571 -0.7763466673
81 0.0073015042 -0.5515624571
82 0.1300773946 0.0073015042
83 -0.3236290617 0.1300773946
84 0.1949837116 -0.3236290617
85 0.2661850095 0.1949837116
86 0.0525832635 0.2661850095
87 0.3075932172 0.0525832635
88 0.2389619737 0.3075932172
89 -0.0922777017 0.2389619737
90 0.0726286153 -0.0922777017
91 0.0742042817 0.0726286153
92 -0.0338268498 0.0742042817
93 -0.0351108032 -0.0338268498
94 -0.5570158497 -0.0351108032
95 0.0820944728 -0.5570158497
96 0.3323851120 0.0820944728
97 0.6581637101 0.3323851120
98 0.5110244036 0.6581637101
99 -0.0821014846 0.5110244036
100 -0.2676267473 -0.0821014846
101 -0.1519971376 -0.2676267473
102 0.2612033581 -0.1519971376
103 0.3189438504 0.2612033581
104 0.2609137927 0.3189438504
105 -0.8561233143 0.2609137927
106 -1.3936579705 -0.8561233143
107 -1.3982363445 -1.3936579705
108 -0.5791930653 -1.3982363445
109 -0.1672883822 -0.5791930653
110 0.1392961641 -0.1672883822
111 0.4454502045 0.1392961641
112 0.2957212998 0.4454502045
113 0.1941456334 0.2957212998
114 -0.1098591468 0.1941456334
115 0.2574685994 -0.1098591468
116 0.5070370198 0.2574685994
117 0.7823818907 0.5070370198
118 1.0174755737 0.7823818907
119 0.7778035167 1.0174755737
120 NA 0.7778035167
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 0.1876378587 -0.6274224522
[2,] 0.1657154158 0.1876378587
[3,] -0.3855696114 0.1657154158
[4,] -0.5736844722 -0.3855696114
[5,] -0.6597910133 -0.5736844722
[6,] -1.1814358705 -0.6597910133
[7,] -0.0485966897 -1.1814358705
[8,] -0.5768162610 -0.0485966897
[9,] -0.3705212802 -0.5768162610
[10,] -0.3391525237 -0.3705212802
[11,] -0.1236833984 -0.3391525237
[12,] 0.0006681583 -0.1236833984
[13,] -0.1580667219 0.0006681583
[14,] -0.1173828805 -0.1580667219
[15,] -0.0481703585 -0.1173828805
[16,] -0.0660783095 -0.0481703585
[17,] -0.1327012332 -0.0660783095
[18,] 0.0574219474 -0.1327012332
[19,] -0.1736572436 0.0574219474
[20,] -0.0898290439 -0.1736572436
[21,] -0.3688814449 -0.0898290439
[22,] -0.6536844887 -0.3688814449
[23,] -0.2048459718 -0.6536844887
[24,] -0.2110174086 -0.2048459718
[25,] -0.0183241738 -0.2110174086
[26,] 0.1789452876 -0.0183241738
[27,] 0.2095896777 0.1789452876
[28,] 0.2608747048 0.2095896777
[29,] -0.1477181612 0.2608747048
[30,] -0.5901088976 -0.1477181612
[31,] -0.8072946296 -0.5901088976
[32,] -0.5401099713 -0.8072946296
[33,] 0.4551511703 -0.5401099713
[34,] 0.7779270607 0.4551511703
[35,] 0.5683398067 0.7779270607
[36,] 0.1922705694 0.5683398067
[37,] -0.3140244114 0.1922705694
[38,] -0.5333594036 -0.3140244114
[39,] 0.4778056642 -0.5333594036
[40,] 0.5194838935 0.4778056642
[41,] 0.2929830765 0.5194838935
[42,] -0.1564248595 0.2929830765
[43,] -0.2920998209 -0.1564248595
[44,] 0.2427042966 -0.2920998209
[45,] 0.0905735066 0.2427042966
[46,] 0.6869721241 0.0905735066
[47,] 0.7194957528 0.6869721241
[48,] 0.7216450129 0.7194957528
[49,] 0.7749383598 0.7216450129
[50,] 0.2777979796 0.7749383598
[51,] -0.1005810023 0.2777979796
[52,] -0.4043059288 -0.1005810023
[53,] -0.2011622807 -0.4043059288
[54,] -0.2365162735 -0.2011622807
[55,] -0.0035599914 -0.2365162735
[56,] 0.1424244429 -0.0035599914
[57,] -0.1369489269 0.1424244429
[58,] -0.1007122309 -0.1369489269
[59,] 0.0257885860 -0.1007122309
[60,] 0.2159117666 0.0257885860
[61,] 0.2921219444 0.2159117666
[62,] 0.5189144743 0.2921219444
[63,] 0.0343814521 0.5189144743
[64,] -0.1968386793 0.0343814521
[65,] -0.5607310645 -0.1968386793
[66,] -0.7879443885 -0.5607310645
[67,] -0.6892283419 -0.7879443885
[68,] -0.8495388885 -0.6892283419
[69,] -0.0191819163 -0.8495388885
[70,] 0.1250859111 -0.0191819163
[71,] 0.5853964577 0.1250859111
[72,] 0.7699077885 0.5853964577
[73,] 1.0010065234 0.7699077885
[74,] 0.7704890669 1.0010065234
[75,] 1.0793736459 0.7704890669
[76,] 0.6081723481 1.0793736459
[77,] 0.3111750558 0.6081723481
[78,] -0.3515624571 0.3111750558
[79,] -0.7763466673 -0.3515624571
[80,] -0.5515624571 -0.7763466673
[81,] 0.0073015042 -0.5515624571
[82,] 0.1300773946 0.0073015042
[83,] -0.3236290617 0.1300773946
[84,] 0.1949837116 -0.3236290617
[85,] 0.2661850095 0.1949837116
[86,] 0.0525832635 0.2661850095
[87,] 0.3075932172 0.0525832635
[88,] 0.2389619737 0.3075932172
[89,] -0.0922777017 0.2389619737
[90,] 0.0726286153 -0.0922777017
[91,] 0.0742042817 0.0726286153
[92,] -0.0338268498 0.0742042817
[93,] -0.0351108032 -0.0338268498
[94,] -0.5570158497 -0.0351108032
[95,] 0.0820944728 -0.5570158497
[96,] 0.3323851120 0.0820944728
[97,] 0.6581637101 0.3323851120
[98,] 0.5110244036 0.6581637101
[99,] -0.0821014846 0.5110244036
[100,] -0.2676267473 -0.0821014846
[101,] -0.1519971376 -0.2676267473
[102,] 0.2612033581 -0.1519971376
[103,] 0.3189438504 0.2612033581
[104,] 0.2609137927 0.3189438504
[105,] -0.8561233143 0.2609137927
[106,] -1.3936579705 -0.8561233143
[107,] -1.3982363445 -1.3936579705
[108,] -0.5791930653 -1.3982363445
[109,] -0.1672883822 -0.5791930653
[110,] 0.1392961641 -0.1672883822
[111,] 0.4454502045 0.1392961641
[112,] 0.2957212998 0.4454502045
[113,] 0.1941456334 0.2957212998
[114,] -0.1098591468 0.1941456334
[115,] 0.2574685994 -0.1098591468
[116,] 0.5070370198 0.2574685994
[117,] 0.7823818907 0.5070370198
[118,] 1.0174755737 0.7823818907
[119,] 0.7778035167 1.0174755737
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 0.1876378587 -0.6274224522
2 0.1657154158 0.1876378587
3 -0.3855696114 0.1657154158
4 -0.5736844722 -0.3855696114
5 -0.6597910133 -0.5736844722
6 -1.1814358705 -0.6597910133
7 -0.0485966897 -1.1814358705
8 -0.5768162610 -0.0485966897
9 -0.3705212802 -0.5768162610
10 -0.3391525237 -0.3705212802
11 -0.1236833984 -0.3391525237
12 0.0006681583 -0.1236833984
13 -0.1580667219 0.0006681583
14 -0.1173828805 -0.1580667219
15 -0.0481703585 -0.1173828805
16 -0.0660783095 -0.0481703585
17 -0.1327012332 -0.0660783095
18 0.0574219474 -0.1327012332
19 -0.1736572436 0.0574219474
20 -0.0898290439 -0.1736572436
21 -0.3688814449 -0.0898290439
22 -0.6536844887 -0.3688814449
23 -0.2048459718 -0.6536844887
24 -0.2110174086 -0.2048459718
25 -0.0183241738 -0.2110174086
26 0.1789452876 -0.0183241738
27 0.2095896777 0.1789452876
28 0.2608747048 0.2095896777
29 -0.1477181612 0.2608747048
30 -0.5901088976 -0.1477181612
31 -0.8072946296 -0.5901088976
32 -0.5401099713 -0.8072946296
33 0.4551511703 -0.5401099713
34 0.7779270607 0.4551511703
35 0.5683398067 0.7779270607
36 0.1922705694 0.5683398067
37 -0.3140244114 0.1922705694
38 -0.5333594036 -0.3140244114
39 0.4778056642 -0.5333594036
40 0.5194838935 0.4778056642
41 0.2929830765 0.5194838935
42 -0.1564248595 0.2929830765
43 -0.2920998209 -0.1564248595
44 0.2427042966 -0.2920998209
45 0.0905735066 0.2427042966
46 0.6869721241 0.0905735066
47 0.7194957528 0.6869721241
48 0.7216450129 0.7194957528
49 0.7749383598 0.7216450129
50 0.2777979796 0.7749383598
51 -0.1005810023 0.2777979796
52 -0.4043059288 -0.1005810023
53 -0.2011622807 -0.4043059288
54 -0.2365162735 -0.2011622807
55 -0.0035599914 -0.2365162735
56 0.1424244429 -0.0035599914
57 -0.1369489269 0.1424244429
58 -0.1007122309 -0.1369489269
59 0.0257885860 -0.1007122309
60 0.2159117666 0.0257885860
61 0.2921219444 0.2159117666
62 0.5189144743 0.2921219444
63 0.0343814521 0.5189144743
64 -0.1968386793 0.0343814521
65 -0.5607310645 -0.1968386793
66 -0.7879443885 -0.5607310645
67 -0.6892283419 -0.7879443885
68 -0.8495388885 -0.6892283419
69 -0.0191819163 -0.8495388885
70 0.1250859111 -0.0191819163
71 0.5853964577 0.1250859111
72 0.7699077885 0.5853964577
73 1.0010065234 0.7699077885
74 0.7704890669 1.0010065234
75 1.0793736459 0.7704890669
76 0.6081723481 1.0793736459
77 0.3111750558 0.6081723481
78 -0.3515624571 0.3111750558
79 -0.7763466673 -0.3515624571
80 -0.5515624571 -0.7763466673
81 0.0073015042 -0.5515624571
82 0.1300773946 0.0073015042
83 -0.3236290617 0.1300773946
84 0.1949837116 -0.3236290617
85 0.2661850095 0.1949837116
86 0.0525832635 0.2661850095
87 0.3075932172 0.0525832635
88 0.2389619737 0.3075932172
89 -0.0922777017 0.2389619737
90 0.0726286153 -0.0922777017
91 0.0742042817 0.0726286153
92 -0.0338268498 0.0742042817
93 -0.0351108032 -0.0338268498
94 -0.5570158497 -0.0351108032
95 0.0820944728 -0.5570158497
96 0.3323851120 0.0820944728
97 0.6581637101 0.3323851120
98 0.5110244036 0.6581637101
99 -0.0821014846 0.5110244036
100 -0.2676267473 -0.0821014846
101 -0.1519971376 -0.2676267473
102 0.2612033581 -0.1519971376
103 0.3189438504 0.2612033581
104 0.2609137927 0.3189438504
105 -0.8561233143 0.2609137927
106 -1.3936579705 -0.8561233143
107 -1.3982363445 -1.3936579705
108 -0.5791930653 -1.3982363445
109 -0.1672883822 -0.5791930653
110 0.1392961641 -0.1672883822
111 0.4454502045 0.1392961641
112 0.2957212998 0.4454502045
113 0.1941456334 0.2957212998
114 -0.1098591468 0.1941456334
115 0.2574685994 -0.1098591468
116 0.5070370198 0.2574685994
117 0.7823818907 0.5070370198
118 1.0174755737 0.7823818907
119 0.7778035167 1.0174755737
> 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/7ip1q1292699982.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/8ip1q1292699982.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/9ip1q1292699982.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/10tyit1292699982.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/11egyh1292699982.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/12izfn1292699982.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/13wrvw1292699982.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/14zru21292699982.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/153aa71292699982.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/166aqd1292699982.tab")
+ }
>
> try(system("convert tmp/1mf3z1292699982.ps tmp/1mf3z1292699982.png",intern=TRUE))
character(0)
> try(system("convert tmp/2x6221292699982.ps tmp/2x6221292699982.png",intern=TRUE))
character(0)
> try(system("convert tmp/3x6221292699982.ps tmp/3x6221292699982.png",intern=TRUE))
character(0)
> try(system("convert tmp/4x6221292699982.ps tmp/4x6221292699982.png",intern=TRUE))
character(0)
> try(system("convert tmp/5x6221292699982.ps tmp/5x6221292699982.png",intern=TRUE))
character(0)
> try(system("convert tmp/6qgk51292699982.ps tmp/6qgk51292699982.png",intern=TRUE))
character(0)
> try(system("convert tmp/7ip1q1292699982.ps tmp/7ip1q1292699982.png",intern=TRUE))
character(0)
> try(system("convert tmp/8ip1q1292699982.ps tmp/8ip1q1292699982.png",intern=TRUE))
character(0)
> try(system("convert tmp/9ip1q1292699982.ps tmp/9ip1q1292699982.png",intern=TRUE))
character(0)
> try(system("convert tmp/10tyit1292699982.ps tmp/10tyit1292699982.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
3.374 1.732 7.996