R version 2.8.0 (2008-10-20)
Copyright (C) 2008 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.
Natural language support but running in an English locale
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(10
+ ,5
+ ,4
+ ,20
+ ,2
+ ,2
+ ,40
+ ,6
+ ,5
+ ,67
+ ,6
+ ,5
+ ,38
+ ,5
+ ,2
+ ,61
+ ,5
+ ,2
+ ,29
+ ,6
+ ,4
+ ,0
+ ,5
+ ,7
+ ,30
+ ,6
+ ,6
+ ,39
+ ,5
+ ,4
+ ,70
+ ,6
+ ,1
+ ,65
+ ,5
+ ,4
+ ,5
+ ,5
+ ,1
+ ,30
+ ,4
+ ,5
+ ,50
+ ,7
+ ,5
+ ,90
+ ,5
+ ,5
+ ,45
+ ,4
+ ,4
+ ,75
+ ,6
+ ,3
+ ,76
+ ,6
+ ,5
+ ,15
+ ,5
+ ,5
+ ,10
+ ,5
+ ,5
+ ,0
+ ,5
+ ,4
+ ,60
+ ,6
+ ,4
+ ,67
+ ,5
+ ,2
+ ,60
+ ,6
+ ,1
+ ,70
+ ,6
+ ,2
+ ,70
+ ,5
+ ,3
+ ,87
+ ,6
+ ,3
+ ,27
+ ,6
+ ,2
+ ,65
+ ,5
+ ,2
+ ,56
+ ,5
+ ,6
+ ,82
+ ,6
+ ,5
+ ,30
+ ,5
+ ,3
+ ,38
+ ,6
+ ,5
+ ,56
+ ,6
+ ,5
+ ,70
+ ,6
+ ,2
+ ,80
+ ,6
+ ,4
+ ,71
+ ,6
+ ,3
+ ,50
+ ,5
+ ,1
+ ,31
+ ,5
+ ,2
+ ,40
+ ,6
+ ,5
+ ,71
+ ,6
+ ,2
+ ,71
+ ,5
+ ,2
+ ,10
+ ,5
+ ,5
+ ,20
+ ,5
+ ,5
+ ,40
+ ,6
+ ,2
+ ,55
+ ,2
+ ,2
+ ,80
+ ,7
+ ,3
+ ,80
+ ,5
+ ,1
+ ,72
+ ,7
+ ,2
+ ,60
+ ,6
+ ,2
+ ,29
+ ,6
+ ,4
+ ,70
+ ,5
+ ,2
+ ,60
+ ,4
+ ,5
+ ,63
+ ,6
+ ,2
+ ,70
+ ,7
+ ,2
+ ,38
+ ,5
+ ,2
+ ,40
+ ,6
+ ,5
+ ,80
+ ,6
+ ,2
+ ,24
+ ,5
+ ,5
+ ,40
+ ,5
+ ,4
+ ,47
+ ,6
+ ,1
+ ,70
+ ,5
+ ,1
+ ,70
+ ,5
+ ,2
+ ,75
+ ,2
+ ,5
+ ,60
+ ,5
+ ,5
+ ,65
+ ,5
+ ,3
+ ,91
+ ,5
+ ,2
+ ,68
+ ,5
+ ,5
+ ,80
+ ,6
+ ,2
+ ,90
+ ,4
+ ,5
+ ,20
+ ,5
+ ,2
+ ,61
+ ,6
+ ,3
+ ,13
+ ,3
+ ,6
+ ,80
+ ,6
+ ,3
+ ,40
+ ,5
+ ,4
+ ,70
+ ,5
+ ,2
+ ,39
+ ,6
+ ,3
+ ,93
+ ,6
+ ,5
+ ,10
+ ,6
+ ,5
+ ,25
+ ,6
+ ,3
+ ,61
+ ,5
+ ,2
+ ,18
+ ,3
+ ,5
+ ,60
+ ,6
+ ,2
+ ,74
+ ,6
+ ,3
+ ,35
+ ,5
+ ,1
+ ,0
+ ,5
+ ,5
+ ,71
+ ,5
+ ,2
+ ,100
+ ,6
+ ,1
+ ,64
+ ,6
+ ,5
+ ,50
+ ,6
+ ,2
+ ,40
+ ,5
+ ,2
+ ,35
+ ,4
+ ,4
+ ,60
+ ,5
+ ,4
+ ,70
+ ,7
+ ,2
+ ,55
+ ,3
+ ,4
+ ,65
+ ,6
+ ,2
+ ,30
+ ,6
+ ,2
+ ,25
+ ,2
+ ,1
+ ,80
+ ,7
+ ,4
+ ,26
+ ,5
+ ,6
+ ,78
+ ,6
+ ,4
+ ,10
+ ,5
+ ,7
+ ,70
+ ,4
+ ,1
+ ,0
+ ,3
+ ,2
+ ,65
+ ,6
+ ,1
+ ,80
+ ,6
+ ,2
+ ,60
+ ,5
+ ,1
+ ,67
+ ,6
+ ,5
+ ,49
+ ,6
+ ,3
+ ,70
+ ,5
+ ,2
+ ,66
+ ,6
+ ,3
+ ,65
+ ,4
+ ,3
+ ,65
+ ,6
+ ,5
+ ,40
+ ,6
+ ,1
+ ,40
+ ,5
+ ,2
+ ,20
+ ,7
+ ,2
+ ,90
+ ,6
+ ,5
+ ,48
+ ,6
+ ,2
+ ,25
+ ,6
+ ,1
+ ,35
+ ,5
+ ,2
+ ,40
+ ,6
+ ,5
+ ,77
+ ,5
+ ,2
+ ,70
+ ,3
+ ,5
+ ,82
+ ,5
+ ,1
+ ,80
+ ,5
+ ,2
+ ,52
+ ,3
+ ,5
+ ,71
+ ,5
+ ,4
+ ,70
+ ,5
+ ,2
+ ,50
+ ,6
+ ,5
+ ,72
+ ,6
+ ,5
+ ,80
+ ,6
+ ,3
+ ,91
+ ,6
+ ,1
+ ,18
+ ,2
+ ,2
+ ,70
+ ,4
+ ,3
+ ,76
+ ,4
+ ,1
+ ,65
+ ,6
+ ,2
+ ,35
+ ,6
+ ,2
+ ,62
+ ,6
+ ,2
+ ,76
+ ,6
+ ,2
+ ,50
+ ,6
+ ,5
+ ,68
+ ,6
+ ,4
+ ,80
+ ,5
+ ,2
+ ,90
+ ,7
+ ,4
+ ,79
+ ,5
+ ,5
+ ,30
+ ,4
+ ,5
+ ,60
+ ,5
+ ,5)
+ ,dim=c(3
+ ,147)
+ ,dimnames=list(c('Talk'
+ ,'Hands'
+ ,'Anxiety
')
+ ,1:147))
> y <- array(NA,dim=c(3,147),dimnames=list(c('Talk','Hands','Anxiety
'),1:147))
> 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
Talk Hands Anxiety\r
1 10 5 4
2 20 2 2
3 40 6 5
4 67 6 5
5 38 5 2
6 61 5 2
7 29 6 4
8 0 5 7
9 30 6 6
10 39 5 4
11 70 6 1
12 65 5 4
13 5 5 1
14 30 4 5
15 50 7 5
16 90 5 5
17 45 4 4
18 75 6 3
19 76 6 5
20 15 5 5
21 10 5 5
22 0 5 4
23 60 6 4
24 67 5 2
25 60 6 1
26 70 6 2
27 70 5 3
28 87 6 3
29 27 6 2
30 65 5 2
31 56 5 6
32 82 6 5
33 30 5 3
34 38 6 5
35 56 6 5
36 70 6 2
37 80 6 4
38 71 6 3
39 50 5 1
40 31 5 2
41 40 6 5
42 71 6 2
43 71 5 2
44 10 5 5
45 20 5 5
46 40 6 2
47 55 2 2
48 80 7 3
49 80 5 1
50 72 7 2
51 60 6 2
52 29 6 4
53 70 5 2
54 60 4 5
55 63 6 2
56 70 7 2
57 38 5 2
58 40 6 5
59 80 6 2
60 24 5 5
61 40 5 4
62 47 6 1
63 70 5 1
64 70 5 2
65 75 2 5
66 60 5 5
67 65 5 3
68 91 5 2
69 68 5 5
70 80 6 2
71 90 4 5
72 20 5 2
73 61 6 3
74 13 3 6
75 80 6 3
76 40 5 4
77 70 5 2
78 39 6 3
79 93 6 5
80 10 6 5
81 25 6 3
82 61 5 2
83 18 3 5
84 60 6 2
85 74 6 3
86 35 5 1
87 0 5 5
88 71 5 2
89 100 6 1
90 64 6 5
91 50 6 2
92 40 5 2
93 35 4 4
94 60 5 4
95 70 7 2
96 55 3 4
97 65 6 2
98 30 6 2
99 25 2 1
100 80 7 4
101 26 5 6
102 78 6 4
103 10 5 7
104 70 4 1
105 0 3 2
106 65 6 1
107 80 6 2
108 60 5 1
109 67 6 5
110 49 6 3
111 70 5 2
112 66 6 3
113 65 4 3
114 65 6 5
115 40 6 1
116 40 5 2
117 20 7 2
118 90 6 5
119 48 6 2
120 25 6 1
121 35 5 2
122 40 6 5
123 77 5 2
124 70 3 5
125 82 5 1
126 80 5 2
127 52 3 5
128 71 5 4
129 70 5 2
130 50 6 5
131 72 6 5
132 80 6 3
133 91 6 1
134 18 2 2
135 70 4 3
136 76 4 1
137 65 6 2
138 35 6 2
139 62 6 2
140 76 6 2
141 50 6 5
142 68 6 4
143 80 5 2
144 90 7 4
145 79 5 5
146 30 4 5
147 60 5 5
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Hands `Anxiety\r`
34.200 5.729 -3.202
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-54.644 -17.546 4.099 16.252 48.891
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 34.200 10.559 3.239 0.00149 **
Hands 5.729 1.784 3.212 0.00163 **
`Anxiety\r` -3.202 1.207 -2.653 0.00888 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 22.67 on 144 degrees of freedom
Multiple R-squared: 0.1132, Adjusted R-squared: 0.1009
F-statistic: 9.188 on 2 and 144 DF, p-value: 0.0001755
> 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.6262608 0.74747836 0.37373918
[2,] 0.5582015 0.88359693 0.44179847
[3,] 0.4645122 0.92902450 0.53548775
[4,] 0.3399250 0.67985003 0.66007498
[5,] 0.2428841 0.48576819 0.75711591
[6,] 0.1595340 0.31906791 0.84046605
[7,] 0.2569547 0.51390943 0.74304529
[8,] 0.6172752 0.76544951 0.38272476
[9,] 0.5454094 0.90918128 0.45459064
[10,] 0.4576703 0.91534059 0.54232970
[11,] 0.8100106 0.37997885 0.18998942
[12,] 0.7682461 0.46350782 0.23175391
[13,] 0.7677046 0.46459076 0.23229538
[14,] 0.7865308 0.42693839 0.21346920
[15,] 0.7932597 0.41348067 0.20674034
[16,] 0.8171800 0.36564009 0.18282004
[17,] 0.8934486 0.21310277 0.10655139
[18,] 0.8665666 0.26686678 0.13343339
[19,] 0.8536316 0.29273682 0.14636841
[20,] 0.8140186 0.37196280 0.18598140
[21,] 0.7780459 0.44390816 0.22195408
[22,] 0.7812762 0.43744766 0.21872383
[23,] 0.8074121 0.38517581 0.19258791
[24,] 0.8524322 0.29513551 0.14756776
[25,] 0.8294694 0.34106114 0.17053057
[26,] 0.8217959 0.35640818 0.17820409
[27,] 0.8503440 0.29931202 0.14965601
[28,] 0.8374394 0.32512123 0.16256062
[29,] 0.8124654 0.37506919 0.18753459
[30,] 0.7743855 0.45122896 0.22561448
[31,] 0.7370238 0.52595242 0.26297621
[32,] 0.7448994 0.51020118 0.25510059
[33,] 0.7118017 0.57639661 0.28819830
[34,] 0.6672630 0.66547396 0.33273698
[35,] 0.6601051 0.67978984 0.33989492
[36,] 0.6242045 0.75159096 0.37579548
[37,] 0.5806442 0.83871163 0.41935581
[38,] 0.5659050 0.86818993 0.43409497
[39,] 0.6172918 0.76541646 0.38270823
[40,] 0.6157584 0.76848327 0.38424163
[41,] 0.6165808 0.76683849 0.38341925
[42,] 0.6586521 0.68269570 0.34134785
[43,] 0.6289402 0.74211968 0.37105984
[44,] 0.6250037 0.74999254 0.37499627
[45,] 0.5766246 0.84675081 0.42337541
[46,] 0.5272298 0.94554045 0.47277023
[47,] 0.5421246 0.91575080 0.45787540
[48,] 0.5155049 0.96899011 0.48449505
[49,] 0.5293132 0.94137365 0.47068683
[50,] 0.4797400 0.95947998 0.52026001
[51,] 0.4306940 0.86138793 0.56930604
[52,] 0.4104626 0.82092518 0.58953741
[53,] 0.3763812 0.75276246 0.62361877
[54,] 0.3587676 0.71753512 0.64123244
[55,] 0.3530716 0.70614317 0.64692842
[56,] 0.3165059 0.63301177 0.68349411
[57,] 0.3049172 0.60983445 0.69508278
[58,] 0.2739415 0.54788304 0.72605848
[59,] 0.2518529 0.50370571 0.74814715
[60,] 0.4171996 0.83439930 0.58280035
[61,] 0.3903650 0.78073001 0.60963499
[62,] 0.3581640 0.71632803 0.64183599
[63,] 0.4190990 0.83819796 0.58090102
[64,] 0.4152954 0.83059082 0.58470459
[65,] 0.3972981 0.79459615 0.60270193
[66,] 0.5645434 0.87091317 0.43545659
[67,] 0.6364417 0.72711661 0.36355830
[68,] 0.5914614 0.81707721 0.40853861
[69,] 0.5801969 0.83960627 0.41980314
[70,] 0.5726218 0.85475649 0.42737824
[71,] 0.5355422 0.92891555 0.46445777
[72,] 0.5041418 0.99171640 0.49585820
[73,] 0.4940473 0.98809451 0.50595274
[74,] 0.5908396 0.81832075 0.40916037
[75,] 0.7092642 0.58147153 0.29073577
[76,] 0.7630324 0.47393522 0.23696761
[77,] 0.7255249 0.54895011 0.27447505
[78,] 0.7135487 0.57290259 0.28645130
[79,] 0.6716256 0.65674874 0.32837437
[80,] 0.6444298 0.71114032 0.35557016
[81,] 0.6520782 0.69584352 0.34792176
[82,] 0.8076836 0.38463287 0.19231643
[83,] 0.7863822 0.42723558 0.21361779
[84,] 0.8363607 0.32727859 0.16363930
[85,] 0.8101764 0.37964714 0.18982357
[86,] 0.7860589 0.42788222 0.21394111
[87,] 0.7701467 0.45970665 0.22985333
[88,] 0.7443777 0.51124452 0.25562226
[89,] 0.7077722 0.58445561 0.29222780
[90,] 0.6632067 0.67358655 0.33679327
[91,] 0.6334182 0.73316361 0.36658180
[92,] 0.5850689 0.82986217 0.41493109
[93,] 0.6421281 0.71574384 0.35787192
[94,] 0.6230784 0.75384314 0.37692157
[95,] 0.5981054 0.80378911 0.40189456
[96,] 0.6105852 0.77882962 0.38941481
[97,] 0.5953473 0.80930549 0.40465274
[98,] 0.7313032 0.53739364 0.26869682
[99,] 0.7148630 0.57027399 0.28513699
[100,] 0.8722665 0.25546705 0.12773353
[101,] 0.8419509 0.31609812 0.15804906
[102,] 0.8325959 0.33480825 0.16740413
[103,] 0.7954140 0.40917206 0.20458603
[104,] 0.7597819 0.48043627 0.24021814
[105,] 0.7295138 0.54097235 0.27048618
[106,] 0.6949389 0.61012222 0.30506111
[107,] 0.6451764 0.70964727 0.35482363
[108,] 0.6049843 0.79003145 0.39501573
[109,] 0.5530308 0.89393849 0.44696924
[110,] 0.5515160 0.89696807 0.44848404
[111,] 0.5361535 0.92769293 0.46384647
[112,] 0.7567038 0.48659231 0.24329616
[113,] 0.7880680 0.42386399 0.21193200
[114,] 0.7761361 0.44772781 0.22386391
[115,] 0.9198016 0.16039676 0.08019838
[116,] 0.9513644 0.09727121 0.04863560
[117,] 0.9599325 0.08013510 0.04006755
[118,] 0.9475023 0.10499535 0.05249767
[119,] 0.9620233 0.07595332 0.03797666
[120,] 0.9520056 0.09598879 0.04799440
[121,] 0.9428693 0.11426142 0.05713071
[122,] 0.9284114 0.14317710 0.07158855
[123,] 0.9112602 0.17747961 0.08873981
[124,] 0.8767407 0.24651852 0.12325926
[125,] 0.8560533 0.28789341 0.14394671
[126,] 0.8085190 0.38296190 0.19148095
[127,] 0.7574946 0.48501080 0.24250540
[128,] 0.7304644 0.53907124 0.26953562
[129,] 0.7712862 0.45742752 0.22871376
[130,] 0.7129202 0.57415953 0.28707977
[131,] 0.7012786 0.59744275 0.29872137
[132,] 0.5955550 0.80888996 0.40444498
[133,] 0.8107841 0.37843173 0.18921586
[134,] 0.7961191 0.40776174 0.20388087
[135,] 0.7090377 0.58192470 0.29096235
[136,] 0.6880067 0.62398654 0.31199327
> postscript(file="/var/www/html/freestat/rcomp/tmp/1pm1w1291491343.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/freestat/rcomp/tmp/2pm1w1291491343.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/freestat/rcomp/tmp/30d0z1291491343.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/freestat/rcomp/tmp/40d0z1291491343.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/freestat/rcomp/tmp/50d0z1291491343.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 = 147
Frequency = 1
1 2 3 4 5 6
-40.0393628 -19.2551832 -12.5668821 14.4331179 -18.4426063 4.5573937
7 8 9 10 11 12
-26.7685038 -40.4344975 -19.3652603 -11.0393628 4.6266309 14.9606372
13 14 15 16 17 18
-54.6442281 -11.1086000 -8.2960231 43.1622590 0.6897782 16.0298744
19 20 21 22 23 24
23.4331179 -31.8377410 -36.8377410 -50.0393628 4.2314962 10.5573937
25 26 27 28 29 30
-5.3733691 7.8282527 16.7590154 28.0298744 -35.1717473 8.5573937
31 32 33 34 35 36
12.3638807 29.4331179 -23.2409846 -14.5668821 3.4331179 7.8282527
37 38 39 40 41 42
24.2314962 12.0298744 -9.6442281 -25.4426063 -12.5668821 8.8282527
43 44 45 46 47 48
14.5573937 -36.8377410 -26.8377410 -22.1717473 15.7448168 15.3007334
49 50 51 52 53 54
20.3557719 4.0991116 -2.1717473 -26.7685038 13.5573937 18.8914000
55 56 57 58 59 60
0.8282527 2.0991116 -18.4426063 -12.5668821 17.8282527 -22.8377410
61 62 63 64 65 66
-10.0393628 -18.3733691 10.3557719 13.5573937 45.3496821 13.1622590
67 68 69 70 71 72
11.7590154 34.5573937 21.1622590 17.8282527 48.8914000 -36.4426063
73 74 75 76 77 78
2.0298744 -19.1778372 21.0298744 -10.0393628 13.5573937 -19.9701256
79 80 81 82 83 84
40.4331179 -42.5668821 -33.9701256 4.5573937 -17.3794590 -2.1717473
85 86 87 88 89 90
15.0298744 -24.6442281 -46.8377410 14.5573937 34.6266309 11.4331179
91 92 93 94 95 96
-12.1717473 -16.4426063 -9.3102218 9.9606372 2.0991116 16.4189193
97 98 99 100 101 102
2.8282527 -32.1717473 -17.4568050 18.5023551 -17.6361193 22.2314962
103 104 105 106 107 108
-30.4344975 16.0849130 -44.9843242 -0.3733691 17.8282527 0.3557719
109 110 111 112 113 114
14.4331179 -9.9701256 13.5573937 7.0298744 17.4881565 12.4331179
115 116 117 118 119 120
-25.3733691 -16.4426063 -47.9008884 37.4331179 -14.1717473 -40.3733691
121 122 123 124 125 126
-21.4426063 -12.5668821 20.5573937 34.6205410 22.3557719 23.5573937
127 128 129 130 131 132
16.6205410 20.9606372 13.5573937 -2.5668821 19.4331179 21.0298744
133 134 135 136 137 138
25.6266309 -21.2551832 22.4881565 22.0849130 2.8282527 -27.1717473
139 140 141 142 143 144
-0.1717473 13.8282527 -2.5668821 12.2314962 23.5573937 28.5023551
145 146 147
32.1622590 -11.1086000 13.1622590
> postscript(file="/var/www/html/freestat/rcomp/tmp/6s4zk1291491343.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 = 147
Frequency = 1
lag(myerror, k = 1) myerror
0 -40.0393628 NA
1 -19.2551832 -40.0393628
2 -12.5668821 -19.2551832
3 14.4331179 -12.5668821
4 -18.4426063 14.4331179
5 4.5573937 -18.4426063
6 -26.7685038 4.5573937
7 -40.4344975 -26.7685038
8 -19.3652603 -40.4344975
9 -11.0393628 -19.3652603
10 4.6266309 -11.0393628
11 14.9606372 4.6266309
12 -54.6442281 14.9606372
13 -11.1086000 -54.6442281
14 -8.2960231 -11.1086000
15 43.1622590 -8.2960231
16 0.6897782 43.1622590
17 16.0298744 0.6897782
18 23.4331179 16.0298744
19 -31.8377410 23.4331179
20 -36.8377410 -31.8377410
21 -50.0393628 -36.8377410
22 4.2314962 -50.0393628
23 10.5573937 4.2314962
24 -5.3733691 10.5573937
25 7.8282527 -5.3733691
26 16.7590154 7.8282527
27 28.0298744 16.7590154
28 -35.1717473 28.0298744
29 8.5573937 -35.1717473
30 12.3638807 8.5573937
31 29.4331179 12.3638807
32 -23.2409846 29.4331179
33 -14.5668821 -23.2409846
34 3.4331179 -14.5668821
35 7.8282527 3.4331179
36 24.2314962 7.8282527
37 12.0298744 24.2314962
38 -9.6442281 12.0298744
39 -25.4426063 -9.6442281
40 -12.5668821 -25.4426063
41 8.8282527 -12.5668821
42 14.5573937 8.8282527
43 -36.8377410 14.5573937
44 -26.8377410 -36.8377410
45 -22.1717473 -26.8377410
46 15.7448168 -22.1717473
47 15.3007334 15.7448168
48 20.3557719 15.3007334
49 4.0991116 20.3557719
50 -2.1717473 4.0991116
51 -26.7685038 -2.1717473
52 13.5573937 -26.7685038
53 18.8914000 13.5573937
54 0.8282527 18.8914000
55 2.0991116 0.8282527
56 -18.4426063 2.0991116
57 -12.5668821 -18.4426063
58 17.8282527 -12.5668821
59 -22.8377410 17.8282527
60 -10.0393628 -22.8377410
61 -18.3733691 -10.0393628
62 10.3557719 -18.3733691
63 13.5573937 10.3557719
64 45.3496821 13.5573937
65 13.1622590 45.3496821
66 11.7590154 13.1622590
67 34.5573937 11.7590154
68 21.1622590 34.5573937
69 17.8282527 21.1622590
70 48.8914000 17.8282527
71 -36.4426063 48.8914000
72 2.0298744 -36.4426063
73 -19.1778372 2.0298744
74 21.0298744 -19.1778372
75 -10.0393628 21.0298744
76 13.5573937 -10.0393628
77 -19.9701256 13.5573937
78 40.4331179 -19.9701256
79 -42.5668821 40.4331179
80 -33.9701256 -42.5668821
81 4.5573937 -33.9701256
82 -17.3794590 4.5573937
83 -2.1717473 -17.3794590
84 15.0298744 -2.1717473
85 -24.6442281 15.0298744
86 -46.8377410 -24.6442281
87 14.5573937 -46.8377410
88 34.6266309 14.5573937
89 11.4331179 34.6266309
90 -12.1717473 11.4331179
91 -16.4426063 -12.1717473
92 -9.3102218 -16.4426063
93 9.9606372 -9.3102218
94 2.0991116 9.9606372
95 16.4189193 2.0991116
96 2.8282527 16.4189193
97 -32.1717473 2.8282527
98 -17.4568050 -32.1717473
99 18.5023551 -17.4568050
100 -17.6361193 18.5023551
101 22.2314962 -17.6361193
102 -30.4344975 22.2314962
103 16.0849130 -30.4344975
104 -44.9843242 16.0849130
105 -0.3733691 -44.9843242
106 17.8282527 -0.3733691
107 0.3557719 17.8282527
108 14.4331179 0.3557719
109 -9.9701256 14.4331179
110 13.5573937 -9.9701256
111 7.0298744 13.5573937
112 17.4881565 7.0298744
113 12.4331179 17.4881565
114 -25.3733691 12.4331179
115 -16.4426063 -25.3733691
116 -47.9008884 -16.4426063
117 37.4331179 -47.9008884
118 -14.1717473 37.4331179
119 -40.3733691 -14.1717473
120 -21.4426063 -40.3733691
121 -12.5668821 -21.4426063
122 20.5573937 -12.5668821
123 34.6205410 20.5573937
124 22.3557719 34.6205410
125 23.5573937 22.3557719
126 16.6205410 23.5573937
127 20.9606372 16.6205410
128 13.5573937 20.9606372
129 -2.5668821 13.5573937
130 19.4331179 -2.5668821
131 21.0298744 19.4331179
132 25.6266309 21.0298744
133 -21.2551832 25.6266309
134 22.4881565 -21.2551832
135 22.0849130 22.4881565
136 2.8282527 22.0849130
137 -27.1717473 2.8282527
138 -0.1717473 -27.1717473
139 13.8282527 -0.1717473
140 -2.5668821 13.8282527
141 12.2314962 -2.5668821
142 23.5573937 12.2314962
143 28.5023551 23.5573937
144 32.1622590 28.5023551
145 -11.1086000 32.1622590
146 13.1622590 -11.1086000
147 NA 13.1622590
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -19.2551832 -40.0393628
[2,] -12.5668821 -19.2551832
[3,] 14.4331179 -12.5668821
[4,] -18.4426063 14.4331179
[5,] 4.5573937 -18.4426063
[6,] -26.7685038 4.5573937
[7,] -40.4344975 -26.7685038
[8,] -19.3652603 -40.4344975
[9,] -11.0393628 -19.3652603
[10,] 4.6266309 -11.0393628
[11,] 14.9606372 4.6266309
[12,] -54.6442281 14.9606372
[13,] -11.1086000 -54.6442281
[14,] -8.2960231 -11.1086000
[15,] 43.1622590 -8.2960231
[16,] 0.6897782 43.1622590
[17,] 16.0298744 0.6897782
[18,] 23.4331179 16.0298744
[19,] -31.8377410 23.4331179
[20,] -36.8377410 -31.8377410
[21,] -50.0393628 -36.8377410
[22,] 4.2314962 -50.0393628
[23,] 10.5573937 4.2314962
[24,] -5.3733691 10.5573937
[25,] 7.8282527 -5.3733691
[26,] 16.7590154 7.8282527
[27,] 28.0298744 16.7590154
[28,] -35.1717473 28.0298744
[29,] 8.5573937 -35.1717473
[30,] 12.3638807 8.5573937
[31,] 29.4331179 12.3638807
[32,] -23.2409846 29.4331179
[33,] -14.5668821 -23.2409846
[34,] 3.4331179 -14.5668821
[35,] 7.8282527 3.4331179
[36,] 24.2314962 7.8282527
[37,] 12.0298744 24.2314962
[38,] -9.6442281 12.0298744
[39,] -25.4426063 -9.6442281
[40,] -12.5668821 -25.4426063
[41,] 8.8282527 -12.5668821
[42,] 14.5573937 8.8282527
[43,] -36.8377410 14.5573937
[44,] -26.8377410 -36.8377410
[45,] -22.1717473 -26.8377410
[46,] 15.7448168 -22.1717473
[47,] 15.3007334 15.7448168
[48,] 20.3557719 15.3007334
[49,] 4.0991116 20.3557719
[50,] -2.1717473 4.0991116
[51,] -26.7685038 -2.1717473
[52,] 13.5573937 -26.7685038
[53,] 18.8914000 13.5573937
[54,] 0.8282527 18.8914000
[55,] 2.0991116 0.8282527
[56,] -18.4426063 2.0991116
[57,] -12.5668821 -18.4426063
[58,] 17.8282527 -12.5668821
[59,] -22.8377410 17.8282527
[60,] -10.0393628 -22.8377410
[61,] -18.3733691 -10.0393628
[62,] 10.3557719 -18.3733691
[63,] 13.5573937 10.3557719
[64,] 45.3496821 13.5573937
[65,] 13.1622590 45.3496821
[66,] 11.7590154 13.1622590
[67,] 34.5573937 11.7590154
[68,] 21.1622590 34.5573937
[69,] 17.8282527 21.1622590
[70,] 48.8914000 17.8282527
[71,] -36.4426063 48.8914000
[72,] 2.0298744 -36.4426063
[73,] -19.1778372 2.0298744
[74,] 21.0298744 -19.1778372
[75,] -10.0393628 21.0298744
[76,] 13.5573937 -10.0393628
[77,] -19.9701256 13.5573937
[78,] 40.4331179 -19.9701256
[79,] -42.5668821 40.4331179
[80,] -33.9701256 -42.5668821
[81,] 4.5573937 -33.9701256
[82,] -17.3794590 4.5573937
[83,] -2.1717473 -17.3794590
[84,] 15.0298744 -2.1717473
[85,] -24.6442281 15.0298744
[86,] -46.8377410 -24.6442281
[87,] 14.5573937 -46.8377410
[88,] 34.6266309 14.5573937
[89,] 11.4331179 34.6266309
[90,] -12.1717473 11.4331179
[91,] -16.4426063 -12.1717473
[92,] -9.3102218 -16.4426063
[93,] 9.9606372 -9.3102218
[94,] 2.0991116 9.9606372
[95,] 16.4189193 2.0991116
[96,] 2.8282527 16.4189193
[97,] -32.1717473 2.8282527
[98,] -17.4568050 -32.1717473
[99,] 18.5023551 -17.4568050
[100,] -17.6361193 18.5023551
[101,] 22.2314962 -17.6361193
[102,] -30.4344975 22.2314962
[103,] 16.0849130 -30.4344975
[104,] -44.9843242 16.0849130
[105,] -0.3733691 -44.9843242
[106,] 17.8282527 -0.3733691
[107,] 0.3557719 17.8282527
[108,] 14.4331179 0.3557719
[109,] -9.9701256 14.4331179
[110,] 13.5573937 -9.9701256
[111,] 7.0298744 13.5573937
[112,] 17.4881565 7.0298744
[113,] 12.4331179 17.4881565
[114,] -25.3733691 12.4331179
[115,] -16.4426063 -25.3733691
[116,] -47.9008884 -16.4426063
[117,] 37.4331179 -47.9008884
[118,] -14.1717473 37.4331179
[119,] -40.3733691 -14.1717473
[120,] -21.4426063 -40.3733691
[121,] -12.5668821 -21.4426063
[122,] 20.5573937 -12.5668821
[123,] 34.6205410 20.5573937
[124,] 22.3557719 34.6205410
[125,] 23.5573937 22.3557719
[126,] 16.6205410 23.5573937
[127,] 20.9606372 16.6205410
[128,] 13.5573937 20.9606372
[129,] -2.5668821 13.5573937
[130,] 19.4331179 -2.5668821
[131,] 21.0298744 19.4331179
[132,] 25.6266309 21.0298744
[133,] -21.2551832 25.6266309
[134,] 22.4881565 -21.2551832
[135,] 22.0849130 22.4881565
[136,] 2.8282527 22.0849130
[137,] -27.1717473 2.8282527
[138,] -0.1717473 -27.1717473
[139,] 13.8282527 -0.1717473
[140,] -2.5668821 13.8282527
[141,] 12.2314962 -2.5668821
[142,] 23.5573937 12.2314962
[143,] 28.5023551 23.5573937
[144,] 32.1622590 28.5023551
[145,] -11.1086000 32.1622590
[146,] 13.1622590 -11.1086000
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -19.2551832 -40.0393628
2 -12.5668821 -19.2551832
3 14.4331179 -12.5668821
4 -18.4426063 14.4331179
5 4.5573937 -18.4426063
6 -26.7685038 4.5573937
7 -40.4344975 -26.7685038
8 -19.3652603 -40.4344975
9 -11.0393628 -19.3652603
10 4.6266309 -11.0393628
11 14.9606372 4.6266309
12 -54.6442281 14.9606372
13 -11.1086000 -54.6442281
14 -8.2960231 -11.1086000
15 43.1622590 -8.2960231
16 0.6897782 43.1622590
17 16.0298744 0.6897782
18 23.4331179 16.0298744
19 -31.8377410 23.4331179
20 -36.8377410 -31.8377410
21 -50.0393628 -36.8377410
22 4.2314962 -50.0393628
23 10.5573937 4.2314962
24 -5.3733691 10.5573937
25 7.8282527 -5.3733691
26 16.7590154 7.8282527
27 28.0298744 16.7590154
28 -35.1717473 28.0298744
29 8.5573937 -35.1717473
30 12.3638807 8.5573937
31 29.4331179 12.3638807
32 -23.2409846 29.4331179
33 -14.5668821 -23.2409846
34 3.4331179 -14.5668821
35 7.8282527 3.4331179
36 24.2314962 7.8282527
37 12.0298744 24.2314962
38 -9.6442281 12.0298744
39 -25.4426063 -9.6442281
40 -12.5668821 -25.4426063
41 8.8282527 -12.5668821
42 14.5573937 8.8282527
43 -36.8377410 14.5573937
44 -26.8377410 -36.8377410
45 -22.1717473 -26.8377410
46 15.7448168 -22.1717473
47 15.3007334 15.7448168
48 20.3557719 15.3007334
49 4.0991116 20.3557719
50 -2.1717473 4.0991116
51 -26.7685038 -2.1717473
52 13.5573937 -26.7685038
53 18.8914000 13.5573937
54 0.8282527 18.8914000
55 2.0991116 0.8282527
56 -18.4426063 2.0991116
57 -12.5668821 -18.4426063
58 17.8282527 -12.5668821
59 -22.8377410 17.8282527
60 -10.0393628 -22.8377410
61 -18.3733691 -10.0393628
62 10.3557719 -18.3733691
63 13.5573937 10.3557719
64 45.3496821 13.5573937
65 13.1622590 45.3496821
66 11.7590154 13.1622590
67 34.5573937 11.7590154
68 21.1622590 34.5573937
69 17.8282527 21.1622590
70 48.8914000 17.8282527
71 -36.4426063 48.8914000
72 2.0298744 -36.4426063
73 -19.1778372 2.0298744
74 21.0298744 -19.1778372
75 -10.0393628 21.0298744
76 13.5573937 -10.0393628
77 -19.9701256 13.5573937
78 40.4331179 -19.9701256
79 -42.5668821 40.4331179
80 -33.9701256 -42.5668821
81 4.5573937 -33.9701256
82 -17.3794590 4.5573937
83 -2.1717473 -17.3794590
84 15.0298744 -2.1717473
85 -24.6442281 15.0298744
86 -46.8377410 -24.6442281
87 14.5573937 -46.8377410
88 34.6266309 14.5573937
89 11.4331179 34.6266309
90 -12.1717473 11.4331179
91 -16.4426063 -12.1717473
92 -9.3102218 -16.4426063
93 9.9606372 -9.3102218
94 2.0991116 9.9606372
95 16.4189193 2.0991116
96 2.8282527 16.4189193
97 -32.1717473 2.8282527
98 -17.4568050 -32.1717473
99 18.5023551 -17.4568050
100 -17.6361193 18.5023551
101 22.2314962 -17.6361193
102 -30.4344975 22.2314962
103 16.0849130 -30.4344975
104 -44.9843242 16.0849130
105 -0.3733691 -44.9843242
106 17.8282527 -0.3733691
107 0.3557719 17.8282527
108 14.4331179 0.3557719
109 -9.9701256 14.4331179
110 13.5573937 -9.9701256
111 7.0298744 13.5573937
112 17.4881565 7.0298744
113 12.4331179 17.4881565
114 -25.3733691 12.4331179
115 -16.4426063 -25.3733691
116 -47.9008884 -16.4426063
117 37.4331179 -47.9008884
118 -14.1717473 37.4331179
119 -40.3733691 -14.1717473
120 -21.4426063 -40.3733691
121 -12.5668821 -21.4426063
122 20.5573937 -12.5668821
123 34.6205410 20.5573937
124 22.3557719 34.6205410
125 23.5573937 22.3557719
126 16.6205410 23.5573937
127 20.9606372 16.6205410
128 13.5573937 20.9606372
129 -2.5668821 13.5573937
130 19.4331179 -2.5668821
131 21.0298744 19.4331179
132 25.6266309 21.0298744
133 -21.2551832 25.6266309
134 22.4881565 -21.2551832
135 22.0849130 22.4881565
136 2.8282527 22.0849130
137 -27.1717473 2.8282527
138 -0.1717473 -27.1717473
139 13.8282527 -0.1717473
140 -2.5668821 13.8282527
141 12.2314962 -2.5668821
142 23.5573937 12.2314962
143 28.5023551 23.5573937
144 32.1622590 28.5023551
145 -11.1086000 32.1622590
146 13.1622590 -11.1086000
> 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/freestat/rcomp/tmp/7vo1i1291491344.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/freestat/rcomp/tmp/8vo1i1291491344.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/freestat/rcomp/tmp/9vo1i1291491344.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/freestat/rcomp/tmp/10oxj31291491344.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/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/www/html/freestat/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/freestat/rcomp/tmp/119gzr1291491344.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/freestat/rcomp/tmp/12dgyx1291491344.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/freestat/rcomp/tmp/13r8dn1291491344.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/freestat/rcomp/tmp/14uqut1291491344.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/freestat/rcomp/tmp/153uh51291491344.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/freestat/rcomp/tmp/16c0qq1291491344.tab")
+ }
>
> try(system("convert tmp/1pm1w1291491343.ps tmp/1pm1w1291491343.png",intern=TRUE))
character(0)
> try(system("convert tmp/2pm1w1291491343.ps tmp/2pm1w1291491343.png",intern=TRUE))
character(0)
> try(system("convert tmp/30d0z1291491343.ps tmp/30d0z1291491343.png",intern=TRUE))
character(0)
> try(system("convert tmp/40d0z1291491343.ps tmp/40d0z1291491343.png",intern=TRUE))
character(0)
> try(system("convert tmp/50d0z1291491343.ps tmp/50d0z1291491343.png",intern=TRUE))
character(0)
> try(system("convert tmp/6s4zk1291491343.ps tmp/6s4zk1291491343.png",intern=TRUE))
character(0)
> try(system("convert tmp/7vo1i1291491344.ps tmp/7vo1i1291491344.png",intern=TRUE))
character(0)
> try(system("convert tmp/8vo1i1291491344.ps tmp/8vo1i1291491344.png",intern=TRUE))
character(0)
> try(system("convert tmp/9vo1i1291491344.ps tmp/9vo1i1291491344.png",intern=TRUE))
character(0)
> try(system("convert tmp/10oxj31291491344.ps tmp/10oxj31291491344.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
5.174 2.670 5.558