R version 3.0.2 (2013-09-25) -- "Frisbee Sailing"
Copyright (C) 2013 The R Foundation for Statistical Computing
Platform: i686-pc-linux-gnu (32-bit)
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(119.992
+ ,157.302
+ ,74.997
+ ,0.00007
+ ,0.00554
+ ,122.4
+ ,148.65
+ ,113.819
+ ,0.00008
+ ,0.00696
+ ,116.682
+ ,131.111
+ ,111.555
+ ,0.00009
+ ,0.00781
+ ,116.676
+ ,137.871
+ ,111.366
+ ,0.00009
+ ,0.00698
+ ,116.014
+ ,141.781
+ ,110.655
+ ,0.00011
+ ,0.00908
+ ,120.552
+ ,131.162
+ ,113.787
+ ,0.00008
+ ,0.0075
+ ,120.267
+ ,137.244
+ ,114.82
+ ,0.00003
+ ,0.00202
+ ,107.332
+ ,113.84
+ ,104.315
+ ,0.00003
+ ,0.00182
+ ,95.73
+ ,132.068
+ ,91.754
+ ,0.00006
+ ,0.00332
+ ,95.056
+ ,120.103
+ ,91.226
+ ,0.00006
+ ,0.00332
+ ,88.333
+ ,112.24
+ ,84.072
+ ,0.00006
+ ,0.0033
+ ,91.904
+ ,115.871
+ ,86.292
+ ,0.00006
+ ,0.00336
+ ,136.926
+ ,159.866
+ ,131.276
+ ,0.00002
+ ,0.00153
+ ,139.173
+ ,179.139
+ ,76.556
+ ,0.00003
+ ,0.00208
+ ,152.845
+ ,163.305
+ ,75.836
+ ,0.00002
+ ,0.00149
+ ,142.167
+ ,217.455
+ ,83.159
+ ,0.00003
+ ,0.00203
+ ,144.188
+ ,349.259
+ ,82.764
+ ,0.00004
+ ,0.00292
+ ,168.778
+ ,232.181
+ ,75.603
+ ,0.00004
+ ,0.00387
+ ,153.046
+ ,175.829
+ ,68.623
+ ,0.00005
+ ,0.00432
+ ,156.405
+ ,189.398
+ ,142.822
+ ,0.00005
+ ,0.00399
+ ,153.848
+ ,165.738
+ ,65.782
+ ,0.00005
+ ,0.0045
+ ,153.88
+ ,172.86
+ ,78.128
+ ,0.00003
+ ,0.00267
+ ,167.93
+ ,193.221
+ ,79.068
+ ,0.00003
+ ,0.00247
+ ,173.917
+ ,192.735
+ ,86.18
+ ,0.00003
+ ,0.00258
+ ,163.656
+ ,200.841
+ ,76.779
+ ,0.00005
+ ,0.0039
+ ,104.4
+ ,206.002
+ ,77.968
+ ,0.00006
+ ,0.00375
+ ,171.041
+ ,208.313
+ ,75.501
+ ,0.00003
+ ,0.00234
+ ,146.845
+ ,208.701
+ ,81.737
+ ,0.00003
+ ,0.00275
+ ,155.358
+ ,227.383
+ ,80.055
+ ,0.00002
+ ,0.00176
+ ,162.568
+ ,198.346
+ ,77.63
+ ,0.00003
+ ,0.00253
+ ,197.076
+ ,206.896
+ ,192.055
+ ,0.00001
+ ,0.00168
+ ,199.228
+ ,209.512
+ ,192.091
+ ,0.00001
+ ,0.00138
+ ,198.383
+ ,215.203
+ ,193.104
+ ,0.00001
+ ,0.00135
+ ,202.266
+ ,211.604
+ ,197.079
+ ,0.000009
+ ,0.00107
+ ,203.184
+ ,211.526
+ ,196.16
+ ,0.000009
+ ,0.00106
+ ,201.464
+ ,210.565
+ ,195.708
+ ,0.00001
+ ,0.00115
+ ,177.876
+ ,192.921
+ ,168.013
+ ,0.00002
+ ,0.00241
+ ,176.17
+ ,185.604
+ ,163.564
+ ,0.00002
+ ,0.00218
+ ,180.198
+ ,201.249
+ ,175.456
+ ,0.00002
+ ,0.00166
+ ,187.733
+ ,202.324
+ ,173.015
+ ,0.00002
+ ,0.00182
+ ,186.163
+ ,197.724
+ ,177.584
+ ,0.00002
+ ,0.00175
+ ,184.055
+ ,196.537
+ ,166.977
+ ,0.00001
+ ,0.00147
+ ,237.226
+ ,247.326
+ ,225.227
+ ,0.00001
+ ,0.00182
+ ,241.404
+ ,248.834
+ ,232.483
+ ,0.00001
+ ,0.00173
+ ,243.439
+ ,250.912
+ ,232.435
+ ,0.000009
+ ,0.00137
+ ,242.852
+ ,255.034
+ ,227.911
+ ,0.000009
+ ,0.00139
+ ,245.51
+ ,262.09
+ ,231.848
+ ,0.00001
+ ,0.00148
+ ,252.455
+ ,261.487
+ ,182.786
+ ,0.000007
+ ,0.00113
+ ,122.188
+ ,128.611
+ ,115.765
+ ,0.00004
+ ,0.00203
+ ,122.964
+ ,130.049
+ ,114.676
+ ,0.00003
+ ,0.00155
+ ,124.445
+ ,135.069
+ ,117.495
+ ,0.00003
+ ,0.00167
+ ,126.344
+ ,134.231
+ ,112.773
+ ,0.00004
+ ,0.00169
+ ,128.001
+ ,138.052
+ ,122.08
+ ,0.00003
+ ,0.00166
+ ,129.336
+ ,139.867
+ ,118.604
+ ,0.00004
+ ,0.00183
+ ,108.807
+ ,134.656
+ ,102.874
+ ,0.00007
+ ,0.00486
+ ,109.86
+ ,126.358
+ ,104.437
+ ,0.00008
+ ,0.00539
+ ,110.417
+ ,131.067
+ ,103.37
+ ,0.00007
+ ,0.00514
+ ,117.274
+ ,129.916
+ ,110.402
+ ,0.00006
+ ,0.00469
+ ,116.879
+ ,131.897
+ ,108.153
+ ,0.00007
+ ,0.00493
+ ,114.847
+ ,271.314
+ ,104.68
+ ,0.00008
+ ,0.0052
+ ,209.144
+ ,237.494
+ ,109.379
+ ,0.00001
+ ,0.00152
+ ,223.365
+ ,238.987
+ ,98.664
+ ,0.00001
+ ,0.00151
+ ,222.236
+ ,231.345
+ ,205.495
+ ,0.00001
+ ,0.00144
+ ,228.832
+ ,234.619
+ ,223.634
+ ,0.00001
+ ,0.00155
+ ,229.401
+ ,252.221
+ ,221.156
+ ,0.000009
+ ,0.00113
+ ,228.969
+ ,239.541
+ ,113.201
+ ,0.00001
+ ,0.0014
+ ,140.341
+ ,159.774
+ ,67.021
+ ,0.00006
+ ,0.0044
+ ,136.969
+ ,166.607
+ ,66.004
+ ,0.00007
+ ,0.00463
+ ,143.533
+ ,162.215
+ ,65.809
+ ,0.00008
+ ,0.00467
+ ,148.09
+ ,162.824
+ ,67.343
+ ,0.00005
+ ,0.00354
+ ,142.729
+ ,162.408
+ ,65.476
+ ,0.00006
+ ,0.00419
+ ,136.358
+ ,176.595
+ ,65.75
+ ,0.00007
+ ,0.00478
+ ,120.08
+ ,139.71
+ ,111.208
+ ,0.00003
+ ,0.0022
+ ,112.014
+ ,588.518
+ ,107.024
+ ,0.00005
+ ,0.00329
+ ,110.793
+ ,128.101
+ ,107.316
+ ,0.00004
+ ,0.00283
+ ,110.707
+ ,122.611
+ ,105.007
+ ,0.00005
+ ,0.00289
+ ,112.876
+ ,148.826
+ ,106.981
+ ,0.00004
+ ,0.00289
+ ,110.568
+ ,125.394
+ ,106.821
+ ,0.00004
+ ,0.0028
+ ,95.385
+ ,102.145
+ ,90.264
+ ,0.00006
+ ,0.00332
+ ,100.77
+ ,115.697
+ ,85.545
+ ,0.0001
+ ,0.00576
+ ,96.106
+ ,108.664
+ ,84.51
+ ,0.00007
+ ,0.00415
+ ,95.605
+ ,107.715
+ ,87.549
+ ,0.00007
+ ,0.00371
+ ,100.96
+ ,110.019
+ ,95.628
+ ,0.00006
+ ,0.00348
+ ,98.804
+ ,102.305
+ ,87.804
+ ,0.00004
+ ,0.00258
+ ,176.858
+ ,205.56
+ ,75.344
+ ,0.00004
+ ,0.0042
+ ,180.978
+ ,200.125
+ ,155.495
+ ,0.00002
+ ,0.00244
+ ,178.222
+ ,202.45
+ ,141.047
+ ,0.00002
+ ,0.00194
+ ,176.281
+ ,227.381
+ ,125.61
+ ,0.00003
+ ,0.00312
+ ,173.898
+ ,211.35
+ ,74.677
+ ,0.00003
+ ,0.00254
+ ,179.711
+ ,225.93
+ ,144.878
+ ,0.00004
+ ,0.00419
+ ,166.605
+ ,206.008
+ ,78.032
+ ,0.00004
+ ,0.00453
+ ,151.955
+ ,163.335
+ ,147.226
+ ,0.00003
+ ,0.00227
+ ,148.272
+ ,164.989
+ ,142.299
+ ,0.00003
+ ,0.00256
+ ,152.125
+ ,161.469
+ ,76.596
+ ,0.00003
+ ,0.00226
+ ,157.821
+ ,172.975
+ ,68.401
+ ,0.00002
+ ,0.00196
+ ,157.447
+ ,163.267
+ ,149.605
+ ,0.00002
+ ,0.00197
+ ,159.116
+ ,168.913
+ ,144.811
+ ,0.00002
+ ,0.00184
+ ,125.036
+ ,143.946
+ ,116.187
+ ,0.0001
+ ,0.00623
+ ,125.791
+ ,140.557
+ ,96.206
+ ,0.00011
+ ,0.00655
+ ,126.512
+ ,141.756
+ ,99.77
+ ,0.00015
+ ,0.0099
+ ,125.641
+ ,141.068
+ ,116.346
+ ,0.00026
+ ,0.01522
+ ,128.451
+ ,150.449
+ ,75.632
+ ,0.00012
+ ,0.00909
+ ,139.224
+ ,586.567
+ ,66.157
+ ,0.00022
+ ,0.01628
+ ,150.258
+ ,154.609
+ ,75.349
+ ,0.00002
+ ,0.00136
+ ,154.003
+ ,160.267
+ ,128.621
+ ,0.00001
+ ,0.001
+ ,149.689
+ ,160.368
+ ,133.608
+ ,0.00002
+ ,0.00134
+ ,155.078
+ ,163.736
+ ,144.148
+ ,0.00001
+ ,0.00092
+ ,151.884
+ ,157.765
+ ,133.751
+ ,0.00002
+ ,0.00122
+ ,151.989
+ ,157.339
+ ,132.857
+ ,0.00001
+ ,0.00096
+ ,193.03
+ ,208.9
+ ,80.297
+ ,0.00004
+ ,0.00389
+ ,200.714
+ ,223.982
+ ,89.686
+ ,0.00003
+ ,0.00337
+ ,208.519
+ ,220.315
+ ,199.02
+ ,0.00003
+ ,0.00339
+ ,204.664
+ ,221.3
+ ,189.621
+ ,0.00004
+ ,0.00485
+ ,210.141
+ ,232.706
+ ,185.258
+ ,0.00003
+ ,0.0028
+ ,206.327
+ ,226.355
+ ,92.02
+ ,0.00002
+ ,0.00246
+ ,151.872
+ ,492.892
+ ,69.085
+ ,0.00006
+ ,0.00385
+ ,158.219
+ ,442.557
+ ,71.948
+ ,0.00003
+ ,0.00207
+ ,170.756
+ ,450.247
+ ,79.032
+ ,0.00003
+ ,0.00261
+ ,178.285
+ ,442.824
+ ,82.063
+ ,0.00003
+ ,0.00194
+ ,217.116
+ ,233.481
+ ,93.978
+ ,0.00002
+ ,0.00128
+ ,128.94
+ ,479.697
+ ,88.251
+ ,0.00005
+ ,0.00314
+ ,176.824
+ ,215.293
+ ,83.961
+ ,0.00003
+ ,0.00221
+ ,138.19
+ ,203.522
+ ,83.34
+ ,0.00005
+ ,0.00398
+ ,182.018
+ ,197.173
+ ,79.187
+ ,0.00005
+ ,0.00449
+ ,156.239
+ ,195.107
+ ,79.82
+ ,0.00004
+ ,0.00395
+ ,145.174
+ ,198.109
+ ,80.637
+ ,0.00005
+ ,0.00422
+ ,138.145
+ ,197.238
+ ,81.114
+ ,0.00004
+ ,0.00327
+ ,166.888
+ ,198.966
+ ,79.512
+ ,0.00004
+ ,0.00351
+ ,119.031
+ ,127.533
+ ,109.216
+ ,0.00004
+ ,0.00192
+ ,120.078
+ ,126.632
+ ,105.667
+ ,0.00002
+ ,0.00135
+ ,120.289
+ ,128.143
+ ,100.209
+ ,0.00004
+ ,0.00238
+ ,120.256
+ ,125.306
+ ,104.773
+ ,0.00003
+ ,0.00205
+ ,119.056
+ ,125.213
+ ,86.795
+ ,0.00003
+ ,0.0017
+ ,118.747
+ ,123.723
+ ,109.836
+ ,0.00003
+ ,0.00171
+ ,106.516
+ ,112.777
+ ,93.105
+ ,0.00006
+ ,0.00319
+ ,110.453
+ ,127.611
+ ,105.554
+ ,0.00004
+ ,0.00315
+ ,113.4
+ ,133.344
+ ,107.816
+ ,0.00004
+ ,0.00283
+ ,113.166
+ ,130.27
+ ,100.673
+ ,0.00004
+ ,0.00312
+ ,112.239
+ ,126.609
+ ,104.095
+ ,0.00004
+ ,0.0029
+ ,116.15
+ ,131.731
+ ,109.815
+ ,0.00003
+ ,0.00232
+ ,170.368
+ ,268.796
+ ,79.543
+ ,0.00003
+ ,0.00269
+ ,208.083
+ ,253.792
+ ,91.802
+ ,0.00004
+ ,0.00428
+ ,198.458
+ ,219.29
+ ,148.691
+ ,0.00002
+ ,0.00215
+ ,202.805
+ ,231.508
+ ,86.232
+ ,0.00002
+ ,0.00211
+ ,202.544
+ ,241.35
+ ,164.168
+ ,0.00001
+ ,0.00133
+ ,223.361
+ ,263.872
+ ,87.638
+ ,0.00002
+ ,0.00188
+ ,169.774
+ ,191.759
+ ,151.451
+ ,0.00009
+ ,0.00946
+ ,183.52
+ ,216.814
+ ,161.34
+ ,0.00008
+ ,0.00819
+ ,188.62
+ ,216.302
+ ,165.982
+ ,0.00009
+ ,0.01027
+ ,202.632
+ ,565.74
+ ,177.258
+ ,0.00008
+ ,0.00963
+ ,186.695
+ ,211.961
+ ,149.442
+ ,0.0001
+ ,0.01154
+ ,192.818
+ ,224.429
+ ,168.793
+ ,0.00016
+ ,0.01958
+ ,198.116
+ ,233.099
+ ,174.478
+ ,0.00014
+ ,0.01699
+ ,121.345
+ ,139.644
+ ,98.25
+ ,0.00006
+ ,0.00332
+ ,119.1
+ ,128.442
+ ,88.833
+ ,0.00006
+ ,0.003
+ ,117.87
+ ,127.349
+ ,95.654
+ ,0.00005
+ ,0.003
+ ,122.336
+ ,142.369
+ ,94.794
+ ,0.00006
+ ,0.00339
+ ,117.963
+ ,134.209
+ ,100.757
+ ,0.00015
+ ,0.00718
+ ,126.144
+ ,154.284
+ ,97.543
+ ,0.00008
+ ,0.00454
+ ,127.93
+ ,138.752
+ ,112.173
+ ,0.00005
+ ,0.00318
+ ,114.238
+ ,124.393
+ ,77.022
+ ,0.00005
+ ,0.00316
+ ,115.322
+ ,135.738
+ ,107.802
+ ,0.00005
+ ,0.00329
+ ,114.554
+ ,126.778
+ ,91.121
+ ,0.00006
+ ,0.0034
+ ,112.15
+ ,131.669
+ ,97.527
+ ,0.00005
+ ,0.00284
+ ,102.273
+ ,142.83
+ ,85.902
+ ,0.00009
+ ,0.00461
+ ,236.2
+ ,244.663
+ ,102.137
+ ,0.00001
+ ,0.00153
+ ,237.323
+ ,243.709
+ ,229.256
+ ,0.00001
+ ,0.00159
+ ,260.105
+ ,264.919
+ ,237.303
+ ,0.00001
+ ,0.00186
+ ,197.569
+ ,217.627
+ ,90.794
+ ,0.00004
+ ,0.00448
+ ,240.301
+ ,245.135
+ ,219.783
+ ,0.00002
+ ,0.00283
+ ,244.99
+ ,272.21
+ ,239.17
+ ,0.00002
+ ,0.00237
+ ,112.547
+ ,133.374
+ ,105.715
+ ,0.00003
+ ,0.0019
+ ,110.739
+ ,113.597
+ ,100.139
+ ,0.00003
+ ,0.002
+ ,113.715
+ ,116.443
+ ,96.913
+ ,0.00003
+ ,0.00203
+ ,117.004
+ ,144.466
+ ,99.923
+ ,0.00003
+ ,0.00218
+ ,115.38
+ ,123.109
+ ,108.634
+ ,0.00003
+ ,0.00199
+ ,116.388
+ ,129.038
+ ,108.97
+ ,0.00003
+ ,0.00213
+ ,151.737
+ ,190.204
+ ,129.859
+ ,0.00002
+ ,0.00162
+ ,148.79
+ ,158.359
+ ,138.99
+ ,0.00002
+ ,0.00186
+ ,148.143
+ ,155.982
+ ,135.041
+ ,0.00003
+ ,0.00231
+ ,150.44
+ ,163.441
+ ,144.736
+ ,0.00003
+ ,0.00233
+ ,148.462
+ ,161.078
+ ,141.998
+ ,0.00003
+ ,0.00235
+ ,149.818
+ ,163.417
+ ,144.786
+ ,0.00002
+ ,0.00198
+ ,117.226
+ ,123.925
+ ,106.656
+ ,0.00004
+ ,0.0027
+ ,116.848
+ ,217.552
+ ,99.503
+ ,0.00005
+ ,0.00346
+ ,116.286
+ ,177.291
+ ,96.983
+ ,0.00003
+ ,0.00192
+ ,116.556
+ ,592.03
+ ,86.228
+ ,0.00004
+ ,0.00263
+ ,116.342
+ ,581.289
+ ,94.246
+ ,0.00002
+ ,0.00148
+ ,114.563
+ ,119.167
+ ,86.647
+ ,0.00003
+ ,0.00184
+ ,201.774
+ ,262.707
+ ,78.228
+ ,0.00003
+ ,0.00396
+ ,174.188
+ ,230.978
+ ,94.261
+ ,0.00003
+ ,0.00259
+ ,209.516
+ ,253.017
+ ,89.488
+ ,0.00003
+ ,0.00292
+ ,174.688
+ ,240.005
+ ,74.287
+ ,0.00008
+ ,0.00564
+ ,198.764
+ ,396.961
+ ,74.904
+ ,0.00004
+ ,0.0039
+ ,214.289
+ ,260.277
+ ,77.973
+ ,0.00003
+ ,0.00317)
+ ,dim=c(5
+ ,195)
+ ,dimnames=list(c('MDVP:Fo(Hz)'
+ ,'MDVP:Fhi(Hz)'
+ ,'MDVP:Flo(Hz)'
+ ,'MDVP:Jitter(Abs)'
+ ,'MDVP:PPQ')
+ ,1:195))
> y <- array(NA,dim=c(5,195),dimnames=list(c('MDVP:Fo(Hz)','MDVP:Fhi(Hz)','MDVP:Flo(Hz)','MDVP:Jitter(Abs)','MDVP:PPQ'),1:195))
> 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'
> par3 <- 'No Linear Trend'
> par2 <- 'Do not include Seasonal Dummies'
> par1 <- '1'
> #'GNU S' R Code compiled by R2WASP v. 1.2.327 ()
> #Author: root
> #To cite this work: Wessa P., (2013), Multiple Regression (v1.0.29) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_multipleregression.wasp/
> #Source of accompanying publication: Office for Research, Development, and Education
> #
> library(lattice)
> library(lmtest)
Loading required package: zoo
Attaching package: 'zoo'
The following objects are masked from 'package:base':
as.Date, 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
MDVP:Fo(Hz) MDVP:Fhi(Hz) MDVP:Flo(Hz) MDVP:Jitter(Abs) MDVP:PPQ
1 119.992 157.302 74.997 7.0e-05 0.00554
2 122.400 148.650 113.819 8.0e-05 0.00696
3 116.682 131.111 111.555 9.0e-05 0.00781
4 116.676 137.871 111.366 9.0e-05 0.00698
5 116.014 141.781 110.655 1.1e-04 0.00908
6 120.552 131.162 113.787 8.0e-05 0.00750
7 120.267 137.244 114.820 3.0e-05 0.00202
8 107.332 113.840 104.315 3.0e-05 0.00182
9 95.730 132.068 91.754 6.0e-05 0.00332
10 95.056 120.103 91.226 6.0e-05 0.00332
11 88.333 112.240 84.072 6.0e-05 0.00330
12 91.904 115.871 86.292 6.0e-05 0.00336
13 136.926 159.866 131.276 2.0e-05 0.00153
14 139.173 179.139 76.556 3.0e-05 0.00208
15 152.845 163.305 75.836 2.0e-05 0.00149
16 142.167 217.455 83.159 3.0e-05 0.00203
17 144.188 349.259 82.764 4.0e-05 0.00292
18 168.778 232.181 75.603 4.0e-05 0.00387
19 153.046 175.829 68.623 5.0e-05 0.00432
20 156.405 189.398 142.822 5.0e-05 0.00399
21 153.848 165.738 65.782 5.0e-05 0.00450
22 153.880 172.860 78.128 3.0e-05 0.00267
23 167.930 193.221 79.068 3.0e-05 0.00247
24 173.917 192.735 86.180 3.0e-05 0.00258
25 163.656 200.841 76.779 5.0e-05 0.00390
26 104.400 206.002 77.968 6.0e-05 0.00375
27 171.041 208.313 75.501 3.0e-05 0.00234
28 146.845 208.701 81.737 3.0e-05 0.00275
29 155.358 227.383 80.055 2.0e-05 0.00176
30 162.568 198.346 77.630 3.0e-05 0.00253
31 197.076 206.896 192.055 1.0e-05 0.00168
32 199.228 209.512 192.091 1.0e-05 0.00138
33 198.383 215.203 193.104 1.0e-05 0.00135
34 202.266 211.604 197.079 9.0e-06 0.00107
35 203.184 211.526 196.160 9.0e-06 0.00106
36 201.464 210.565 195.708 1.0e-05 0.00115
37 177.876 192.921 168.013 2.0e-05 0.00241
38 176.170 185.604 163.564 2.0e-05 0.00218
39 180.198 201.249 175.456 2.0e-05 0.00166
40 187.733 202.324 173.015 2.0e-05 0.00182
41 186.163 197.724 177.584 2.0e-05 0.00175
42 184.055 196.537 166.977 1.0e-05 0.00147
43 237.226 247.326 225.227 1.0e-05 0.00182
44 241.404 248.834 232.483 1.0e-05 0.00173
45 243.439 250.912 232.435 9.0e-06 0.00137
46 242.852 255.034 227.911 9.0e-06 0.00139
47 245.510 262.090 231.848 1.0e-05 0.00148
48 252.455 261.487 182.786 7.0e-06 0.00113
49 122.188 128.611 115.765 4.0e-05 0.00203
50 122.964 130.049 114.676 3.0e-05 0.00155
51 124.445 135.069 117.495 3.0e-05 0.00167
52 126.344 134.231 112.773 4.0e-05 0.00169
53 128.001 138.052 122.080 3.0e-05 0.00166
54 129.336 139.867 118.604 4.0e-05 0.00183
55 108.807 134.656 102.874 7.0e-05 0.00486
56 109.860 126.358 104.437 8.0e-05 0.00539
57 110.417 131.067 103.370 7.0e-05 0.00514
58 117.274 129.916 110.402 6.0e-05 0.00469
59 116.879 131.897 108.153 7.0e-05 0.00493
60 114.847 271.314 104.680 8.0e-05 0.00520
61 209.144 237.494 109.379 1.0e-05 0.00152
62 223.365 238.987 98.664 1.0e-05 0.00151
63 222.236 231.345 205.495 1.0e-05 0.00144
64 228.832 234.619 223.634 1.0e-05 0.00155
65 229.401 252.221 221.156 9.0e-06 0.00113
66 228.969 239.541 113.201 1.0e-05 0.00140
67 140.341 159.774 67.021 6.0e-05 0.00440
68 136.969 166.607 66.004 7.0e-05 0.00463
69 143.533 162.215 65.809 8.0e-05 0.00467
70 148.090 162.824 67.343 5.0e-05 0.00354
71 142.729 162.408 65.476 6.0e-05 0.00419
72 136.358 176.595 65.750 7.0e-05 0.00478
73 120.080 139.710 111.208 3.0e-05 0.00220
74 112.014 588.518 107.024 5.0e-05 0.00329
75 110.793 128.101 107.316 4.0e-05 0.00283
76 110.707 122.611 105.007 5.0e-05 0.00289
77 112.876 148.826 106.981 4.0e-05 0.00289
78 110.568 125.394 106.821 4.0e-05 0.00280
79 95.385 102.145 90.264 6.0e-05 0.00332
80 100.770 115.697 85.545 1.0e-04 0.00576
81 96.106 108.664 84.510 7.0e-05 0.00415
82 95.605 107.715 87.549 7.0e-05 0.00371
83 100.960 110.019 95.628 6.0e-05 0.00348
84 98.804 102.305 87.804 4.0e-05 0.00258
85 176.858 205.560 75.344 4.0e-05 0.00420
86 180.978 200.125 155.495 2.0e-05 0.00244
87 178.222 202.450 141.047 2.0e-05 0.00194
88 176.281 227.381 125.610 3.0e-05 0.00312
89 173.898 211.350 74.677 3.0e-05 0.00254
90 179.711 225.930 144.878 4.0e-05 0.00419
91 166.605 206.008 78.032 4.0e-05 0.00453
92 151.955 163.335 147.226 3.0e-05 0.00227
93 148.272 164.989 142.299 3.0e-05 0.00256
94 152.125 161.469 76.596 3.0e-05 0.00226
95 157.821 172.975 68.401 2.0e-05 0.00196
96 157.447 163.267 149.605 2.0e-05 0.00197
97 159.116 168.913 144.811 2.0e-05 0.00184
98 125.036 143.946 116.187 1.0e-04 0.00623
99 125.791 140.557 96.206 1.1e-04 0.00655
100 126.512 141.756 99.770 1.5e-04 0.00990
101 125.641 141.068 116.346 2.6e-04 0.01522
102 128.451 150.449 75.632 1.2e-04 0.00909
103 139.224 586.567 66.157 2.2e-04 0.01628
104 150.258 154.609 75.349 2.0e-05 0.00136
105 154.003 160.267 128.621 1.0e-05 0.00100
106 149.689 160.368 133.608 2.0e-05 0.00134
107 155.078 163.736 144.148 1.0e-05 0.00092
108 151.884 157.765 133.751 2.0e-05 0.00122
109 151.989 157.339 132.857 1.0e-05 0.00096
110 193.030 208.900 80.297 4.0e-05 0.00389
111 200.714 223.982 89.686 3.0e-05 0.00337
112 208.519 220.315 199.020 3.0e-05 0.00339
113 204.664 221.300 189.621 4.0e-05 0.00485
114 210.141 232.706 185.258 3.0e-05 0.00280
115 206.327 226.355 92.020 2.0e-05 0.00246
116 151.872 492.892 69.085 6.0e-05 0.00385
117 158.219 442.557 71.948 3.0e-05 0.00207
118 170.756 450.247 79.032 3.0e-05 0.00261
119 178.285 442.824 82.063 3.0e-05 0.00194
120 217.116 233.481 93.978 2.0e-05 0.00128
121 128.940 479.697 88.251 5.0e-05 0.00314
122 176.824 215.293 83.961 3.0e-05 0.00221
123 138.190 203.522 83.340 5.0e-05 0.00398
124 182.018 197.173 79.187 5.0e-05 0.00449
125 156.239 195.107 79.820 4.0e-05 0.00395
126 145.174 198.109 80.637 5.0e-05 0.00422
127 138.145 197.238 81.114 4.0e-05 0.00327
128 166.888 198.966 79.512 4.0e-05 0.00351
129 119.031 127.533 109.216 4.0e-05 0.00192
130 120.078 126.632 105.667 2.0e-05 0.00135
131 120.289 128.143 100.209 4.0e-05 0.00238
132 120.256 125.306 104.773 3.0e-05 0.00205
133 119.056 125.213 86.795 3.0e-05 0.00170
134 118.747 123.723 109.836 3.0e-05 0.00171
135 106.516 112.777 93.105 6.0e-05 0.00319
136 110.453 127.611 105.554 4.0e-05 0.00315
137 113.400 133.344 107.816 4.0e-05 0.00283
138 113.166 130.270 100.673 4.0e-05 0.00312
139 112.239 126.609 104.095 4.0e-05 0.00290
140 116.150 131.731 109.815 3.0e-05 0.00232
141 170.368 268.796 79.543 3.0e-05 0.00269
142 208.083 253.792 91.802 4.0e-05 0.00428
143 198.458 219.290 148.691 2.0e-05 0.00215
144 202.805 231.508 86.232 2.0e-05 0.00211
145 202.544 241.350 164.168 1.0e-05 0.00133
146 223.361 263.872 87.638 2.0e-05 0.00188
147 169.774 191.759 151.451 9.0e-05 0.00946
148 183.520 216.814 161.340 8.0e-05 0.00819
149 188.620 216.302 165.982 9.0e-05 0.01027
150 202.632 565.740 177.258 8.0e-05 0.00963
151 186.695 211.961 149.442 1.0e-04 0.01154
152 192.818 224.429 168.793 1.6e-04 0.01958
153 198.116 233.099 174.478 1.4e-04 0.01699
154 121.345 139.644 98.250 6.0e-05 0.00332
155 119.100 128.442 88.833 6.0e-05 0.00300
156 117.870 127.349 95.654 5.0e-05 0.00300
157 122.336 142.369 94.794 6.0e-05 0.00339
158 117.963 134.209 100.757 1.5e-04 0.00718
159 126.144 154.284 97.543 8.0e-05 0.00454
160 127.930 138.752 112.173 5.0e-05 0.00318
161 114.238 124.393 77.022 5.0e-05 0.00316
162 115.322 135.738 107.802 5.0e-05 0.00329
163 114.554 126.778 91.121 6.0e-05 0.00340
164 112.150 131.669 97.527 5.0e-05 0.00284
165 102.273 142.830 85.902 9.0e-05 0.00461
166 236.200 244.663 102.137 1.0e-05 0.00153
167 237.323 243.709 229.256 1.0e-05 0.00159
168 260.105 264.919 237.303 1.0e-05 0.00186
169 197.569 217.627 90.794 4.0e-05 0.00448
170 240.301 245.135 219.783 2.0e-05 0.00283
171 244.990 272.210 239.170 2.0e-05 0.00237
172 112.547 133.374 105.715 3.0e-05 0.00190
173 110.739 113.597 100.139 3.0e-05 0.00200
174 113.715 116.443 96.913 3.0e-05 0.00203
175 117.004 144.466 99.923 3.0e-05 0.00218
176 115.380 123.109 108.634 3.0e-05 0.00199
177 116.388 129.038 108.970 3.0e-05 0.00213
178 151.737 190.204 129.859 2.0e-05 0.00162
179 148.790 158.359 138.990 2.0e-05 0.00186
180 148.143 155.982 135.041 3.0e-05 0.00231
181 150.440 163.441 144.736 3.0e-05 0.00233
182 148.462 161.078 141.998 3.0e-05 0.00235
183 149.818 163.417 144.786 2.0e-05 0.00198
184 117.226 123.925 106.656 4.0e-05 0.00270
185 116.848 217.552 99.503 5.0e-05 0.00346
186 116.286 177.291 96.983 3.0e-05 0.00192
187 116.556 592.030 86.228 4.0e-05 0.00263
188 116.342 581.289 94.246 2.0e-05 0.00148
189 114.563 119.167 86.647 3.0e-05 0.00184
190 201.774 262.707 78.228 3.0e-05 0.00396
191 174.188 230.978 94.261 3.0e-05 0.00259
192 209.516 253.017 89.488 3.0e-05 0.00292
193 174.688 240.005 74.287 8.0e-05 0.00564
194 198.764 396.961 74.904 4.0e-05 0.00390
195 214.289 260.277 77.973 3.0e-05 0.00317
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) `MDVP:Fhi(Hz)` `MDVP:Flo(Hz)` `MDVP:Jitter(Abs)`
9.696e+01 1.250e-01 3.705e-01 -1.078e+06
`MDVP:PPQ`
1.071e+04
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-82.492 -18.095 -4.115 17.202 85.154
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 9.696e+01 8.072e+00 12.012 < 2e-16 ***
`MDVP:Fhi(Hz)` 1.250e-01 2.129e-02 5.872 1.89e-08 ***
`MDVP:Flo(Hz)` 3.705e-01 4.817e-02 7.691 7.69e-13 ***
`MDVP:Jitter(Abs)` -1.078e+06 1.400e+05 -7.699 7.30e-13 ***
`MDVP:PPQ` 1.071e+04 1.714e+03 6.251 2.62e-09 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 26.13 on 190 degrees of freedom
Multiple R-squared: 0.6096, Adjusted R-squared: 0.6013
F-statistic: 74.16 on 4 and 190 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,] 3.493712e-04 6.987424e-04 0.99965063
[2,] 7.416372e-04 1.483274e-03 0.99925836
[3,] 8.891928e-05 1.778386e-04 0.99991108
[4,] 1.071933e-05 2.143866e-05 0.99998928
[5,] 1.121862e-06 2.243723e-06 0.99999888
[6,] 1.106377e-07 2.212754e-07 0.99999989
[7,] 3.876715e-08 7.753430e-08 0.99999996
[8,] 4.942598e-06 9.885196e-06 0.99999506
[9,] 6.512523e-06 1.302505e-05 0.99999349
[10,] 2.623185e-05 5.246370e-05 0.99997377
[11,] 1.585092e-05 3.170184e-05 0.99998415
[12,] 6.536716e-06 1.307343e-05 0.99999346
[13,] 1.441422e-04 2.882843e-04 0.99985586
[14,] 7.556733e-05 1.511347e-04 0.99992443
[15,] 3.083625e-05 6.167250e-05 0.99996916
[16,] 4.185523e-05 8.371045e-05 0.99995814
[17,] 7.081053e-05 1.416211e-04 0.99992919
[18,] 1.210966e-04 2.421933e-04 0.99987890
[19,] 7.963646e-05 1.592729e-04 0.99992036
[20,] 7.708638e-05 1.541728e-04 0.99992291
[21,] 6.436258e-05 1.287252e-04 0.99993564
[22,] 3.639401e-05 7.278803e-05 0.99996361
[23,] 1.896958e-05 3.793917e-05 0.99998103
[24,] 2.342790e-05 4.685580e-05 0.99997657
[25,] 2.097001e-05 4.194003e-05 0.99997903
[26,] 1.245874e-05 2.491748e-05 0.99998754
[27,] 9.497878e-06 1.899576e-05 0.99999050
[28,] 6.380252e-06 1.276050e-05 0.99999362
[29,] 3.622378e-06 7.244757e-06 0.99999638
[30,] 2.211129e-06 4.422257e-06 0.99999779
[31,] 1.066192e-06 2.132383e-06 0.99999893
[32,] 5.132133e-07 1.026427e-06 0.99999949
[33,] 2.791117e-07 5.582233e-07 0.99999972
[34,] 1.463559e-07 2.927118e-07 0.99999985
[35,] 7.551571e-08 1.510314e-07 0.99999992
[36,] 7.066234e-08 1.413247e-07 0.99999993
[37,] 7.390717e-08 1.478143e-07 0.99999993
[38,] 1.104939e-07 2.209879e-07 0.99999989
[39,] 1.160987e-07 2.321973e-07 0.99999988
[40,] 1.071046e-07 2.142092e-07 0.99999989
[41,] 8.219616e-07 1.643923e-06 0.99999918
[42,] 4.567356e-07 9.134713e-07 0.99999954
[43,] 2.360256e-07 4.720512e-07 0.99999976
[44,] 1.273226e-07 2.546452e-07 0.99999987
[45,] 1.038710e-07 2.077419e-07 0.99999990
[46,] 5.442268e-08 1.088454e-07 0.99999995
[47,] 3.518228e-08 7.036456e-08 0.99999996
[48,] 1.807337e-08 3.614674e-08 0.99999998
[49,] 1.252441e-08 2.504883e-08 0.99999999
[50,] 6.504332e-09 1.300866e-08 0.99999999
[51,] 3.758944e-09 7.517888e-09 1.00000000
[52,] 1.993053e-09 3.986107e-09 1.00000000
[53,] 1.761405e-09 3.522811e-09 1.00000000
[54,] 1.809931e-09 3.619862e-09 1.00000000
[55,] 9.989117e-09 1.997823e-08 0.99999999
[56,] 5.549915e-09 1.109983e-08 0.99999999
[57,] 3.039243e-09 6.078486e-09 1.00000000
[58,] 1.843465e-09 3.686930e-09 1.00000000
[59,] 1.285257e-08 2.570514e-08 0.99999999
[60,] 1.652207e-08 3.304414e-08 0.99999998
[61,] 5.508029e-08 1.101606e-07 0.99999994
[62,] 2.466833e-06 4.933667e-06 0.99999753
[63,] 2.525639e-06 5.051277e-06 0.99999747
[64,] 2.796352e-06 5.592704e-06 0.99999720
[65,] 2.587399e-06 5.174798e-06 0.99999741
[66,] 2.992484e-06 5.984967e-06 0.99999701
[67,] 2.271591e-03 4.543182e-03 0.99772841
[68,] 2.848397e-03 5.696793e-03 0.99715160
[69,] 2.182284e-03 4.364569e-03 0.99781772
[70,] 2.775705e-03 5.551410e-03 0.99722430
[71,] 3.233020e-03 6.466040e-03 0.99676698
[72,] 2.531290e-03 5.062580e-03 0.99746871
[73,] 4.070602e-03 8.141204e-03 0.99592940
[74,] 3.181245e-03 6.362490e-03 0.99681876
[75,] 2.533182e-03 5.066363e-03 0.99746682
[76,] 2.005318e-03 4.010635e-03 0.99799468
[77,] 2.418496e-03 4.836993e-03 0.99758150
[78,] 1.964093e-03 3.928186e-03 0.99803591
[79,] 1.514991e-03 3.029983e-03 0.99848501
[80,] 1.079692e-03 2.159384e-03 0.99892031
[81,] 7.664881e-04 1.532976e-03 0.99923351
[82,] 7.075013e-04 1.415003e-03 0.99929250
[83,] 4.974649e-04 9.949298e-04 0.99950254
[84,] 3.542691e-04 7.085382e-04 0.99964573
[85,] 2.616865e-04 5.233730e-04 0.99973831
[86,] 2.244310e-04 4.488620e-04 0.99977557
[87,] 1.590636e-04 3.181273e-04 0.99984094
[88,] 1.108157e-04 2.216314e-04 0.99988918
[89,] 9.585081e-05 1.917016e-04 0.99990415
[90,] 7.337251e-05 1.467450e-04 0.99992663
[91,] 1.121797e-04 2.243594e-04 0.99988782
[92,] 3.124974e-04 6.249948e-04 0.99968750
[93,] 9.103529e-04 1.820706e-03 0.99908965
[94,] 2.813845e-02 5.627690e-02 0.97186155
[95,] 2.356681e-02 4.713363e-02 0.97643319
[96,] 2.318825e-02 4.637650e-02 0.97681175
[97,] 1.940660e-02 3.881320e-02 0.98059340
[98,] 1.570764e-02 3.141528e-02 0.98429236
[99,] 1.242826e-02 2.485652e-02 0.98757174
[100,] 1.035088e-02 2.070175e-02 0.98964912
[101,] 7.903756e-03 1.580751e-02 0.99209624
[102,] 6.447644e-03 1.289529e-02 0.99355236
[103,] 9.316290e-03 1.863258e-02 0.99068371
[104,] 1.181802e-02 2.363604e-02 0.98818198
[105,] 9.076808e-03 1.815362e-02 0.99092319
[106,] 6.926839e-03 1.385368e-02 0.99307316
[107,] 5.931563e-03 1.186313e-02 0.99406844
[108,] 8.540599e-03 1.708120e-02 0.99145940
[109,] 6.770760e-03 1.354152e-02 0.99322924
[110,] 5.266285e-03 1.053257e-02 0.99473372
[111,] 3.991976e-03 7.983952e-03 0.99600802
[112,] 3.030953e-03 6.061905e-03 0.99696905
[113,] 1.353278e-02 2.706555e-02 0.98646722
[114,] 1.755272e-02 3.510544e-02 0.98244728
[115,] 1.927420e-02 3.854839e-02 0.98072580
[116,] 1.491123e-02 2.982247e-02 0.98508877
[117,] 1.846767e-02 3.693535e-02 0.98153233
[118,] 1.434941e-02 2.869882e-02 0.98565059
[119,] 1.094923e-02 2.189847e-02 0.98905077
[120,] 8.311524e-03 1.662305e-02 0.99168848
[121,] 7.476316e-03 1.495263e-02 0.99252368
[122,] 5.700278e-03 1.140056e-02 0.99429972
[123,] 5.305383e-03 1.061077e-02 0.99469462
[124,] 4.045804e-03 8.091608e-03 0.99595420
[125,] 3.489494e-03 6.978989e-03 0.99651051
[126,] 2.622154e-03 5.244308e-03 0.99737785
[127,] 2.211186e-03 4.422371e-03 0.99778881
[128,] 1.585498e-03 3.170997e-03 0.99841450
[129,] 1.873710e-03 3.747420e-03 0.99812629
[130,] 1.895771e-03 3.791541e-03 0.99810423
[131,] 1.991282e-03 3.982563e-03 0.99800872
[132,] 2.057250e-03 4.114501e-03 0.99794275
[133,] 2.416650e-03 4.833299e-03 0.99758335
[134,] 1.836554e-03 3.673107e-03 0.99816345
[135,] 2.857595e-03 5.715190e-03 0.99714241
[136,] 2.273118e-03 4.546235e-03 0.99772688
[137,] 3.982119e-03 7.964238e-03 0.99601788
[138,] 2.984214e-03 5.968428e-03 0.99701579
[139,] 1.451851e-02 2.903702e-02 0.98548149
[140,] 1.246220e-02 2.492440e-02 0.98753780
[141,] 9.437434e-03 1.887487e-02 0.99056257
[142,] 7.572739e-03 1.514548e-02 0.99242726
[143,] 1.201570e-02 2.403140e-02 0.98798430
[144,] 8.924294e-03 1.784859e-02 0.99107571
[145,] 1.089205e-02 2.178409e-02 0.98910795
[146,] 6.887042e-01 6.225915e-01 0.31129577
[147,] 6.435620e-01 7.128760e-01 0.35643802
[148,] 6.491436e-01 7.017129e-01 0.35085645
[149,] 5.989447e-01 8.021106e-01 0.40105531
[150,] 5.501467e-01 8.997067e-01 0.44985333
[151,] 7.016535e-01 5.966930e-01 0.29834649
[152,] 6.778447e-01 6.443105e-01 0.32215527
[153,] 6.263735e-01 7.472530e-01 0.37362652
[154,] 5.713767e-01 8.572466e-01 0.42862331
[155,] 5.523024e-01 8.953953e-01 0.44769764
[156,] 5.066157e-01 9.867687e-01 0.49338433
[157,] 4.555771e-01 9.111542e-01 0.54442289
[158,] 5.861133e-01 8.277735e-01 0.41388674
[159,] 9.408430e-01 1.183141e-01 0.05915705
[160,] 9.341620e-01 1.316761e-01 0.06583803
[161,] 9.477014e-01 1.045972e-01 0.05229861
[162,] 9.731516e-01 5.369684e-02 0.02684842
[163,] 9.637800e-01 7.244006e-02 0.03622003
[164,] 9.740072e-01 5.198551e-02 0.02599275
[165,] 9.615990e-01 7.680191e-02 0.03840095
[166,] 9.476097e-01 1.047807e-01 0.05239035
[167,] 9.285429e-01 1.429141e-01 0.07145706
[168,] 9.180903e-01 1.638195e-01 0.08190974
[169,] 8.902981e-01 2.194038e-01 0.10970188
[170,] 8.790385e-01 2.419230e-01 0.12096150
[171,] 8.520255e-01 2.959491e-01 0.14797454
[172,] 7.925264e-01 4.149473e-01 0.20747364
[173,] 7.229922e-01 5.540157e-01 0.27700784
[174,] 6.551731e-01 6.896538e-01 0.34482689
[175,] 5.869765e-01 8.260470e-01 0.41302349
[176,] 5.313236e-01 9.373529e-01 0.46867645
[177,] 4.196976e-01 8.393953e-01 0.58030236
[178,] 4.250575e-01 8.501149e-01 0.57494253
[179,] 3.650488e-01 7.300977e-01 0.63495116
[180,] 2.564128e-01 5.128256e-01 0.74358722
> postscript(file="/var/wessaorg/rcomp/tmp/1ojom1386099838.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/wessaorg/rcomp/tmp/2t1p71386099838.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/wessaorg/rcomp/tmp/3uwxu1386099838.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/wessaorg/rcomp/tmp/47x5k1386099838.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/wessaorg/rcomp/tmp/5zexl1386099838.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 = 195
Frequency = 1
1 2 3 4 5 6
-8.3103112 -23.6379761 -24.6520555 -16.5398610 -18.3678124 -29.0739397
7 8 9 10 11 12
-25.6861047 -29.6606588 -22.6193499 -21.6020217 -24.4774284 -22.8256653
13 14 15 16 17 18
-23.4814931 1.5155777 12.9752035 -2.1907172 -15.2558434 16.4437824
19 20 21 22 23 24
16.3006743 -5.9894025 17.4879895 10.1034264 23.4028442 25.6371752
25 26 27 28 29 30
25.2625905 -22.6916763 27.3416176 -3.6061939 3.0219496 17.2900349
31 32 33 34 35 36
-4.1149650 0.9110973 -0.6991691 4.0832119 5.4585743 4.1398526
37 38 39 40 41 42
-9.7026488 -6.3813448 -3.1430932 3.4474901 1.5098674 -4.3001995
43 44 45 46 47 48
17.1915840 19.4572479 24.0295500 24.3889918 24.8200775 50.5326933
49 50 51 52 53 54
-12.3629755 -17.0004010 -18.4770709 -4.1580559 -16.8854394 -5.5308892
55 56 57 58 59 60
-19.7060346 -13.0933961 -20.8312611 -22.3940926 -13.9948949 -24.2812564
61 62 63 64 65 66
36.4716077 54.5827338 15.5811007 13.8691994 16.5780127 55.9105377
67 68 69 70 71 72
16.1191745 20.5855590 38.1224270 21.8020977 21.0003781 17.2128710
73 74 75 76 77 78
-26.7718783 -79.5110303 -29.1358833 -17.5428720 -30.1624461 -28.5176611
79 80 81 82 83 84
-18.6717363 3.7441939 -14.7470095 -11.5407614 -17.7826210 -27.9928340
85 86 87 88 89 90
24.4117065 -3.1850693 4.4782440 3.2764580 27.9812918 -0.9350077
91 92 93 94 95 96
9.5710104 -11.9439069 -17.1156231 14.7329952 14.4609183 -14.8905220
97 98 99 100 101 102
-10.7583546 8.0908976 24.0234314 30.5005509 85.1542107 16.6337202
103 104 105 106 107 108
7.1616659 13.0486070 -10.5723885 -9.6093903 -14.8261924 -5.8562046
109 110 111 112 113 114
-13.3610989 41.6527959 38.7645394 6.3083810 0.9489928 17.8015472
115 116 117 118 119 120
42.1864384 -8.8637357 -10.5534484 -7.3881432 7.1247579 64.0026314
121 122 123 124 125 126
-40.4194587 30.5107787 -3.8264058 36.8693286 6.1198604 2.2641136
127 128 129 130 131 132
-5.4339048 21.1150431 -11.7803704 -24.7588945 -12.1905541 -20.8040635
133 134 135 136 137 138
-11.5819223 -20.3478706 -8.5294174 -32.1905709 -27.3695357 -27.6802473
139 140 141 142 143 144
-27.0601102 -30.4741402 13.8601619 42.6529098 17.5271247 43.9147257
145 146 147 148 149 150
11.1275453 62.3684762 -11.6012197 -1.8233662 -9.8855597 -47.6562474
151 152 153 154 155 156
-7.9678112 -32.0377925 -23.7389520 -0.3580002 5.7147938 -8.6857480
157 158 159 160 161 162
0.8226760 51.6734010 11.3611972 -8.0997035 -6.7599339 -19.8902141
163 164 165 166 167 168
-3.7567279 -13.9253201 3.2648595 65.2072429 18.7124911 32.9689031
169 170 171 172 173 174
34.8903079 22.5156306 21.5664655 -28.2634021 -26.6048395 -23.1109087
175 176 177 178 179 180
-26.0473359 -26.1929327 -27.5506455 -12.9023466 -17.8227948 -10.7511033
181 182 183 184 185 186
-13.1925646 -14.0751114 -20.8601124 -20.5434234 -27.3385557 -26.9936975
187 188 189 190 191 192
-71.4121637 -82.4923242 -16.7643576 32.9067958 18.0265633 48.8319204
193 194 195
46.0189096 25.7685111 54.2846742
> postscript(file="/var/wessaorg/rcomp/tmp/675ht1386099838.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 = 195
Frequency = 1
lag(myerror, k = 1) myerror
0 -8.3103112 NA
1 -23.6379761 -8.3103112
2 -24.6520555 -23.6379761
3 -16.5398610 -24.6520555
4 -18.3678124 -16.5398610
5 -29.0739397 -18.3678124
6 -25.6861047 -29.0739397
7 -29.6606588 -25.6861047
8 -22.6193499 -29.6606588
9 -21.6020217 -22.6193499
10 -24.4774284 -21.6020217
11 -22.8256653 -24.4774284
12 -23.4814931 -22.8256653
13 1.5155777 -23.4814931
14 12.9752035 1.5155777
15 -2.1907172 12.9752035
16 -15.2558434 -2.1907172
17 16.4437824 -15.2558434
18 16.3006743 16.4437824
19 -5.9894025 16.3006743
20 17.4879895 -5.9894025
21 10.1034264 17.4879895
22 23.4028442 10.1034264
23 25.6371752 23.4028442
24 25.2625905 25.6371752
25 -22.6916763 25.2625905
26 27.3416176 -22.6916763
27 -3.6061939 27.3416176
28 3.0219496 -3.6061939
29 17.2900349 3.0219496
30 -4.1149650 17.2900349
31 0.9110973 -4.1149650
32 -0.6991691 0.9110973
33 4.0832119 -0.6991691
34 5.4585743 4.0832119
35 4.1398526 5.4585743
36 -9.7026488 4.1398526
37 -6.3813448 -9.7026488
38 -3.1430932 -6.3813448
39 3.4474901 -3.1430932
40 1.5098674 3.4474901
41 -4.3001995 1.5098674
42 17.1915840 -4.3001995
43 19.4572479 17.1915840
44 24.0295500 19.4572479
45 24.3889918 24.0295500
46 24.8200775 24.3889918
47 50.5326933 24.8200775
48 -12.3629755 50.5326933
49 -17.0004010 -12.3629755
50 -18.4770709 -17.0004010
51 -4.1580559 -18.4770709
52 -16.8854394 -4.1580559
53 -5.5308892 -16.8854394
54 -19.7060346 -5.5308892
55 -13.0933961 -19.7060346
56 -20.8312611 -13.0933961
57 -22.3940926 -20.8312611
58 -13.9948949 -22.3940926
59 -24.2812564 -13.9948949
60 36.4716077 -24.2812564
61 54.5827338 36.4716077
62 15.5811007 54.5827338
63 13.8691994 15.5811007
64 16.5780127 13.8691994
65 55.9105377 16.5780127
66 16.1191745 55.9105377
67 20.5855590 16.1191745
68 38.1224270 20.5855590
69 21.8020977 38.1224270
70 21.0003781 21.8020977
71 17.2128710 21.0003781
72 -26.7718783 17.2128710
73 -79.5110303 -26.7718783
74 -29.1358833 -79.5110303
75 -17.5428720 -29.1358833
76 -30.1624461 -17.5428720
77 -28.5176611 -30.1624461
78 -18.6717363 -28.5176611
79 3.7441939 -18.6717363
80 -14.7470095 3.7441939
81 -11.5407614 -14.7470095
82 -17.7826210 -11.5407614
83 -27.9928340 -17.7826210
84 24.4117065 -27.9928340
85 -3.1850693 24.4117065
86 4.4782440 -3.1850693
87 3.2764580 4.4782440
88 27.9812918 3.2764580
89 -0.9350077 27.9812918
90 9.5710104 -0.9350077
91 -11.9439069 9.5710104
92 -17.1156231 -11.9439069
93 14.7329952 -17.1156231
94 14.4609183 14.7329952
95 -14.8905220 14.4609183
96 -10.7583546 -14.8905220
97 8.0908976 -10.7583546
98 24.0234314 8.0908976
99 30.5005509 24.0234314
100 85.1542107 30.5005509
101 16.6337202 85.1542107
102 7.1616659 16.6337202
103 13.0486070 7.1616659
104 -10.5723885 13.0486070
105 -9.6093903 -10.5723885
106 -14.8261924 -9.6093903
107 -5.8562046 -14.8261924
108 -13.3610989 -5.8562046
109 41.6527959 -13.3610989
110 38.7645394 41.6527959
111 6.3083810 38.7645394
112 0.9489928 6.3083810
113 17.8015472 0.9489928
114 42.1864384 17.8015472
115 -8.8637357 42.1864384
116 -10.5534484 -8.8637357
117 -7.3881432 -10.5534484
118 7.1247579 -7.3881432
119 64.0026314 7.1247579
120 -40.4194587 64.0026314
121 30.5107787 -40.4194587
122 -3.8264058 30.5107787
123 36.8693286 -3.8264058
124 6.1198604 36.8693286
125 2.2641136 6.1198604
126 -5.4339048 2.2641136
127 21.1150431 -5.4339048
128 -11.7803704 21.1150431
129 -24.7588945 -11.7803704
130 -12.1905541 -24.7588945
131 -20.8040635 -12.1905541
132 -11.5819223 -20.8040635
133 -20.3478706 -11.5819223
134 -8.5294174 -20.3478706
135 -32.1905709 -8.5294174
136 -27.3695357 -32.1905709
137 -27.6802473 -27.3695357
138 -27.0601102 -27.6802473
139 -30.4741402 -27.0601102
140 13.8601619 -30.4741402
141 42.6529098 13.8601619
142 17.5271247 42.6529098
143 43.9147257 17.5271247
144 11.1275453 43.9147257
145 62.3684762 11.1275453
146 -11.6012197 62.3684762
147 -1.8233662 -11.6012197
148 -9.8855597 -1.8233662
149 -47.6562474 -9.8855597
150 -7.9678112 -47.6562474
151 -32.0377925 -7.9678112
152 -23.7389520 -32.0377925
153 -0.3580002 -23.7389520
154 5.7147938 -0.3580002
155 -8.6857480 5.7147938
156 0.8226760 -8.6857480
157 51.6734010 0.8226760
158 11.3611972 51.6734010
159 -8.0997035 11.3611972
160 -6.7599339 -8.0997035
161 -19.8902141 -6.7599339
162 -3.7567279 -19.8902141
163 -13.9253201 -3.7567279
164 3.2648595 -13.9253201
165 65.2072429 3.2648595
166 18.7124911 65.2072429
167 32.9689031 18.7124911
168 34.8903079 32.9689031
169 22.5156306 34.8903079
170 21.5664655 22.5156306
171 -28.2634021 21.5664655
172 -26.6048395 -28.2634021
173 -23.1109087 -26.6048395
174 -26.0473359 -23.1109087
175 -26.1929327 -26.0473359
176 -27.5506455 -26.1929327
177 -12.9023466 -27.5506455
178 -17.8227948 -12.9023466
179 -10.7511033 -17.8227948
180 -13.1925646 -10.7511033
181 -14.0751114 -13.1925646
182 -20.8601124 -14.0751114
183 -20.5434234 -20.8601124
184 -27.3385557 -20.5434234
185 -26.9936975 -27.3385557
186 -71.4121637 -26.9936975
187 -82.4923242 -71.4121637
188 -16.7643576 -82.4923242
189 32.9067958 -16.7643576
190 18.0265633 32.9067958
191 48.8319204 18.0265633
192 46.0189096 48.8319204
193 25.7685111 46.0189096
194 54.2846742 25.7685111
195 NA 54.2846742
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -23.6379761 -8.3103112
[2,] -24.6520555 -23.6379761
[3,] -16.5398610 -24.6520555
[4,] -18.3678124 -16.5398610
[5,] -29.0739397 -18.3678124
[6,] -25.6861047 -29.0739397
[7,] -29.6606588 -25.6861047
[8,] -22.6193499 -29.6606588
[9,] -21.6020217 -22.6193499
[10,] -24.4774284 -21.6020217
[11,] -22.8256653 -24.4774284
[12,] -23.4814931 -22.8256653
[13,] 1.5155777 -23.4814931
[14,] 12.9752035 1.5155777
[15,] -2.1907172 12.9752035
[16,] -15.2558434 -2.1907172
[17,] 16.4437824 -15.2558434
[18,] 16.3006743 16.4437824
[19,] -5.9894025 16.3006743
[20,] 17.4879895 -5.9894025
[21,] 10.1034264 17.4879895
[22,] 23.4028442 10.1034264
[23,] 25.6371752 23.4028442
[24,] 25.2625905 25.6371752
[25,] -22.6916763 25.2625905
[26,] 27.3416176 -22.6916763
[27,] -3.6061939 27.3416176
[28,] 3.0219496 -3.6061939
[29,] 17.2900349 3.0219496
[30,] -4.1149650 17.2900349
[31,] 0.9110973 -4.1149650
[32,] -0.6991691 0.9110973
[33,] 4.0832119 -0.6991691
[34,] 5.4585743 4.0832119
[35,] 4.1398526 5.4585743
[36,] -9.7026488 4.1398526
[37,] -6.3813448 -9.7026488
[38,] -3.1430932 -6.3813448
[39,] 3.4474901 -3.1430932
[40,] 1.5098674 3.4474901
[41,] -4.3001995 1.5098674
[42,] 17.1915840 -4.3001995
[43,] 19.4572479 17.1915840
[44,] 24.0295500 19.4572479
[45,] 24.3889918 24.0295500
[46,] 24.8200775 24.3889918
[47,] 50.5326933 24.8200775
[48,] -12.3629755 50.5326933
[49,] -17.0004010 -12.3629755
[50,] -18.4770709 -17.0004010
[51,] -4.1580559 -18.4770709
[52,] -16.8854394 -4.1580559
[53,] -5.5308892 -16.8854394
[54,] -19.7060346 -5.5308892
[55,] -13.0933961 -19.7060346
[56,] -20.8312611 -13.0933961
[57,] -22.3940926 -20.8312611
[58,] -13.9948949 -22.3940926
[59,] -24.2812564 -13.9948949
[60,] 36.4716077 -24.2812564
[61,] 54.5827338 36.4716077
[62,] 15.5811007 54.5827338
[63,] 13.8691994 15.5811007
[64,] 16.5780127 13.8691994
[65,] 55.9105377 16.5780127
[66,] 16.1191745 55.9105377
[67,] 20.5855590 16.1191745
[68,] 38.1224270 20.5855590
[69,] 21.8020977 38.1224270
[70,] 21.0003781 21.8020977
[71,] 17.2128710 21.0003781
[72,] -26.7718783 17.2128710
[73,] -79.5110303 -26.7718783
[74,] -29.1358833 -79.5110303
[75,] -17.5428720 -29.1358833
[76,] -30.1624461 -17.5428720
[77,] -28.5176611 -30.1624461
[78,] -18.6717363 -28.5176611
[79,] 3.7441939 -18.6717363
[80,] -14.7470095 3.7441939
[81,] -11.5407614 -14.7470095
[82,] -17.7826210 -11.5407614
[83,] -27.9928340 -17.7826210
[84,] 24.4117065 -27.9928340
[85,] -3.1850693 24.4117065
[86,] 4.4782440 -3.1850693
[87,] 3.2764580 4.4782440
[88,] 27.9812918 3.2764580
[89,] -0.9350077 27.9812918
[90,] 9.5710104 -0.9350077
[91,] -11.9439069 9.5710104
[92,] -17.1156231 -11.9439069
[93,] 14.7329952 -17.1156231
[94,] 14.4609183 14.7329952
[95,] -14.8905220 14.4609183
[96,] -10.7583546 -14.8905220
[97,] 8.0908976 -10.7583546
[98,] 24.0234314 8.0908976
[99,] 30.5005509 24.0234314
[100,] 85.1542107 30.5005509
[101,] 16.6337202 85.1542107
[102,] 7.1616659 16.6337202
[103,] 13.0486070 7.1616659
[104,] -10.5723885 13.0486070
[105,] -9.6093903 -10.5723885
[106,] -14.8261924 -9.6093903
[107,] -5.8562046 -14.8261924
[108,] -13.3610989 -5.8562046
[109,] 41.6527959 -13.3610989
[110,] 38.7645394 41.6527959
[111,] 6.3083810 38.7645394
[112,] 0.9489928 6.3083810
[113,] 17.8015472 0.9489928
[114,] 42.1864384 17.8015472
[115,] -8.8637357 42.1864384
[116,] -10.5534484 -8.8637357
[117,] -7.3881432 -10.5534484
[118,] 7.1247579 -7.3881432
[119,] 64.0026314 7.1247579
[120,] -40.4194587 64.0026314
[121,] 30.5107787 -40.4194587
[122,] -3.8264058 30.5107787
[123,] 36.8693286 -3.8264058
[124,] 6.1198604 36.8693286
[125,] 2.2641136 6.1198604
[126,] -5.4339048 2.2641136
[127,] 21.1150431 -5.4339048
[128,] -11.7803704 21.1150431
[129,] -24.7588945 -11.7803704
[130,] -12.1905541 -24.7588945
[131,] -20.8040635 -12.1905541
[132,] -11.5819223 -20.8040635
[133,] -20.3478706 -11.5819223
[134,] -8.5294174 -20.3478706
[135,] -32.1905709 -8.5294174
[136,] -27.3695357 -32.1905709
[137,] -27.6802473 -27.3695357
[138,] -27.0601102 -27.6802473
[139,] -30.4741402 -27.0601102
[140,] 13.8601619 -30.4741402
[141,] 42.6529098 13.8601619
[142,] 17.5271247 42.6529098
[143,] 43.9147257 17.5271247
[144,] 11.1275453 43.9147257
[145,] 62.3684762 11.1275453
[146,] -11.6012197 62.3684762
[147,] -1.8233662 -11.6012197
[148,] -9.8855597 -1.8233662
[149,] -47.6562474 -9.8855597
[150,] -7.9678112 -47.6562474
[151,] -32.0377925 -7.9678112
[152,] -23.7389520 -32.0377925
[153,] -0.3580002 -23.7389520
[154,] 5.7147938 -0.3580002
[155,] -8.6857480 5.7147938
[156,] 0.8226760 -8.6857480
[157,] 51.6734010 0.8226760
[158,] 11.3611972 51.6734010
[159,] -8.0997035 11.3611972
[160,] -6.7599339 -8.0997035
[161,] -19.8902141 -6.7599339
[162,] -3.7567279 -19.8902141
[163,] -13.9253201 -3.7567279
[164,] 3.2648595 -13.9253201
[165,] 65.2072429 3.2648595
[166,] 18.7124911 65.2072429
[167,] 32.9689031 18.7124911
[168,] 34.8903079 32.9689031
[169,] 22.5156306 34.8903079
[170,] 21.5664655 22.5156306
[171,] -28.2634021 21.5664655
[172,] -26.6048395 -28.2634021
[173,] -23.1109087 -26.6048395
[174,] -26.0473359 -23.1109087
[175,] -26.1929327 -26.0473359
[176,] -27.5506455 -26.1929327
[177,] -12.9023466 -27.5506455
[178,] -17.8227948 -12.9023466
[179,] -10.7511033 -17.8227948
[180,] -13.1925646 -10.7511033
[181,] -14.0751114 -13.1925646
[182,] -20.8601124 -14.0751114
[183,] -20.5434234 -20.8601124
[184,] -27.3385557 -20.5434234
[185,] -26.9936975 -27.3385557
[186,] -71.4121637 -26.9936975
[187,] -82.4923242 -71.4121637
[188,] -16.7643576 -82.4923242
[189,] 32.9067958 -16.7643576
[190,] 18.0265633 32.9067958
[191,] 48.8319204 18.0265633
[192,] 46.0189096 48.8319204
[193,] 25.7685111 46.0189096
[194,] 54.2846742 25.7685111
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -23.6379761 -8.3103112
2 -24.6520555 -23.6379761
3 -16.5398610 -24.6520555
4 -18.3678124 -16.5398610
5 -29.0739397 -18.3678124
6 -25.6861047 -29.0739397
7 -29.6606588 -25.6861047
8 -22.6193499 -29.6606588
9 -21.6020217 -22.6193499
10 -24.4774284 -21.6020217
11 -22.8256653 -24.4774284
12 -23.4814931 -22.8256653
13 1.5155777 -23.4814931
14 12.9752035 1.5155777
15 -2.1907172 12.9752035
16 -15.2558434 -2.1907172
17 16.4437824 -15.2558434
18 16.3006743 16.4437824
19 -5.9894025 16.3006743
20 17.4879895 -5.9894025
21 10.1034264 17.4879895
22 23.4028442 10.1034264
23 25.6371752 23.4028442
24 25.2625905 25.6371752
25 -22.6916763 25.2625905
26 27.3416176 -22.6916763
27 -3.6061939 27.3416176
28 3.0219496 -3.6061939
29 17.2900349 3.0219496
30 -4.1149650 17.2900349
31 0.9110973 -4.1149650
32 -0.6991691 0.9110973
33 4.0832119 -0.6991691
34 5.4585743 4.0832119
35 4.1398526 5.4585743
36 -9.7026488 4.1398526
37 -6.3813448 -9.7026488
38 -3.1430932 -6.3813448
39 3.4474901 -3.1430932
40 1.5098674 3.4474901
41 -4.3001995 1.5098674
42 17.1915840 -4.3001995
43 19.4572479 17.1915840
44 24.0295500 19.4572479
45 24.3889918 24.0295500
46 24.8200775 24.3889918
47 50.5326933 24.8200775
48 -12.3629755 50.5326933
49 -17.0004010 -12.3629755
50 -18.4770709 -17.0004010
51 -4.1580559 -18.4770709
52 -16.8854394 -4.1580559
53 -5.5308892 -16.8854394
54 -19.7060346 -5.5308892
55 -13.0933961 -19.7060346
56 -20.8312611 -13.0933961
57 -22.3940926 -20.8312611
58 -13.9948949 -22.3940926
59 -24.2812564 -13.9948949
60 36.4716077 -24.2812564
61 54.5827338 36.4716077
62 15.5811007 54.5827338
63 13.8691994 15.5811007
64 16.5780127 13.8691994
65 55.9105377 16.5780127
66 16.1191745 55.9105377
67 20.5855590 16.1191745
68 38.1224270 20.5855590
69 21.8020977 38.1224270
70 21.0003781 21.8020977
71 17.2128710 21.0003781
72 -26.7718783 17.2128710
73 -79.5110303 -26.7718783
74 -29.1358833 -79.5110303
75 -17.5428720 -29.1358833
76 -30.1624461 -17.5428720
77 -28.5176611 -30.1624461
78 -18.6717363 -28.5176611
79 3.7441939 -18.6717363
80 -14.7470095 3.7441939
81 -11.5407614 -14.7470095
82 -17.7826210 -11.5407614
83 -27.9928340 -17.7826210
84 24.4117065 -27.9928340
85 -3.1850693 24.4117065
86 4.4782440 -3.1850693
87 3.2764580 4.4782440
88 27.9812918 3.2764580
89 -0.9350077 27.9812918
90 9.5710104 -0.9350077
91 -11.9439069 9.5710104
92 -17.1156231 -11.9439069
93 14.7329952 -17.1156231
94 14.4609183 14.7329952
95 -14.8905220 14.4609183
96 -10.7583546 -14.8905220
97 8.0908976 -10.7583546
98 24.0234314 8.0908976
99 30.5005509 24.0234314
100 85.1542107 30.5005509
101 16.6337202 85.1542107
102 7.1616659 16.6337202
103 13.0486070 7.1616659
104 -10.5723885 13.0486070
105 -9.6093903 -10.5723885
106 -14.8261924 -9.6093903
107 -5.8562046 -14.8261924
108 -13.3610989 -5.8562046
109 41.6527959 -13.3610989
110 38.7645394 41.6527959
111 6.3083810 38.7645394
112 0.9489928 6.3083810
113 17.8015472 0.9489928
114 42.1864384 17.8015472
115 -8.8637357 42.1864384
116 -10.5534484 -8.8637357
117 -7.3881432 -10.5534484
118 7.1247579 -7.3881432
119 64.0026314 7.1247579
120 -40.4194587 64.0026314
121 30.5107787 -40.4194587
122 -3.8264058 30.5107787
123 36.8693286 -3.8264058
124 6.1198604 36.8693286
125 2.2641136 6.1198604
126 -5.4339048 2.2641136
127 21.1150431 -5.4339048
128 -11.7803704 21.1150431
129 -24.7588945 -11.7803704
130 -12.1905541 -24.7588945
131 -20.8040635 -12.1905541
132 -11.5819223 -20.8040635
133 -20.3478706 -11.5819223
134 -8.5294174 -20.3478706
135 -32.1905709 -8.5294174
136 -27.3695357 -32.1905709
137 -27.6802473 -27.3695357
138 -27.0601102 -27.6802473
139 -30.4741402 -27.0601102
140 13.8601619 -30.4741402
141 42.6529098 13.8601619
142 17.5271247 42.6529098
143 43.9147257 17.5271247
144 11.1275453 43.9147257
145 62.3684762 11.1275453
146 -11.6012197 62.3684762
147 -1.8233662 -11.6012197
148 -9.8855597 -1.8233662
149 -47.6562474 -9.8855597
150 -7.9678112 -47.6562474
151 -32.0377925 -7.9678112
152 -23.7389520 -32.0377925
153 -0.3580002 -23.7389520
154 5.7147938 -0.3580002
155 -8.6857480 5.7147938
156 0.8226760 -8.6857480
157 51.6734010 0.8226760
158 11.3611972 51.6734010
159 -8.0997035 11.3611972
160 -6.7599339 -8.0997035
161 -19.8902141 -6.7599339
162 -3.7567279 -19.8902141
163 -13.9253201 -3.7567279
164 3.2648595 -13.9253201
165 65.2072429 3.2648595
166 18.7124911 65.2072429
167 32.9689031 18.7124911
168 34.8903079 32.9689031
169 22.5156306 34.8903079
170 21.5664655 22.5156306
171 -28.2634021 21.5664655
172 -26.6048395 -28.2634021
173 -23.1109087 -26.6048395
174 -26.0473359 -23.1109087
175 -26.1929327 -26.0473359
176 -27.5506455 -26.1929327
177 -12.9023466 -27.5506455
178 -17.8227948 -12.9023466
179 -10.7511033 -17.8227948
180 -13.1925646 -10.7511033
181 -14.0751114 -13.1925646
182 -20.8601124 -14.0751114
183 -20.5434234 -20.8601124
184 -27.3385557 -20.5434234
185 -26.9936975 -27.3385557
186 -71.4121637 -26.9936975
187 -82.4923242 -71.4121637
188 -16.7643576 -82.4923242
189 32.9067958 -16.7643576
190 18.0265633 32.9067958
191 48.8319204 18.0265633
192 46.0189096 48.8319204
193 25.7685111 46.0189096
194 54.2846742 25.7685111
> 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/wessaorg/rcomp/tmp/7sh931386099838.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/wessaorg/rcomp/tmp/8ee651386099838.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/wessaorg/rcomp/tmp/99pja1386099838.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/wessaorg/rcomp/tmp/10ym7t1386099838.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/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/wessaorg/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, signif(mysum$coefficients[i,1],6), 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/wessaorg/rcomp/tmp/11g4xt1386099838.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,signif(mysum$coefficients[i,1],6))
+ a<-table.element(a, signif(mysum$coefficients[i,2],6))
+ a<-table.element(a, signif(mysum$coefficients[i,3],4))
+ a<-table.element(a, signif(mysum$coefficients[i,4],6))
+ a<-table.element(a, signif(mysum$coefficients[i,4]/2,6))
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/12br5e1386099838.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, signif(sqrt(mysum$r.squared),6))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'R-squared',1,TRUE)
> a<-table.element(a, signif(mysum$r.squared,6))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Adjusted R-squared',1,TRUE)
> a<-table.element(a, signif(mysum$adj.r.squared,6))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (value)',1,TRUE)
> a<-table.element(a, signif(mysum$fstatistic[1],6))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
> a<-table.element(a, signif(mysum$fstatistic[2],6))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
> a<-table.element(a, signif(mysum$fstatistic[3],6))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'p-value',1,TRUE)
> a<-table.element(a, signif(1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]),6))
> 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, signif(mysum$sigma,6))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
> a<-table.element(a, signif(sum(myerror*myerror),6))
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/13bn311386099838.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,signif(x[i],6))
+ a<-table.element(a,signif(x[i]-mysum$resid[i],6))
+ a<-table.element(a,signif(mysum$resid[i],6))
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/14inth1386099838.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,signif(gqarr[mypoint-kp3+1,1],6))
+ a<-table.element(a,signif(gqarr[mypoint-kp3+1,2],6))
+ a<-table.element(a,signif(gqarr[mypoint-kp3+1,3],6))
+ a<-table.row.end(a)
+ }
+ a<-table.end(a)
+ table.save(a,file="/var/wessaorg/rcomp/tmp/15mk311386099838.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,signif(numsignificant1,6))
+ a<-table.element(a,signif(numsignificant1/numgqtests,6))
+ 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,signif(numsignificant5,6))
+ a<-table.element(a,signif(numsignificant5/numgqtests,6))
+ 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,signif(numsignificant10,6))
+ a<-table.element(a,signif(numsignificant10/numgqtests,6))
+ 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/wessaorg/rcomp/tmp/16fv971386099838.tab")
+ }
>
> try(system("convert tmp/1ojom1386099838.ps tmp/1ojom1386099838.png",intern=TRUE))
character(0)
> try(system("convert tmp/2t1p71386099838.ps tmp/2t1p71386099838.png",intern=TRUE))
character(0)
> try(system("convert tmp/3uwxu1386099838.ps tmp/3uwxu1386099838.png",intern=TRUE))
character(0)
> try(system("convert tmp/47x5k1386099838.ps tmp/47x5k1386099838.png",intern=TRUE))
character(0)
> try(system("convert tmp/5zexl1386099838.ps tmp/5zexl1386099838.png",intern=TRUE))
character(0)
> try(system("convert tmp/675ht1386099838.ps tmp/675ht1386099838.png",intern=TRUE))
character(0)
> try(system("convert tmp/7sh931386099838.ps tmp/7sh931386099838.png",intern=TRUE))
character(0)
> try(system("convert tmp/8ee651386099838.ps tmp/8ee651386099838.png",intern=TRUE))
character(0)
> try(system("convert tmp/99pja1386099838.ps tmp/99pja1386099838.png",intern=TRUE))
character(0)
> try(system("convert tmp/10ym7t1386099838.ps tmp/10ym7t1386099838.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
13.135 2.163 15.284