Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
1 119.992 74.997 0.00007 21.033 0.414783 -4.813031 0.266482 0.284654 1 122.4 113.819 0.00008 19.085 0.458359 -4.075192 0.33559 0.368674 1 116.682 111.555 0.00009 20.651 0.429895 -4.443179 0.311173 0.332634 1 116.676 111.366 0.00009 20.644 0.434969 -4.117501 0.334147 0.368975 1 116.014 110.655 0.00011 19.649 0.417356 -3.747787 0.234513 0.410335 1 120.552 113.787 0.00008 21.378 0.415564 -4.242867 0.299111 0.357775 1 120.267 114.82 0.00003 24.886 0.59604 -5.634322 0.257682 0.211756 1 107.332 104.315 0.00003 26.892 0.63742 -6.167603 0.183721 0.163755 1 95.73 91.754 0.00006 21.812 0.615551 -5.498678 0.327769 0.231571 1 95.056 91.226 0.00006 21.862 0.547037 -5.011879 0.325996 0.271362 1 88.333 84.072 0.00006 21.118 0.611137 -5.24977 0.391002 0.24974 1 91.904 86.292 0.00006 21.414 0.58339 -4.960234 0.363566 0.275931 1 136.926 131.276 0.00002 25.703 0.4606 -6.547148 0.152813 0.138512 1 139.173 76.556 0.00003 24.889 0.430166 -5.660217 0.254989 0.199889 1 152.845 75.836 0.00002 24.922 0.474791 -6.105098 0.203653 0.1701 1 142.167 83.159 0.00003 25.175 0.565924 -5.340115 0.210185 0.234589 1 144.188 82.764 0.00004 22.333 0.56738 -5.44004 0.239764 0.218164 1 168.778 75.603 0.00004 20.376 0.631099 -2.93107 0.434326 0.430788 1 153.046 68.623 0.00005 17.28 0.665318 -3.949079 0.35787 0.377429 1 156.405 142.822 0.00005 17.153 0.649554 -4.554466 0.340176 0.322111 1 153.848 65.782 0.00005 17.536 0.660125 -4.095442 0.262564 0.365391 1 153.88 78.128 0.00003 19.493 0.629017 -5.18696 0.237622 0.259765 1 167.93 79.068 0.00003 22.468 0.61906 -4.330956 0.262384 0.285695 1 173.917 86.18 0.00003 20.422 0.537264 -5.248776 0.210279 0.253556 1 163.656 76.779 0.00005 23.831 0.397937 -5.557447 0.22089 0.215961 1 104.4 77.968 0.00006 22.066 0.522746 -5.571843 0.236853 0.219514 1 171.041 75.501 0.00003 25.908 0.418622 -6.18359 0.226278 0.147403 1 146.845 81.737 0.00003 25.119 0.358773 -6.27169 0.196102 0.162999 1 155.358 80.055 0.00002 25.97 0.470478 -7.120925 0.279789 0.108514 1 162.568 77.63 0.00003 25.678 0.427785 -6.635729 0.209866 0.135242 0 197.076 192.055 0.00001 26.775 0.422229 -7.3483 0.177551 0.085569 0 199.228 192.091 0.00001 30.94 0.432439 -7.682587 0.173319 0.068501 0 198.383 193.104 0.00001 30.775 0.465946 -7.067931 0.175181 0.09632 0 202.266 197.079 0.000009 32.684 0.368535 -7.695734 0.17854 0.056141 0 203.184 196.16 0.000009 33.047 0.340068 -7.964984 0.163519 0.044539 0 201.464 195.708 0.00001 31.732 0.344252 -7.777685 0.170183 0.05761 1 177.876 168.013 0.00002 23.216 0.360148 -6.149653 0.218037 0.165827 1 176.17 163.564 0.00002 24.951 0.341435 -6.006414 0.196371 0.173218 1 180.198 175.456 0.00002 26.738 0.403884 -6.452058 0.212294 0.141929 1 187.733 173.015 0.00002 26.31 0.396793 -6.006647 0.266892 0.160691 1 186.163 177.584 0.00002 26.822 0.32648 -6.647379 0.201095 0.130554 1 184.055 166.977 0.00001 26.453 0.306443 -7.044105 0.063412 0.11573 0 237.226 225.227 0.00001 22.736 0.305062 -7.31055 0.098648 0.095032 0 241.404 232.483 0.00001 23.145 0.457702 -6.793547 0.158266 0.117399 0 243.439 232.435 0.000009 25.368 0.438296 -7.057869 0.091608 0.09147 0 242.852 227.911 0.000009 25.032 0.431285 -6.99582 0.102083 0.102706 0 245.51 231.848 0.00001 24.602 0.467489 -7.156076 0.127642 0.097336 0 252.455 182.786 0.000007 26.805 0.610367 -7.31951 0.200873 0.086398 0 122.188 115.765 0.00004 23.162 0.579597 -6.439398 0.266392 0.133867 0 122.964 114.676 0.00003 24.971 0.538688 -6.482096 0.264967 0.128872 0 124.445 117.495 0.00003 25.135 0.553134 -6.650471 0.254498 0.103561 0 126.344 112.773 0.00004 25.03 0.507504 -6.689151 0.291954 0.105993 0 128.001 122.08 0.00003 24.692 0.459766 -7.072419 0.220434 0.119308 0 129.336 118.604 0.00004 25.429 0.420383 -6.836811 0.269866 0.147491 1 108.807 102.874 0.00007 21.028 0.536009 -4.649573 0.205558 0.3167 1 109.86 104.437 0.00008 20.767 0.558586 -4.333543 0.221727 0.344834 1 110.417 103.37 0.00007 21.422 0.541781 -4.438453 0.238298 0.335041 1 117.274 110.402 0.00006 22.817 0.530529 -4.60826 0.290024 0.314464 1 116.879 108.153 0.00007 22.603 0.540049 -4.476755 0.262633 0.326197 1 114.847 104.68 0.00008 21.66 0.547975 -4.609161 0.221711 0.316395 0 209.144 109.379 0.00001 25.554 0.341788 -7.040508 0.066994 0.101516 0 223.365 98.664 0.00001 26.138 0.447979 -7.293801 0.086372 0.098555 0 222.236 205.495 0.00001 25.856 0.364867 -6.966321 0.095882 0.103224 0 228.832 223.634 0.00001 25.964 0.25657 -7.24562 0.018689 0.093534 0 229.401 221.156 0.000009 26.415 0.27685 -7.496264 0.056844 0.073581 0 228.969 113.201 0.00001 24.547 0.305429 -7.314237 0.006274 0.091546 1 140.341 67.021 0.00006 19.56 0.460139 -5.409423 0.22685 0.226156 1 136.969 66.004 0.00007 19.979 0.498133 -5.324574 0.20566 0.226247 1 143.533 65.809 0.00008 20.338 0.513237 -5.86975 0.151814 0.18558 1 148.09 67.343 0.00005 21.718 0.487407 -6.261141 0.120956 0.141958 1 142.729 65.476 0.00006 20.264 0.489345 -5.720868 0.15883 0.180828 1 136.358 65.75 0.00007 18.57 0.543299 -5.207985 0.224852 0.242981 1 120.08 111.208 0.00003 25.742 0.495954 -5.79182 0.329066 0.18818 1 112.014 107.024 0.00005 24.178 0.509127 -5.389129 0.306636 0.225461 1 110.793 107.316 0.00004 25.438 0.437031 -5.31336 0.201861 0.244512 1 110.707 105.007 0.00005 25.197 0.463514 -5.477592 0.315074 0.228624 1 112.876 106.981 0.00004 23.37 0.489538 -5.775966 0.341169 0.193918 1 110.568 106.821 0.00004 25.82 0.429484 -5.391029 0.250572 0.232744 1 95.385 90.264 0.00006 21.875 0.644954 -5.115212 0.249494 0.260015 1 100.77 85.545 0.0001 19.2 0.594387 -4.913885 0.265699 0.277948 1 96.106 84.51 0.00007 19.055 0.544805 -4.441519 0.155097 0.327978 1 95.605 87.549 0.00007 19.659 0.576084 -5.132032 0.210458 0.260633 1 100.96 95.628 0.00006 20.536 0.55461 -5.022288 0.146948 0.264666 1 98.804 87.804 0.00004 22.244 0.576644 -6.025367 0.078202 0.177275 1 176.858 75.344 0.00004 13.893 0.556494 -5.288912 0.343073 0.242119 1 180.978 155.495 0.00002 16.176 0.583574 -5.657899 0.315903 0.200423 1 178.222 141.047 0.00002 15.924 0.598714 -6.366916 0.335753 0.144614 1 176.281 125.61 0.00003 13.922 0.602874 -5.515071 0.299549 0.220968 1 173.898 74.677 0.00003 14.739 0.599371 -5.783272 0.299793 0.194052 1 179.711 144.878 0.00004 11.866 0.590951 -4.379411 0.375531 0.332086 1 166.605 78.032 0.00004 11.744 0.65341 -4.508984 0.389232 0.301952 1 151.955 147.226 0.00003 19.664 0.501037 -6.411497 0.207156 0.13412 1 148.272 142.299 0.00003 18.78 0.454444 -5.952058 0.08784 0.186489 1 152.125 76.596 0.00003 20.969 0.447456 -6.152551 0.17352 0.160809 1 157.821 68.401 0.00002 22.219 0.50238 -6.251425 0.188056 0.160812 1 157.447 149.605 0.00002 21.693 0.447285 -6.247076 0.180528 0.164916 1 159.116 144.811 0.00002 22.663 0.366329 -6.41744 0.194627 0.151709 1 125.036 116.187 0.0001 15.338 0.629574 -4.020042 0.265315 0.340623 1 125.791 96.206 0.00011 15.433 0.57101 -5.159169 0.202146 0.260375 1 126.512 99.77 0.00015 12.435 0.638545 -3.760348 0.242861 0.378483 1 125.641 116.346 0.00026 8.867 0.671299 -3.700544 0.260481 0.370961 1 128.451 75.632 0.00012 15.06 0.639808 -4.20273 0.310163 0.356881 1 139.224 66.157 0.00022 10.489 0.596362 -3.269487 0.270641 0.444774 1 150.258 75.349 0.00002 26.759 0.296888 -6.878393 0.089267 0.113942 1 154.003 128.621 0.00001 28.409 0.263654 -7.111576 0.14478 0.093193 1 149.689 133.608 0.00002 27.421 0.365488 -6.997403 0.210279 0.112878 1 155.078 144.148 0.00001 29.746 0.334171 -6.981201 0.18455 0.106802 1 151.884 133.751 0.00002 26.833 0.393563 -6.600023 0.249172 0.105306 1 151.989 132.857 0.00001 29.928 0.311369 -6.739151 0.160686 0.11513 1 193.03 80.297 0.00004 21.934 0.497554 -5.845099 0.278679 0.185668 1 200.714 89.686 0.00003 23.239 0.436084 -5.25832 0.256454 0.23252 1 208.519 199.02 0.00003 22.407 0.338097 -6.471427 0.184378 0.13639 1 204.664 189.621 0.00004 21.305 0.498877 -4.876336 0.212054 0.268144 1 210.141 185.258 0.00003 23.671 0.441097 -5.96304 0.250283 0.177807 1 206.327 92.02 0.00002 21.864 0.331508 -6.729713 0.181701 0.115515 1 151.872 69.085 0.00006 23.693 0.407701 -4.673241 0.261549 0.274407 1 158.219 71.948 0.00003 26.356 0.450798 -6.051233 0.27328 0.170106 1 170.756 79.032 0.00003 25.69 0.486738 -4.597834 0.372114 0.28278 1 178.285 82.063 0.00003 25.02 0.470422 -4.913137 0.393056 0.251972 1 217.116 93.978 0.00002 24.581 0.462516 -5.517173 0.389295 0.220657 1 128.94 88.251 0.00005 24.743 0.487756 -6.186128 0.279933 0.152428 1 176.824 83.961 0.00003 27.166 0.400088 -4.711007 0.281618 0.234809 1 138.19 83.34 0.00005 18.305 0.538016 -5.418787 0.160267 0.229892 1 182.018 79.187 0.00005 18.784 0.589956 -5.44514 0.142466 0.215558 1 156.239 79.82 0.00004 19.196 0.618663 -5.944191 0.143359 0.181988 1 145.174 80.637 0.00005 18.857 0.637518 -5.594275 0.12795 0.222716 1 138.145 81.114 0.00004 18.178 0.623209 -5.540351 0.087165 0.214075 1 166.888 79.512 0.00004 18.33 0.585169 -5.825257 0.115697 0.196535 1 119.031 109.216 0.00004 26.842 0.457541 -6.890021 0.152941 0.112856 1 120.078 105.667 0.00002 26.369 0.491345 -5.892061 0.195976 0.183572 1 120.289 100.209 0.00004 23.949 0.46716 -6.135296 0.20363 0.169923 1 120.256 104.773 0.00003 26.017 0.468621 -6.112667 0.217013 0.170633 1 119.056 86.795 0.00003 23.389 0.470972 -5.436135 0.254909 0.232209 1 118.747 109.836 0.00003 25.619 0.482296 -6.448134 0.178713 0.141422 1 106.516 93.105 0.00006 17.06 0.637814 -5.301321 0.320385 0.24308 1 110.453 105.554 0.00004 17.707 0.653427 -5.333619 0.322044 0.228319 1 113.4 107.816 0.00004 19.013 0.6479 -4.378916 0.300067 0.259451 1 113.166 100.673 0.00004 16.747 0.625362 -4.654894 0.304107 0.274387 1 112.239 104.095 0.00004 17.366 0.640945 -5.634576 0.306014 0.209191 1 116.15 109.815 0.00003 18.801 0.624811 -5.866357 0.23307 0.184985 1 170.368 79.543 0.00003 18.54 0.677131 -4.796845 0.397749 0.277227 1 208.083 91.802 0.00004 15.648 0.606344 -5.410336 0.288917 0.231723 1 198.458 148.691 0.00002 18.702 0.606273 -5.585259 0.310746 0.209863 1 202.805 86.232 0.00002 18.687 0.536102 -5.898673 0.213353 0.189032 1 202.544 164.168 0.00001 20.68 0.49748 -6.132663 0.220617 0.159777 1 223.361 87.638 0.00002 20.366 0.566849 -5.456811 0.345238 0.232861 1 169.774 151.451 0.00009 12.359 0.56161 -3.297668 0.414758 0.457533 1 183.52 161.34 0.00008 14.367 0.478024 -4.276605 0.355736 0.336085 1 188.62 165.982 0.00009 12.298 0.55287 -3.377325 0.335357 0.418646 1 202.632 177.258 0.00008 14.989 0.427627 -4.892495 0.262281 0.270173 1 186.695 149.442 0.0001 12.529 0.507826 -4.484303 0.340256 0.301487 1 192.818 168.793 0.00016 8.441 0.625866 -2.434031 0.450493 0.527367 1 198.116 174.478 0.00014 9.449 0.584164 -2.839756 0.356224 0.454721 1 121.345 98.25 0.00006 21.52 0.566867 -4.865194 0.246404 0.168581 1 119.1 88.833 0.00006 21.824 0.65168 -4.239028 0.175691 0.247455 1 117.87 95.654 0.00005 22.431 0.6283 -3.583722 0.207914 0.206256 1 122.336 94.794 0.00006 22.953 0.611679 -5.4351 0.230532 0.220546 1 117.963 100.757 0.00015 19.075 0.630547 -3.444478 0.303214 0.261305 1 126.144 97.543 0.00008 21.534 0.635015 -5.070096 0.280091 0.249703 1 127.93 112.173 0.00005 19.651 0.654945 -5.498456 0.234196 0.216638 1 114.238 77.022 0.00005 20.437 0.653139 -5.185987 0.259229 0.244948 1 115.322 107.802 0.00005 19.388 0.577802 -5.283009 0.226528 0.238281 1 114.554 91.121 0.00006 18.954 0.685151 -5.529833 0.24275 0.22052 1 112.15 97.527 0.00005 21.219 0.557045 -5.617124 0.184896 0.212386 1 102.273 85.902 0.00009 18.447 0.671378 -2.929379 0.396746 0.367233 0 236.2 102.137 0.00001 24.078 0.469928 -6.816086 0.17227 0.119652 0 237.323 229.256 0.00001 24.679 0.384868 -7.018057 0.176316 0.091604 0 260.105 237.303 0.00001 21.083 0.440988 -7.517934 0.160414 0.075587 0 197.569 90.794 0.00004 19.269 0.372222 -5.736781 0.164529 0.202879 0 240.301 219.783 0.00002 21.02 0.371837 -7.169701 0.073298 0.100881 0 244.99 239.17 0.00002 21.528 0.522812 -7.3045 0.171088 0.09622 0 112.547 105.715 0.00003 26.436 0.413295 -6.323531 0.218885 0.160376 0 110.739 100.139 0.00003 26.55 0.36909 -6.085567 0.192375 0.174152 0 113.715 96.913 0.00003 26.547 0.380253 -5.943501 0.19215 0.179677 0 117.004 99.923 0.00003 25.445 0.387482 -6.012559 0.229298 0.163118 0 115.38 108.634 0.00003 26.005 0.405991 -5.966779 0.197938 0.184067 0 116.388 108.97 0.00003 26.143 0.361232 -6.016891 0.109256 0.174429 1 151.737 129.859 0.00002 24.151 0.39661 -6.486822 0.197919 0.132703 1 148.79 138.99 0.00002 24.412 0.402591 -6.311987 0.182459 0.160306 1 148.143 135.041 0.00003 23.683 0.398499 -5.711205 0.240875 0.19273 1 150.44 144.736 0.00003 23.133 0.352396 -6.261446 0.183218 0.144105 1 148.462 141.998 0.00003 22.866 0.408598 -5.704053 0.216204 0.19771 1 149.818 144.786 0.00002 23.008 0.329577 -6.27717 0.109397 0.156368 0 117.226 106.656 0.00004 23.079 0.603515 -5.61907 0.191576 0.215724 0 116.848 99.503 0.00005 22.085 0.663842 -5.198864 0.206768 0.252404 0 116.286 96.983 0.00003 24.199 0.598515 -5.592584 0.133917 0.214346 0 116.556 86.228 0.00004 23.958 0.566424 -6.431119 0.15331 0.120605 0 116.342 94.246 0.00002 25.023 0.528485 -6.359018 0.116636 0.138868 0 114.563 86.647 0.00003 24.775 0.555303 -6.710219 0.149694 0.121777 0 201.774 78.228 0.00003 19.368 0.508479 -6.934474 0.15989 0.112838 0 174.188 94.261 0.00003 19.517 0.448439 -6.538586 0.121952 0.13305 0 209.516 89.488 0.00003 19.147 0.431674 -6.195325 0.129303 0.168895 0 174.688 74.287 0.00008 17.883 0.407567 -6.787197 0.158453 0.131728 0 198.764 74.904 0.00004 19.02 0.451221 -6.744577 0.207454 0.123306 0 214.289 77.973 0.00003 21.209 0.462803 -5.724056 0.190667 0.148569
Names of X columns:
status MDVP:Fo(Hz) MDVP:Flo(Hz) MDVP:Jitter(Abs) HNR RPDE spread1 spread2 PPE
Sample Range:
(leave blank to include all observations)
From:
To:
Column Number of Endogenous Series
(?)
Fixed Seasonal Effects
Do not include Seasonal Dummies
Do not include Seasonal Dummies
Include Seasonal Dummies
Type of Equation
Linear Trend
No Linear Trend
Linear Trend
First Differences
Seasonal Differences (s)
First and Seasonal Differences (s)
Degree of Predetermination (lagged endogenous variables)
Degree of Seasonal Predetermination
Seasonality
12
1
2
3
4
5
6
7
8
9
10
11
12
Chart options
R Code
library(lattice) library(lmtest) n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test mywarning <- '' par1 <- as.numeric(par1) if(is.na(par1)) { par1 <- 1 mywarning = 'Warning: you did not specify the column number of the endogenous series! The first column was selected by default.' } if (par4=='') par4 <- 0 par4 <- as.numeric(par4) if (par5=='') par5 <- 0 par5 <- as.numeric(par5) x <- na.omit(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'){ (n <- n -1) x2 <- array(0, dim=c(n,k), dimnames=list(1:n, paste('(1-B)',colnames(x),sep=''))) for (i in 1:n) { for (j in 1:k) { x2[i,j] <- x[i+1,j] - x[i,j] } } x <- x2 } if (par3 == 'Seasonal Differences (s=12)'){ (n <- n - 12) x2 <- array(0, dim=c(n,k), dimnames=list(1:n, paste('(1-B12)',colnames(x),sep=''))) for (i in 1:n) { for (j in 1:k) { x2[i,j] <- x[i+12,j] - x[i,j] } } x <- x2 } if (par3 == 'First and Seasonal Differences (s=12)'){ (n <- n -1) x2 <- array(0, dim=c(n,k), dimnames=list(1:n, paste('(1-B)',colnames(x),sep=''))) for (i in 1:n) { for (j in 1:k) { x2[i,j] <- x[i+1,j] - x[i,j] } } x <- x2 (n <- n - 12) x2 <- array(0, dim=c(n,k), dimnames=list(1:n, paste('(1-B12)',colnames(x),sep=''))) for (i in 1:n) { for (j in 1:k) { x2[i,j] <- x[i+12,j] - x[i,j] } } x <- x2 } if(par4 > 0) { x2 <- array(0, dim=c(n-par4,par4), dimnames=list(1:(n-par4), paste(colnames(x)[par1],'(t-',1:par4,')',sep=''))) for (i in 1:(n-par4)) { for (j in 1:par4) { x2[i,j] <- x[i+par4-j,par1] } } x <- cbind(x[(par4+1):n,], x2) n <- n - par4 } if(par5 > 0) { x2 <- array(0, dim=c(n-par5*12,par5), dimnames=list(1:(n-par5*12), paste(colnames(x)[par1],'(t-',1:par5,'s)',sep=''))) for (i in 1:(n-par5*12)) { for (j in 1:par5) { x2[i,j] <- x[i+par5*12-j*12,par1] } } x <- cbind(x[(par5*12+1):n,], x2) n <- n - par5*12 } 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[n,])) if (par3 == 'Linear Trend'){ x <- cbind(x, c(1:n)) colnames(x)[k+1] <- 't' } x (k <- length(x[n,])) head(x) df <- as.data.frame(x) (mylm <- lm(df)) (mysum <- summary(mylm)) 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 } bitmap(file='test0.png') 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() bitmap(file='test1.png') plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index') grid() dev.off() bitmap(file='test2.png') hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals') grid() dev.off() bitmap(file='test3.png') densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals') dev.off() bitmap(file='test4.png') qqnorm(mysum$resid, main='Residual Normal Q-Q Plot') qqline(mysum$resid) grid() dev.off() (myerror <- as.ts(mysum$resid)) bitmap(file='test5.png') dum <- cbind(lag(myerror,k=1),myerror) dum dum1 <- dum[2:length(myerror),] dum1 z <- as.data.frame(dum1) z 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() bitmap(file='test6.png') acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function') grid() dev.off() bitmap(file='test7.png') pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function') grid() dev.off() bitmap(file='test8.png') opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) plot(mylm, las = 1, sub='Residual Diagnostics') par(opar) dev.off() if (n > n25) { bitmap(file='test9.png') plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') grid() dev.off() } load(file='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.row.start(a) a<-table.element(a, mywarning) a<-table.row.end(a) a<-table.end(a) table.save(a,file='mytable1.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<br />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,formatC(signif(mysum$coefficients[i,1],5),format='g',flag='+')) a<-table.element(a,formatC(signif(mysum$coefficients[i,2],5),format='g',flag=' ')) a<-table.element(a,formatC(signif(mysum$coefficients[i,3],4),format='e',flag='+')) a<-table.element(a,formatC(signif(mysum$coefficients[i,4],4),format='g',flag=' ')) a<-table.element(a,formatC(signif(mysum$coefficients[i,4]/2,4),format='g',flag=' ')) a<-table.row.end(a) } a<-table.end(a) table.save(a,file='mytable2.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,formatC(signif(sqrt(mysum$r.squared),6),format='g',flag=' ')) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'R-squared',1,TRUE) a<-table.element(a,formatC(signif(mysum$r.squared,6),format='g',flag=' ')) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'Adjusted R-squared',1,TRUE) a<-table.element(a,formatC(signif(mysum$adj.r.squared,6),format='g',flag=' ')) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'F-TEST (value)',1,TRUE) a<-table.element(a,formatC(signif(mysum$fstatistic[1],6),format='g',flag=' ')) 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,formatC(signif(1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]),6),format='g',flag=' ')) 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,formatC(signif(mysum$sigma,6),format='g',flag=' ')) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'Sum Squared Residuals',1,TRUE) a<-table.element(a,formatC(signif(sum(myerror*myerror),6),format='g',flag=' ')) a<-table.row.end(a) a<-table.end(a) table.save(a,file='mytable3.tab') if(n < 200) { 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<br />Forecast', 1, TRUE) a<-table.element(a, 'Residuals<br />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,formatC(signif(x[i],6),format='g',flag=' ')) a<-table.element(a,formatC(signif(x[i]-mysum$resid[i],6),format='g',flag=' ')) a<-table.element(a,formatC(signif(mysum$resid[i],6),format='g',flag=' ')) a<-table.row.end(a) } a<-table.end(a) table.save(a,file='mytable4.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,formatC(signif(gqarr[mypoint-kp3+1,1],6),format='g',flag=' ')) a<-table.element(a,formatC(signif(gqarr[mypoint-kp3+1,2],6),format='g',flag=' ')) a<-table.element(a,formatC(signif(gqarr[mypoint-kp3+1,3],6),format='g',flag=' ')) a<-table.row.end(a) } a<-table.end(a) table.save(a,file='mytable5.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,formatC(signif(numsignificant1/numgqtests,6),format='g',flag=' ')) 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='mytable6.tab') } }
Compute
Summary of computational transaction
Raw Input
view raw input (R code)
Raw Output
view raw output of R engine
Computing time
1 seconds
R Server
Big Analytics Cloud Computing Center
Click here to blog (archive) this computation