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 = '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 t
1 10 5 4 1
2 20 2 2 2
3 40 6 5 3
4 67 6 5 4
5 38 5 2 5
6 61 5 2 6
7 29 6 4 7
8 0 5 7 8
9 30 6 6 9
10 39 5 4 10
11 70 6 1 11
12 65 5 4 12
13 5 5 1 13
14 30 4 5 14
15 50 7 5 15
16 90 5 5 16
17 45 4 4 17
18 75 6 3 18
19 76 6 5 19
20 15 5 5 20
21 10 5 5 21
22 0 5 4 22
23 60 6 4 23
24 67 5 2 24
25 60 6 1 25
26 70 6 2 26
27 70 5 3 27
28 87 6 3 28
29 27 6 2 29
30 65 5 2 30
31 56 5 6 31
32 82 6 5 32
33 30 5 3 33
34 38 6 5 34
35 56 6 5 35
36 70 6 2 36
37 80 6 4 37
38 71 6 3 38
39 50 5 1 39
40 31 5 2 40
41 40 6 5 41
42 71 6 2 42
43 71 5 2 43
44 10 5 5 44
45 20 5 5 45
46 40 6 2 46
47 55 2 2 47
48 80 7 3 48
49 80 5 1 49
50 72 7 2 50
51 60 6 2 51
52 29 6 4 52
53 70 5 2 53
54 60 4 5 54
55 63 6 2 55
56 70 7 2 56
57 38 5 2 57
58 40 6 5 58
59 80 6 2 59
60 24 5 5 60
61 40 5 4 61
62 47 6 1 62
63 70 5 1 63
64 70 5 2 64
65 75 2 5 65
66 60 5 5 66
67 65 5 3 67
68 91 5 2 68
69 68 5 5 69
70 80 6 2 70
71 90 4 5 71
72 20 5 2 72
73 61 6 3 73
74 13 3 6 74
75 80 6 3 75
76 40 5 4 76
77 70 5 2 77
78 39 6 3 78
79 93 6 5 79
80 10 6 5 80
81 25 6 3 81
82 61 5 2 82
83 18 3 5 83
84 60 6 2 84
85 74 6 3 85
86 35 5 1 86
87 0 5 5 87
88 71 5 2 88
89 100 6 1 89
90 64 6 5 90
91 50 6 2 91
92 40 5 2 92
93 35 4 4 93
94 60 5 4 94
95 70 7 2 95
96 55 3 4 96
97 65 6 2 97
98 30 6 2 98
99 25 2 1 99
100 80 7 4 100
101 26 5 6 101
102 78 6 4 102
103 10 5 7 103
104 70 4 1 104
105 0 3 2 105
106 65 6 1 106
107 80 6 2 107
108 60 5 1 108
109 67 6 5 109
110 49 6 3 110
111 70 5 2 111
112 66 6 3 112
113 65 4 3 113
114 65 6 5 114
115 40 6 1 115
116 40 5 2 116
117 20 7 2 117
118 90 6 5 118
119 48 6 2 119
120 25 6 1 120
121 35 5 2 121
122 40 6 5 122
123 77 5 2 123
124 70 3 5 124
125 82 5 1 125
126 80 5 2 126
127 52 3 5 127
128 71 5 4 128
129 70 5 2 129
130 50 6 5 130
131 72 6 5 131
132 80 6 3 132
133 91 6 1 133
134 18 2 2 134
135 70 4 3 135
136 76 4 1 136
137 65 6 2 137
138 35 6 2 138
139 62 6 2 139
140 76 6 2 140
141 50 6 5 141
142 68 6 4 142
143 80 5 2 143
144 90 7 4 144
145 79 5 5 145
146 30 4 5 146
147 60 5 5 147
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Hands `Anxiety\r` t
24.4194 5.9085 -2.8422 0.1038
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-52.239 -18.430 4.759 15.914 48.788
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 24.41939 11.18054 2.184 0.030585 *
Hands 5.90854 1.75744 3.362 0.000993 ***
`Anxiety\r` -2.84219 1.19760 -2.373 0.018963 *
t 0.10380 0.04375 2.373 0.018991 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 22.31 on 143 degrees of freedom
Multiple R-squared: 0.1468, Adjusted R-squared: 0.1289
F-statistic: 8.199 on 3 and 143 DF, p-value: 4.499e-05
> 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.6705639 0.65887211 0.32943606
[2,] 0.6105759 0.77884818 0.38942409
[3,] 0.4713547 0.94270941 0.52864530
[4,] 0.3491346 0.69826911 0.65086544
[5,] 0.2419291 0.48385827 0.75807087
[6,] 0.2786493 0.55729867 0.72135066
[7,] 0.6996932 0.60061362 0.30030681
[8,] 0.6298208 0.74035850 0.37017925
[9,] 0.5402869 0.91942618 0.45971309
[10,] 0.8009989 0.39800221 0.19900111
[11,] 0.7384781 0.52304374 0.26152187
[12,] 0.6891424 0.62171522 0.31085761
[13,] 0.6490545 0.70189093 0.35094547
[14,] 0.7582941 0.48341189 0.24170594
[15,] 0.8296311 0.34073784 0.17036892
[16,] 0.9153650 0.16926997 0.08463499
[17,] 0.8897971 0.22040582 0.11020291
[18,] 0.8698820 0.26023594 0.13011797
[19,] 0.8347527 0.33049464 0.16524732
[20,] 0.7959175 0.40816504 0.20408252
[21,] 0.7786888 0.44262243 0.22131121
[22,] 0.7816160 0.43676793 0.21838396
[23,] 0.8559242 0.28815163 0.14407581
[24,] 0.8243520 0.35129600 0.17564800
[25,] 0.7932129 0.41357426 0.20678713
[26,] 0.7962374 0.40752522 0.20376261
[27,] 0.8079138 0.38417234 0.19208617
[28,] 0.7961612 0.40767761 0.20383881
[29,] 0.7540457 0.49190857 0.24595428
[30,] 0.7102569 0.57948617 0.28974309
[31,] 0.6987486 0.60250289 0.30125145
[32,] 0.6560371 0.68792575 0.34396288
[33,] 0.6196295 0.76074093 0.38037047
[34,] 0.6383016 0.72339682 0.36169841
[35,] 0.6166281 0.76674380 0.38337190
[36,] 0.5694136 0.86117273 0.43058636
[37,] 0.5381915 0.92361693 0.46180846
[38,] 0.6226075 0.75478505 0.37739252
[39,] 0.6297286 0.74054275 0.37027138
[40,] 0.6349927 0.73001460 0.36500730
[41,] 0.6555717 0.68885666 0.34442833
[42,] 0.6212991 0.75740174 0.37870087
[43,] 0.6086535 0.78269299 0.39134650
[44,] 0.5630546 0.87389089 0.43694544
[45,] 0.5167872 0.96642566 0.48321283
[46,] 0.5446354 0.91072917 0.45536459
[47,] 0.5122128 0.97557435 0.48778718
[48,] 0.5018110 0.99637798 0.49818899
[49,] 0.4543241 0.90864813 0.54567594
[50,] 0.4086815 0.81736298 0.59131851
[51,] 0.3975098 0.79501951 0.60249025
[52,] 0.3679231 0.73584626 0.63207687
[53,] 0.3470157 0.69403135 0.65298433
[54,] 0.3483406 0.69668124 0.65165938
[55,] 0.3122678 0.62453554 0.68773223
[56,] 0.3044361 0.60887216 0.69556392
[57,] 0.2718271 0.54365413 0.72817293
[58,] 0.2467001 0.49340017 0.75329992
[59,] 0.3771482 0.75429638 0.62285181
[60,] 0.3419487 0.68389741 0.65805129
[61,] 0.3079830 0.61596600 0.69201700
[62,] 0.3616862 0.72337238 0.63831381
[63,] 0.3487359 0.69747186 0.65126407
[64,] 0.3340906 0.66818114 0.66590943
[65,] 0.4979478 0.99589567 0.50205217
[66,] 0.5992852 0.80142962 0.40071481
[67,] 0.5591827 0.88163462 0.44081731
[68,] 0.5632224 0.87355529 0.43677764
[69,] 0.5636638 0.87267246 0.43633623
[70,] 0.5334792 0.93304168 0.46652084
[71,] 0.5158061 0.96838782 0.48419391
[72,] 0.5117957 0.97640856 0.48820428
[73,] 0.6318869 0.73622614 0.36811307
[74,] 0.7452113 0.50957749 0.25478874
[75,] 0.7902516 0.41949672 0.20974836
[76,] 0.7616249 0.47675015 0.23837507
[77,] 0.7460074 0.50798519 0.25399259
[78,] 0.7084878 0.58302435 0.29151217
[79,] 0.6933136 0.61337276 0.30668638
[80,] 0.6946511 0.61069778 0.30534889
[81,] 0.8222920 0.35541601 0.17770800
[82,] 0.8092228 0.38155444 0.19077722
[83,] 0.8756561 0.24868776 0.12434388
[84,] 0.8572398 0.28552036 0.14276018
[85,] 0.8339975 0.33200507 0.16600254
[86,] 0.8141510 0.37169808 0.18584904
[87,] 0.7837168 0.43256639 0.21628319
[88,] 0.7556453 0.48870933 0.24435466
[89,] 0.7206412 0.55871764 0.27935882
[90,] 0.7083674 0.58326524 0.29163262
[91,] 0.6725820 0.65483602 0.32741801
[92,] 0.7006916 0.59861673 0.29930836
[93,] 0.6719312 0.65613762 0.32806881
[94,] 0.6659512 0.66809751 0.33404875
[95,] 0.6505935 0.69881308 0.34940654
[96,] 0.6599823 0.68003535 0.34001767
[97,] 0.7349923 0.53001530 0.26500765
[98,] 0.7327135 0.53457301 0.26728650
[99,] 0.8625403 0.27491950 0.13745975
[100,] 0.8327419 0.33451620 0.16725810
[101,] 0.8324686 0.33506282 0.16753141
[102,] 0.7983239 0.40335222 0.20167611
[103,] 0.7663571 0.46728586 0.23364293
[104,] 0.7276113 0.54477741 0.27238871
[105,] 0.7051878 0.58962444 0.29481222
[106,] 0.6643341 0.67133187 0.33566594
[107,] 0.6404557 0.71908867 0.35954433
[108,] 0.5986209 0.80275827 0.40137914
[109,] 0.5782872 0.84342554 0.42171277
[110,] 0.5417681 0.91646379 0.45823189
[111,] 0.7279875 0.54402491 0.27201245
[112,] 0.7865563 0.42688736 0.21344368
[113,] 0.7577387 0.48452254 0.24226127
[114,] 0.8979614 0.20407718 0.10203859
[115,] 0.9402791 0.11944179 0.05972090
[116,] 0.9664413 0.06711748 0.03355874
[117,] 0.9519423 0.09611531 0.04805766
[118,] 0.9546274 0.09074520 0.04537260
[119,] 0.9383994 0.12320112 0.06160056
[120,] 0.9211541 0.15769183 0.07884591
[121,] 0.8980415 0.20391709 0.10195854
[122,] 0.8748539 0.25029213 0.12514606
[123,] 0.8317979 0.33640417 0.16820209
[124,] 0.8009521 0.39809584 0.19904792
[125,] 0.7388766 0.52224688 0.26112344
[126,] 0.6891183 0.62176337 0.31088169
[127,] 0.6831020 0.63379597 0.31689799
[128,] 0.6982584 0.60348311 0.30174156
[129,] 0.7120661 0.57586771 0.28793386
[130,] 0.8627914 0.27441716 0.13720858
[131,] 0.8358897 0.32822068 0.16411034
[132,] 0.8834389 0.23312223 0.11656111
[133,] 0.8121004 0.37579922 0.18789961
[134,] 0.6695699 0.66086013 0.33043007
> postscript(file="/var/www/html/freestat/rcomp/tmp/1y3ih1290532276.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/freestat/rcomp/tmp/29czk1290532276.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/freestat/rcomp/tmp/39czk1290532276.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/freestat/rcomp/tmp/49czk1290532276.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/freestat/rcomp/tmp/59czk1290532276.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 = 147
Frequency = 1
1 2 3 4 5 6
-32.69713872 -10.75968966 -5.97108213 20.92512266 -10.79669003 12.09951477
7 8 9 10 11 12
-20.22844819 -34.89714941 -13.75166811 -4.63129555 11.82981525 21.16111404
13 14 15 16 17 18
-47.46923690 -5.29575287 -3.12516283 48.58811847 6.55067628 21.78761932
19 20 21 22 23 24
28.36819461 -26.82706234 -31.93085754 -44.87683799 9.11082855 16.23120111
25 26 27 28 29 30
0.37668241 13.11507245 21.76200074 32.74966729 -30.19631316 13.60842989
31 32 33 34 35 36
15.87337567 33.01885697 -18.86077048 -11.18873344 6.70747136 12.07712041
37 38 39 40 41 42
27.65769570 15.71171525 -5.16791219 -21.42952215 -9.91529986 12.45434919
43 44 45 46 47 48
18.25909224 -34.31814722 -24.42194242 -18.96083162 19.56952619 17.76522497
49 50 51 52 53 54
23.79413578 6.71544932 0.52019236 -24.89923235 16.22114021 20.55243900
55 56 57 58 59 60
3.10501155 4.09267809 -16.19404060 -11.67981832 19.68983074 -21.97887047
61 62 63 64 65 66
-8.92485092 -16.46374012 12.34100293 15.07939297 46.22776827 13.39835831
67 68 69 70 71 72
12.61019261 35.66421216 21.08697269 18.54808350 48.78792054 -35.75096865
73 74 75 76 77 78
2.07888314 -19.77274157 20.87129273 -10.48177898 13.73005533 -20.44009288
79 80 81 82 83 84
39.14048241 -43.96331279 -34.75147849 4.21107931 -18.54908365 -2.90504935
85 86 87 88 89 90
13.83334070 -25.04628675 -48.78134097 13.58830809 33.73378939 8.99873517
91 92 93 94 95 96
-13.63161577 -17.82687272 -11.33775918 7.64990736 0.04466516 14.25939346
97 98 99 100 101 102
0.74561301 -34.35818220 -18.67000963 15.21005964 -21.39228857 18.91100748
103 104 105 106 107 108
-34.75769373 13.99393784 -47.35913386 -3.03072907 14.70766097 -2.32978122
109 110 111 112 113 114
10.02662631 -13.76153939 10.20101841 3.03087020 13.74415151 7.50765029
115 116 117 118 119 120
-28.96488590 -20.31795760 -52.23882931 32.09246948 -18.53788147 -44.48386192
121 122 123 124 125 126
-25.83693362 -18.32271134 15.95547597 29.19531301 17.90570032 18.64409036
127 128 129 130 131 132
10.88392740 15.12087045 8.33270475 -9.15307296 12.74313183 14.95496614
133 134 135 136 137 138
20.16680044 -26.46065651 16.46065703 16.67249133 -3.40619513 -33.50999033
139 140 141 142 143 144
-6.61378553 7.28241926 -10.29482020 4.75919935 16.87957190 20.64307069
145 146 147
24.19853724 -18.99671971 4.99094683
> postscript(file="/var/www/html/freestat/rcomp/tmp/61lg51290532276.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 = 147
Frequency = 1
lag(myerror, k = 1) myerror
0 -32.69713872 NA
1 -10.75968966 -32.69713872
2 -5.97108213 -10.75968966
3 20.92512266 -5.97108213
4 -10.79669003 20.92512266
5 12.09951477 -10.79669003
6 -20.22844819 12.09951477
7 -34.89714941 -20.22844819
8 -13.75166811 -34.89714941
9 -4.63129555 -13.75166811
10 11.82981525 -4.63129555
11 21.16111404 11.82981525
12 -47.46923690 21.16111404
13 -5.29575287 -47.46923690
14 -3.12516283 -5.29575287
15 48.58811847 -3.12516283
16 6.55067628 48.58811847
17 21.78761932 6.55067628
18 28.36819461 21.78761932
19 -26.82706234 28.36819461
20 -31.93085754 -26.82706234
21 -44.87683799 -31.93085754
22 9.11082855 -44.87683799
23 16.23120111 9.11082855
24 0.37668241 16.23120111
25 13.11507245 0.37668241
26 21.76200074 13.11507245
27 32.74966729 21.76200074
28 -30.19631316 32.74966729
29 13.60842989 -30.19631316
30 15.87337567 13.60842989
31 33.01885697 15.87337567
32 -18.86077048 33.01885697
33 -11.18873344 -18.86077048
34 6.70747136 -11.18873344
35 12.07712041 6.70747136
36 27.65769570 12.07712041
37 15.71171525 27.65769570
38 -5.16791219 15.71171525
39 -21.42952215 -5.16791219
40 -9.91529986 -21.42952215
41 12.45434919 -9.91529986
42 18.25909224 12.45434919
43 -34.31814722 18.25909224
44 -24.42194242 -34.31814722
45 -18.96083162 -24.42194242
46 19.56952619 -18.96083162
47 17.76522497 19.56952619
48 23.79413578 17.76522497
49 6.71544932 23.79413578
50 0.52019236 6.71544932
51 -24.89923235 0.52019236
52 16.22114021 -24.89923235
53 20.55243900 16.22114021
54 3.10501155 20.55243900
55 4.09267809 3.10501155
56 -16.19404060 4.09267809
57 -11.67981832 -16.19404060
58 19.68983074 -11.67981832
59 -21.97887047 19.68983074
60 -8.92485092 -21.97887047
61 -16.46374012 -8.92485092
62 12.34100293 -16.46374012
63 15.07939297 12.34100293
64 46.22776827 15.07939297
65 13.39835831 46.22776827
66 12.61019261 13.39835831
67 35.66421216 12.61019261
68 21.08697269 35.66421216
69 18.54808350 21.08697269
70 48.78792054 18.54808350
71 -35.75096865 48.78792054
72 2.07888314 -35.75096865
73 -19.77274157 2.07888314
74 20.87129273 -19.77274157
75 -10.48177898 20.87129273
76 13.73005533 -10.48177898
77 -20.44009288 13.73005533
78 39.14048241 -20.44009288
79 -43.96331279 39.14048241
80 -34.75147849 -43.96331279
81 4.21107931 -34.75147849
82 -18.54908365 4.21107931
83 -2.90504935 -18.54908365
84 13.83334070 -2.90504935
85 -25.04628675 13.83334070
86 -48.78134097 -25.04628675
87 13.58830809 -48.78134097
88 33.73378939 13.58830809
89 8.99873517 33.73378939
90 -13.63161577 8.99873517
91 -17.82687272 -13.63161577
92 -11.33775918 -17.82687272
93 7.64990736 -11.33775918
94 0.04466516 7.64990736
95 14.25939346 0.04466516
96 0.74561301 14.25939346
97 -34.35818220 0.74561301
98 -18.67000963 -34.35818220
99 15.21005964 -18.67000963
100 -21.39228857 15.21005964
101 18.91100748 -21.39228857
102 -34.75769373 18.91100748
103 13.99393784 -34.75769373
104 -47.35913386 13.99393784
105 -3.03072907 -47.35913386
106 14.70766097 -3.03072907
107 -2.32978122 14.70766097
108 10.02662631 -2.32978122
109 -13.76153939 10.02662631
110 10.20101841 -13.76153939
111 3.03087020 10.20101841
112 13.74415151 3.03087020
113 7.50765029 13.74415151
114 -28.96488590 7.50765029
115 -20.31795760 -28.96488590
116 -52.23882931 -20.31795760
117 32.09246948 -52.23882931
118 -18.53788147 32.09246948
119 -44.48386192 -18.53788147
120 -25.83693362 -44.48386192
121 -18.32271134 -25.83693362
122 15.95547597 -18.32271134
123 29.19531301 15.95547597
124 17.90570032 29.19531301
125 18.64409036 17.90570032
126 10.88392740 18.64409036
127 15.12087045 10.88392740
128 8.33270475 15.12087045
129 -9.15307296 8.33270475
130 12.74313183 -9.15307296
131 14.95496614 12.74313183
132 20.16680044 14.95496614
133 -26.46065651 20.16680044
134 16.46065703 -26.46065651
135 16.67249133 16.46065703
136 -3.40619513 16.67249133
137 -33.50999033 -3.40619513
138 -6.61378553 -33.50999033
139 7.28241926 -6.61378553
140 -10.29482020 7.28241926
141 4.75919935 -10.29482020
142 16.87957190 4.75919935
143 20.64307069 16.87957190
144 24.19853724 20.64307069
145 -18.99671971 24.19853724
146 4.99094683 -18.99671971
147 NA 4.99094683
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -10.75968966 -32.69713872
[2,] -5.97108213 -10.75968966
[3,] 20.92512266 -5.97108213
[4,] -10.79669003 20.92512266
[5,] 12.09951477 -10.79669003
[6,] -20.22844819 12.09951477
[7,] -34.89714941 -20.22844819
[8,] -13.75166811 -34.89714941
[9,] -4.63129555 -13.75166811
[10,] 11.82981525 -4.63129555
[11,] 21.16111404 11.82981525
[12,] -47.46923690 21.16111404
[13,] -5.29575287 -47.46923690
[14,] -3.12516283 -5.29575287
[15,] 48.58811847 -3.12516283
[16,] 6.55067628 48.58811847
[17,] 21.78761932 6.55067628
[18,] 28.36819461 21.78761932
[19,] -26.82706234 28.36819461
[20,] -31.93085754 -26.82706234
[21,] -44.87683799 -31.93085754
[22,] 9.11082855 -44.87683799
[23,] 16.23120111 9.11082855
[24,] 0.37668241 16.23120111
[25,] 13.11507245 0.37668241
[26,] 21.76200074 13.11507245
[27,] 32.74966729 21.76200074
[28,] -30.19631316 32.74966729
[29,] 13.60842989 -30.19631316
[30,] 15.87337567 13.60842989
[31,] 33.01885697 15.87337567
[32,] -18.86077048 33.01885697
[33,] -11.18873344 -18.86077048
[34,] 6.70747136 -11.18873344
[35,] 12.07712041 6.70747136
[36,] 27.65769570 12.07712041
[37,] 15.71171525 27.65769570
[38,] -5.16791219 15.71171525
[39,] -21.42952215 -5.16791219
[40,] -9.91529986 -21.42952215
[41,] 12.45434919 -9.91529986
[42,] 18.25909224 12.45434919
[43,] -34.31814722 18.25909224
[44,] -24.42194242 -34.31814722
[45,] -18.96083162 -24.42194242
[46,] 19.56952619 -18.96083162
[47,] 17.76522497 19.56952619
[48,] 23.79413578 17.76522497
[49,] 6.71544932 23.79413578
[50,] 0.52019236 6.71544932
[51,] -24.89923235 0.52019236
[52,] 16.22114021 -24.89923235
[53,] 20.55243900 16.22114021
[54,] 3.10501155 20.55243900
[55,] 4.09267809 3.10501155
[56,] -16.19404060 4.09267809
[57,] -11.67981832 -16.19404060
[58,] 19.68983074 -11.67981832
[59,] -21.97887047 19.68983074
[60,] -8.92485092 -21.97887047
[61,] -16.46374012 -8.92485092
[62,] 12.34100293 -16.46374012
[63,] 15.07939297 12.34100293
[64,] 46.22776827 15.07939297
[65,] 13.39835831 46.22776827
[66,] 12.61019261 13.39835831
[67,] 35.66421216 12.61019261
[68,] 21.08697269 35.66421216
[69,] 18.54808350 21.08697269
[70,] 48.78792054 18.54808350
[71,] -35.75096865 48.78792054
[72,] 2.07888314 -35.75096865
[73,] -19.77274157 2.07888314
[74,] 20.87129273 -19.77274157
[75,] -10.48177898 20.87129273
[76,] 13.73005533 -10.48177898
[77,] -20.44009288 13.73005533
[78,] 39.14048241 -20.44009288
[79,] -43.96331279 39.14048241
[80,] -34.75147849 -43.96331279
[81,] 4.21107931 -34.75147849
[82,] -18.54908365 4.21107931
[83,] -2.90504935 -18.54908365
[84,] 13.83334070 -2.90504935
[85,] -25.04628675 13.83334070
[86,] -48.78134097 -25.04628675
[87,] 13.58830809 -48.78134097
[88,] 33.73378939 13.58830809
[89,] 8.99873517 33.73378939
[90,] -13.63161577 8.99873517
[91,] -17.82687272 -13.63161577
[92,] -11.33775918 -17.82687272
[93,] 7.64990736 -11.33775918
[94,] 0.04466516 7.64990736
[95,] 14.25939346 0.04466516
[96,] 0.74561301 14.25939346
[97,] -34.35818220 0.74561301
[98,] -18.67000963 -34.35818220
[99,] 15.21005964 -18.67000963
[100,] -21.39228857 15.21005964
[101,] 18.91100748 -21.39228857
[102,] -34.75769373 18.91100748
[103,] 13.99393784 -34.75769373
[104,] -47.35913386 13.99393784
[105,] -3.03072907 -47.35913386
[106,] 14.70766097 -3.03072907
[107,] -2.32978122 14.70766097
[108,] 10.02662631 -2.32978122
[109,] -13.76153939 10.02662631
[110,] 10.20101841 -13.76153939
[111,] 3.03087020 10.20101841
[112,] 13.74415151 3.03087020
[113,] 7.50765029 13.74415151
[114,] -28.96488590 7.50765029
[115,] -20.31795760 -28.96488590
[116,] -52.23882931 -20.31795760
[117,] 32.09246948 -52.23882931
[118,] -18.53788147 32.09246948
[119,] -44.48386192 -18.53788147
[120,] -25.83693362 -44.48386192
[121,] -18.32271134 -25.83693362
[122,] 15.95547597 -18.32271134
[123,] 29.19531301 15.95547597
[124,] 17.90570032 29.19531301
[125,] 18.64409036 17.90570032
[126,] 10.88392740 18.64409036
[127,] 15.12087045 10.88392740
[128,] 8.33270475 15.12087045
[129,] -9.15307296 8.33270475
[130,] 12.74313183 -9.15307296
[131,] 14.95496614 12.74313183
[132,] 20.16680044 14.95496614
[133,] -26.46065651 20.16680044
[134,] 16.46065703 -26.46065651
[135,] 16.67249133 16.46065703
[136,] -3.40619513 16.67249133
[137,] -33.50999033 -3.40619513
[138,] -6.61378553 -33.50999033
[139,] 7.28241926 -6.61378553
[140,] -10.29482020 7.28241926
[141,] 4.75919935 -10.29482020
[142,] 16.87957190 4.75919935
[143,] 20.64307069 16.87957190
[144,] 24.19853724 20.64307069
[145,] -18.99671971 24.19853724
[146,] 4.99094683 -18.99671971
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -10.75968966 -32.69713872
2 -5.97108213 -10.75968966
3 20.92512266 -5.97108213
4 -10.79669003 20.92512266
5 12.09951477 -10.79669003
6 -20.22844819 12.09951477
7 -34.89714941 -20.22844819
8 -13.75166811 -34.89714941
9 -4.63129555 -13.75166811
10 11.82981525 -4.63129555
11 21.16111404 11.82981525
12 -47.46923690 21.16111404
13 -5.29575287 -47.46923690
14 -3.12516283 -5.29575287
15 48.58811847 -3.12516283
16 6.55067628 48.58811847
17 21.78761932 6.55067628
18 28.36819461 21.78761932
19 -26.82706234 28.36819461
20 -31.93085754 -26.82706234
21 -44.87683799 -31.93085754
22 9.11082855 -44.87683799
23 16.23120111 9.11082855
24 0.37668241 16.23120111
25 13.11507245 0.37668241
26 21.76200074 13.11507245
27 32.74966729 21.76200074
28 -30.19631316 32.74966729
29 13.60842989 -30.19631316
30 15.87337567 13.60842989
31 33.01885697 15.87337567
32 -18.86077048 33.01885697
33 -11.18873344 -18.86077048
34 6.70747136 -11.18873344
35 12.07712041 6.70747136
36 27.65769570 12.07712041
37 15.71171525 27.65769570
38 -5.16791219 15.71171525
39 -21.42952215 -5.16791219
40 -9.91529986 -21.42952215
41 12.45434919 -9.91529986
42 18.25909224 12.45434919
43 -34.31814722 18.25909224
44 -24.42194242 -34.31814722
45 -18.96083162 -24.42194242
46 19.56952619 -18.96083162
47 17.76522497 19.56952619
48 23.79413578 17.76522497
49 6.71544932 23.79413578
50 0.52019236 6.71544932
51 -24.89923235 0.52019236
52 16.22114021 -24.89923235
53 20.55243900 16.22114021
54 3.10501155 20.55243900
55 4.09267809 3.10501155
56 -16.19404060 4.09267809
57 -11.67981832 -16.19404060
58 19.68983074 -11.67981832
59 -21.97887047 19.68983074
60 -8.92485092 -21.97887047
61 -16.46374012 -8.92485092
62 12.34100293 -16.46374012
63 15.07939297 12.34100293
64 46.22776827 15.07939297
65 13.39835831 46.22776827
66 12.61019261 13.39835831
67 35.66421216 12.61019261
68 21.08697269 35.66421216
69 18.54808350 21.08697269
70 48.78792054 18.54808350
71 -35.75096865 48.78792054
72 2.07888314 -35.75096865
73 -19.77274157 2.07888314
74 20.87129273 -19.77274157
75 -10.48177898 20.87129273
76 13.73005533 -10.48177898
77 -20.44009288 13.73005533
78 39.14048241 -20.44009288
79 -43.96331279 39.14048241
80 -34.75147849 -43.96331279
81 4.21107931 -34.75147849
82 -18.54908365 4.21107931
83 -2.90504935 -18.54908365
84 13.83334070 -2.90504935
85 -25.04628675 13.83334070
86 -48.78134097 -25.04628675
87 13.58830809 -48.78134097
88 33.73378939 13.58830809
89 8.99873517 33.73378939
90 -13.63161577 8.99873517
91 -17.82687272 -13.63161577
92 -11.33775918 -17.82687272
93 7.64990736 -11.33775918
94 0.04466516 7.64990736
95 14.25939346 0.04466516
96 0.74561301 14.25939346
97 -34.35818220 0.74561301
98 -18.67000963 -34.35818220
99 15.21005964 -18.67000963
100 -21.39228857 15.21005964
101 18.91100748 -21.39228857
102 -34.75769373 18.91100748
103 13.99393784 -34.75769373
104 -47.35913386 13.99393784
105 -3.03072907 -47.35913386
106 14.70766097 -3.03072907
107 -2.32978122 14.70766097
108 10.02662631 -2.32978122
109 -13.76153939 10.02662631
110 10.20101841 -13.76153939
111 3.03087020 10.20101841
112 13.74415151 3.03087020
113 7.50765029 13.74415151
114 -28.96488590 7.50765029
115 -20.31795760 -28.96488590
116 -52.23882931 -20.31795760
117 32.09246948 -52.23882931
118 -18.53788147 32.09246948
119 -44.48386192 -18.53788147
120 -25.83693362 -44.48386192
121 -18.32271134 -25.83693362
122 15.95547597 -18.32271134
123 29.19531301 15.95547597
124 17.90570032 29.19531301
125 18.64409036 17.90570032
126 10.88392740 18.64409036
127 15.12087045 10.88392740
128 8.33270475 15.12087045
129 -9.15307296 8.33270475
130 12.74313183 -9.15307296
131 14.95496614 12.74313183
132 20.16680044 14.95496614
133 -26.46065651 20.16680044
134 16.46065703 -26.46065651
135 16.67249133 16.46065703
136 -3.40619513 16.67249133
137 -33.50999033 -3.40619513
138 -6.61378553 -33.50999033
139 7.28241926 -6.61378553
140 -10.29482020 7.28241926
141 4.75919935 -10.29482020
142 16.87957190 4.75919935
143 20.64307069 16.87957190
144 24.19853724 20.64307069
145 -18.99671971 24.19853724
146 4.99094683 -18.99671971
> 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/7cdy81290532276.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/freestat/rcomp/tmp/8cdy81290532276.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/freestat/rcomp/tmp/9cdy81290532276.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/freestat/rcomp/tmp/10n4xs1290532276.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
>
> #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/1184dg1290532276.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/12unu41290532276.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/13io9g1290532276.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/14bxqj1290532276.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/15776s1290532276.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/16lzm01290532276.tab")
+ }
>
> try(system("convert tmp/1y3ih1290532276.ps tmp/1y3ih1290532276.png",intern=TRUE))
character(0)
> try(system("convert tmp/29czk1290532276.ps tmp/29czk1290532276.png",intern=TRUE))
character(0)
> try(system("convert tmp/39czk1290532276.ps tmp/39czk1290532276.png",intern=TRUE))
character(0)
> try(system("convert tmp/49czk1290532276.ps tmp/49czk1290532276.png",intern=TRUE))
character(0)
> try(system("convert tmp/59czk1290532276.ps tmp/59czk1290532276.png",intern=TRUE))
character(0)
> try(system("convert tmp/61lg51290532276.ps tmp/61lg51290532276.png",intern=TRUE))
character(0)
> try(system("convert tmp/7cdy81290532276.ps tmp/7cdy81290532276.png",intern=TRUE))
character(0)
> try(system("convert tmp/8cdy81290532276.ps tmp/8cdy81290532276.png",intern=TRUE))
character(0)
> try(system("convert tmp/9cdy81290532276.ps tmp/9cdy81290532276.png",intern=TRUE))
character(0)
> try(system("convert tmp/10n4xs1290532276.ps tmp/10n4xs1290532276.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
5.313 2.702 8.791