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(1 + ,21.033 + ,0.02211 + ,0.414783 + ,0.815285 + ,1 + ,19.085 + ,0.01929 + ,0.458359 + ,0.819521 + ,1 + ,20.651 + ,0.01309 + ,0.429895 + ,0.825288 + ,1 + ,20.644 + ,0.01353 + ,0.434969 + ,0.819235 + ,1 + ,19.649 + ,0.01767 + ,0.417356 + ,0.823484 + ,1 + ,21.378 + ,0.01222 + ,0.415564 + ,0.825069 + ,1 + ,24.886 + ,0.00607 + ,0.59604 + ,0.764112 + ,1 + ,26.892 + ,0.00344 + ,0.63742 + ,0.763262 + ,1 + ,21.812 + ,0.0107 + ,0.615551 + ,0.773587 + ,1 + ,21.862 + ,0.01022 + ,0.547037 + ,0.798463 + ,1 + ,21.118 + ,0.01166 + ,0.611137 + ,0.776156 + ,1 + ,21.414 + ,0.01141 + ,0.58339 + ,0.79252 + ,1 + ,25.703 + ,0.00581 + ,0.4606 + ,0.646846 + ,1 + ,24.889 + ,0.01041 + ,0.430166 + ,0.665833 + ,1 + ,24.922 + ,0.00609 + ,0.474791 + ,0.654027 + ,1 + ,25.175 + ,0.00839 + ,0.565924 + ,0.658245 + ,1 + ,22.333 + ,0.01859 + ,0.56738 + ,0.644692 + ,1 + ,20.376 + ,0.02919 + ,0.631099 + ,0.605417 + ,1 + ,17.28 + ,0.0316 + ,0.665318 + ,0.719467 + ,1 + ,17.153 + ,0.03365 + ,0.649554 + ,0.68608 + ,1 + ,17.536 + ,0.03871 + ,0.660125 + ,0.704087 + ,1 + ,19.493 + ,0.01849 + ,0.629017 + ,0.698951 + ,1 + ,22.468 + ,0.0128 + ,0.61906 + ,0.679834 + ,1 + ,20.422 + ,0.0184 + ,0.537264 + ,0.686894 + ,1 + ,23.831 + ,0.01778 + ,0.397937 + ,0.732479 + ,1 + ,22.066 + ,0.02887 + ,0.522746 + ,0.737948 + ,1 + ,25.908 + ,0.01095 + ,0.418622 + ,0.720916 + ,1 + ,25.119 + ,0.01328 + ,0.358773 + ,0.726652 + ,1 + ,25.97 + ,0.00677 + ,0.470478 + ,0.676258 + ,1 + ,25.678 + ,0.0117 + ,0.427785 + ,0.723797 + ,0 + ,26.775 + ,0.00339 + ,0.422229 + ,0.741367 + ,0 + ,30.94 + ,0.00167 + ,0.432439 + ,0.742055 + ,0 + ,30.775 + ,0.00119 + ,0.465946 + ,0.738703 + ,0 + ,32.684 + ,0.00072 + ,0.368535 + ,0.742133 + ,0 + ,33.047 + ,0.00065 + ,0.340068 + ,0.741899 + ,0 + ,31.732 + ,0.00135 + ,0.344252 + ,0.742737 + ,1 + ,23.216 + ,0.00586 + ,0.360148 + ,0.778834 + ,1 + ,24.951 + ,0.0034 + ,0.341435 + ,0.783626 + ,1 + ,26.738 + ,0.00231 + ,0.403884 + ,0.766209 + ,1 + ,26.31 + ,0.00265 + ,0.396793 + ,0.758324 + ,1 + ,26.822 + ,0.00231 + ,0.32648 + ,0.765623 + ,1 + ,26.453 + ,0.00257 + ,0.306443 + ,0.759203 + ,0 + ,22.736 + ,0.0074 + ,0.305062 + ,0.654172 + ,0 + ,23.145 + ,0.00675 + ,0.457702 + ,0.634267 + ,0 + ,25.368 + ,0.00454 + ,0.438296 + ,0.635285 + ,0 + ,25.032 + ,0.00476 + ,0.431285 + ,0.638928 + ,0 + ,24.602 + ,0.00476 + ,0.467489 + ,0.631653 + ,0 + ,26.805 + ,0.00432 + ,0.610367 + ,0.635204 + ,0 + ,23.162 + ,0.00839 + ,0.579597 + ,0.733659 + ,0 + ,24.971 + ,0.00462 + ,0.538688 + ,0.754073 + ,0 + ,25.135 + ,0.00479 + ,0.553134 + ,0.775933 + ,0 + ,25.03 + ,0.00474 + ,0.507504 + ,0.760361 + ,0 + ,24.692 + ,0.00481 + ,0.459766 + ,0.766204 + ,0 + ,25.429 + ,0.00484 + ,0.420383 + ,0.785714 + ,1 + ,21.028 + ,0.01036 + ,0.536009 + ,0.819032 + ,1 + ,20.767 + ,0.0118 + ,0.558586 + ,0.811843 + ,1 + ,21.422 + ,0.00969 + ,0.541781 + ,0.821364 + ,1 + ,22.817 + ,0.00681 + ,0.530529 + ,0.817756 + ,1 + ,22.603 + ,0.00786 + ,0.540049 + ,0.813432 + ,1 + ,21.66 + ,0.01143 + ,0.547975 + ,0.817396 + ,0 + ,25.554 + ,0.00871 + ,0.341788 + ,0.678874 + ,0 + ,26.138 + ,0.00301 + ,0.447979 + ,0.686264 + ,0 + ,25.856 + ,0.0034 + ,0.364867 + ,0.694399 + ,0 + ,25.964 + ,0.00351 + ,0.25657 + ,0.683296 + ,0 + ,26.415 + ,0.003 + ,0.27685 + ,0.673636 + ,0 + ,24.547 + ,0.0042 + ,0.305429 + ,0.681811 + ,1 + ,19.56 + ,0.02183 + ,0.460139 + ,0.720908 + ,1 + ,19.979 + ,0.02659 + ,0.498133 + ,0.729067 + ,1 + ,20.338 + ,0.04882 + ,0.513237 + ,0.731444 + ,1 + ,21.718 + ,0.02431 + ,0.487407 + ,0.727313 + ,1 + ,20.264 + ,0.02599 + ,0.489345 + ,0.730387 + ,1 + ,18.57 + ,0.03361 + ,0.543299 + ,0.733232 + ,1 + ,25.742 + ,0.00442 + ,0.495954 + ,0.762959 + ,1 + ,24.178 + ,0.00623 + ,0.509127 + ,0.789532 + ,1 + ,25.438 + ,0.00479 + ,0.437031 + ,0.815908 + ,1 + ,25.197 + ,0.00472 + ,0.463514 + ,0.807217 + ,1 + ,23.37 + ,0.00905 + ,0.489538 + ,0.789977 + ,1 + ,25.82 + ,0.0042 + ,0.429484 + ,0.81634 + ,1 + ,21.875 + ,0.01062 + ,0.644954 + ,0.779612 + ,1 + ,19.2 + ,0.0222 + ,0.594387 + ,0.790117 + ,1 + ,19.055 + ,0.01823 + ,0.544805 + ,0.770466 + ,1 + ,19.659 + ,0.01825 + ,0.576084 + ,0.778747 + ,1 + ,20.536 + ,0.01237 + ,0.55461 + ,0.787896 + ,1 + ,22.244 + ,0.00882 + ,0.576644 + ,0.772416 + ,1 + ,13.893 + ,0.0547 + ,0.556494 + ,0.729586 + ,1 + ,16.176 + ,0.02782 + ,0.583574 + ,0.727747 + ,1 + ,15.924 + ,0.03151 + ,0.598714 + ,0.712199 + ,1 + ,13.922 + ,0.04824 + ,0.602874 + ,0.740837 + ,1 + ,14.739 + ,0.04214 + ,0.599371 + ,0.743937 + ,1 + ,11.866 + ,0.07223 + ,0.590951 + ,0.745526 + ,1 + ,11.744 + ,0.08725 + ,0.65341 + ,0.733165 + ,1 + ,19.664 + ,0.01658 + ,0.501037 + ,0.71436 + ,1 + ,18.78 + ,0.01914 + ,0.454444 + ,0.734504 + ,1 + ,20.969 + ,0.01211 + ,0.447456 + ,0.69779 + ,1 + ,22.219 + ,0.0085 + ,0.50238 + ,0.71217 + ,1 + ,21.693 + ,0.01018 + ,0.447285 + ,0.705658 + ,1 + ,22.663 + ,0.00852 + ,0.366329 + ,0.693429 + ,1 + ,15.338 + ,0.08151 + ,0.629574 + ,0.714485 + ,1 + ,15.433 + ,0.10323 + ,0.57101 + ,0.690892 + ,1 + ,12.435 + ,0.16744 + ,0.638545 + ,0.674953 + ,1 + ,8.867 + ,0.31482 + ,0.671299 + ,0.656846 + ,1 + ,15.06 + ,0.11843 + ,0.639808 + ,0.643327 + ,1 + ,10.489 + ,0.2593 + ,0.596362 + ,0.641418 + ,1 + ,26.759 + ,0.00495 + ,0.296888 + ,0.722356 + ,1 + ,28.409 + ,0.00243 + ,0.263654 + ,0.691483 + ,1 + ,27.421 + ,0.00578 + ,0.365488 + ,0.719974 + ,1 + ,29.746 + ,0.00233 + ,0.334171 + ,0.67793 + ,1 + ,26.833 + ,0.00659 + ,0.393563 + ,0.700246 + ,1 + ,29.928 + ,0.00238 + ,0.311369 + ,0.676066 + ,1 + ,21.934 + ,0.00947 + ,0.497554 + ,0.740539 + ,1 + ,23.239 + ,0.00704 + ,0.436084 + ,0.727863 + ,1 + ,22.407 + ,0.0083 + ,0.338097 + ,0.712466 + ,1 + ,21.305 + ,0.01316 + ,0.498877 + ,0.722085 + ,1 + ,23.671 + ,0.0062 + ,0.441097 + ,0.722254 + ,1 + ,21.864 + ,0.01048 + ,0.331508 + ,0.715121 + ,1 + ,23.693 + ,0.06051 + ,0.407701 + ,0.662668 + ,1 + ,26.356 + ,0.01554 + ,0.450798 + ,0.653823 + ,1 + ,25.69 + ,0.01802 + ,0.486738 + ,0.676023 + ,1 + ,25.02 + ,0.00856 + ,0.470422 + ,0.655239 + ,1 + ,24.581 + ,0.00681 + ,0.462516 + ,0.58271 + ,1 + ,24.743 + ,0.0235 + ,0.487756 + ,0.68413 + ,1 + ,27.166 + ,0.01161 + ,0.400088 + ,0.656182 + ,1 + ,18.305 + ,0.01968 + ,0.538016 + ,0.74148 + ,1 + ,18.784 + ,0.01813 + ,0.589956 + ,0.732903 + ,1 + ,19.196 + ,0.0202 + ,0.618663 + ,0.728421 + ,1 + ,18.857 + ,0.01874 + ,0.637518 + ,0.735546 + ,1 + ,18.178 + ,0.01794 + ,0.623209 + ,0.738245 + ,1 + ,18.33 + ,0.01796 + ,0.585169 + ,0.736964 + ,1 + ,26.842 + ,0.01724 + ,0.457541 + ,0.699787 + ,1 + ,26.369 + ,0.00487 + ,0.491345 + ,0.718839 + ,1 + ,23.949 + ,0.0161 + ,0.46716 + ,0.724045 + ,1 + ,26.017 + ,0.01015 + ,0.468621 + ,0.735136 + ,1 + ,23.389 + ,0.00903 + ,0.470972 + ,0.721308 + ,1 + ,25.619 + ,0.00504 + ,0.482296 + ,0.723096 + ,1 + ,17.06 + ,0.03031 + ,0.637814 + ,0.744064 + ,1 + ,17.707 + ,0.02529 + ,0.653427 + ,0.706687 + ,1 + ,19.013 + ,0.02278 + ,0.6479 + ,0.708144 + ,1 + ,16.747 + ,0.0369 + ,0.625362 + ,0.708617 + ,1 + ,17.366 + ,0.02629 + ,0.640945 + ,0.701404 + ,1 + ,18.801 + ,0.01827 + ,0.624811 + ,0.696049 + ,1 + ,18.54 + ,0.02485 + ,0.677131 + ,0.685057 + ,1 + ,15.648 + ,0.04238 + ,0.606344 + ,0.665945 + ,1 + ,18.702 + ,0.01728 + ,0.606273 + ,0.661735 + ,1 + ,18.687 + ,0.0201 + ,0.536102 + ,0.632631 + ,1 + ,20.68 + ,0.01049 + ,0.49748 + ,0.630409 + ,1 + ,20.366 + ,0.01493 + ,0.566849 + ,0.574282 + ,1 + ,12.359 + ,0.0753 + ,0.56161 + ,0.793509 + ,1 + ,14.367 + ,0.06057 + ,0.478024 + ,0.768974 + ,1 + ,12.298 + ,0.08069 + ,0.55287 + ,0.764036 + ,1 + ,14.989 + ,0.07889 + ,0.427627 + ,0.775708 + ,1 + ,12.529 + ,0.10952 + ,0.507826 + ,0.762726 + ,1 + ,8.441 + ,0.21713 + ,0.625866 + ,0.76832 + ,1 + ,9.449 + ,0.16265 + ,0.584164 + ,0.754449 + ,1 + ,21.52 + ,0.04179 + ,0.566867 + ,0.670475 + ,1 + ,21.824 + ,0.04611 + ,0.65168 + ,0.659333 + ,1 + ,22.431 + ,0.02631 + ,0.6283 + ,0.652025 + ,1 + ,22.953 + ,0.03191 + ,0.611679 + ,0.623731 + ,1 + ,19.075 + ,0.10748 + ,0.630547 + ,0.646786 + ,1 + ,21.534 + ,0.03828 + ,0.635015 + ,0.627337 + ,1 + ,19.651 + ,0.02663 + ,0.654945 + ,0.675865 + ,1 + ,20.437 + ,0.02073 + ,0.653139 + ,0.694571 + ,1 + ,19.388 + ,0.0281 + ,0.577802 + ,0.684373 + ,1 + ,18.954 + ,0.02707 + ,0.685151 + ,0.719576 + ,1 + ,21.219 + ,0.01435 + ,0.557045 + ,0.673086 + ,1 + ,18.447 + ,0.03882 + ,0.671378 + ,0.674562 + ,0 + ,24.078 + ,0.0062 + ,0.469928 + ,0.628232 + ,0 + ,24.679 + ,0.00533 + ,0.384868 + ,0.62671 + ,0 + ,21.083 + ,0.0091 + ,0.440988 + ,0.628058 + ,0 + ,19.269 + ,0.01337 + ,0.372222 + ,0.725216 + ,0 + ,21.02 + ,0.00965 + ,0.371837 + ,0.646167 + ,0 + ,21.528 + ,0.01049 + ,0.522812 + ,0.646818 + ,0 + ,26.436 + ,0.00435 + ,0.413295 + ,0.7567 + ,0 + ,26.55 + ,0.0043 + ,0.36909 + ,0.776158 + ,0 + ,26.547 + ,0.00478 + ,0.380253 + ,0.7667 + ,0 + ,25.445 + ,0.0059 + ,0.387482 + ,0.756482 + ,0 + ,26.005 + ,0.00401 + ,0.405991 + ,0.761255 + ,0 + ,26.143 + ,0.00415 + ,0.361232 + ,0.763242 + ,1 + ,24.151 + ,0.0057 + ,0.39661 + ,0.745957 + ,1 + ,24.412 + ,0.00488 + ,0.402591 + ,0.762508 + ,1 + ,23.683 + ,0.0054 + ,0.398499 + ,0.778349 + ,1 + ,23.133 + ,0.00611 + ,0.352396 + ,0.75932 + ,1 + ,22.866 + ,0.00639 + ,0.408598 + ,0.768845 + ,1 + ,23.008 + ,0.00595 + ,0.329577 + ,0.75718 + ,0 + ,23.079 + ,0.00955 + ,0.603515 + ,0.669565 + ,0 + ,22.085 + ,0.01179 + ,0.663842 + ,0.656516 + ,0 + ,24.199 + ,0.00737 + ,0.598515 + ,0.654331 + ,0 + ,23.958 + ,0.01397 + ,0.566424 + ,0.667654 + ,0 + ,25.023 + ,0.0068 + ,0.528485 + ,0.663884 + ,0 + ,24.775 + ,0.00703 + ,0.555303 + ,0.659132 + ,0 + ,19.368 + ,0.04441 + ,0.508479 + ,0.683761 + ,0 + ,19.517 + ,0.02764 + ,0.448439 + ,0.657899 + ,0 + ,19.147 + ,0.0181 + ,0.431674 + ,0.683244 + ,0 + ,17.883 + ,0.10715 + ,0.407567 + ,0.655683 + ,0 + ,19.02 + ,0.07223 + ,0.451221 + ,0.643956 + ,0 + ,21.209 + ,0.04398 + ,0.462803 + ,0.664357) + ,dim=c(5 + ,195) + ,dimnames=list(c('status' + ,'HNR' + ,'NHR' + ,'RPDE' + ,'DFA') + ,1:195)) > y <- array(NA,dim=c(5,195),dimnames=list(c('status','HNR','NHR','RPDE','DFA'),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 status HNR NHR RPDE DFA 1 1 21.033 0.02211 0.414783 0.815285 2 1 19.085 0.01929 0.458359 0.819521 3 1 20.651 0.01309 0.429895 0.825288 4 1 20.644 0.01353 0.434969 0.819235 5 1 19.649 0.01767 0.417356 0.823484 6 1 21.378 0.01222 0.415564 0.825069 7 1 24.886 0.00607 0.596040 0.764112 8 1 26.892 0.00344 0.637420 0.763262 9 1 21.812 0.01070 0.615551 0.773587 10 1 21.862 0.01022 0.547037 0.798463 11 1 21.118 0.01166 0.611137 0.776156 12 1 21.414 0.01141 0.583390 0.792520 13 1 25.703 0.00581 0.460600 0.646846 14 1 24.889 0.01041 0.430166 0.665833 15 1 24.922 0.00609 0.474791 0.654027 16 1 25.175 0.00839 0.565924 0.658245 17 1 22.333 0.01859 0.567380 0.644692 18 1 20.376 0.02919 0.631099 0.605417 19 1 17.280 0.03160 0.665318 0.719467 20 1 17.153 0.03365 0.649554 0.686080 21 1 17.536 0.03871 0.660125 0.704087 22 1 19.493 0.01849 0.629017 0.698951 23 1 22.468 0.01280 0.619060 0.679834 24 1 20.422 0.01840 0.537264 0.686894 25 1 23.831 0.01778 0.397937 0.732479 26 1 22.066 0.02887 0.522746 0.737948 27 1 25.908 0.01095 0.418622 0.720916 28 1 25.119 0.01328 0.358773 0.726652 29 1 25.970 0.00677 0.470478 0.676258 30 1 25.678 0.01170 0.427785 0.723797 31 0 26.775 0.00339 0.422229 0.741367 32 0 30.940 0.00167 0.432439 0.742055 33 0 30.775 0.00119 0.465946 0.738703 34 0 32.684 0.00072 0.368535 0.742133 35 0 33.047 0.00065 0.340068 0.741899 36 0 31.732 0.00135 0.344252 0.742737 37 1 23.216 0.00586 0.360148 0.778834 38 1 24.951 0.00340 0.341435 0.783626 39 1 26.738 0.00231 0.403884 0.766209 40 1 26.310 0.00265 0.396793 0.758324 41 1 26.822 0.00231 0.326480 0.765623 42 1 26.453 0.00257 0.306443 0.759203 43 0 22.736 0.00740 0.305062 0.654172 44 0 23.145 0.00675 0.457702 0.634267 45 0 25.368 0.00454 0.438296 0.635285 46 0 25.032 0.00476 0.431285 0.638928 47 0 24.602 0.00476 0.467489 0.631653 48 0 26.805 0.00432 0.610367 0.635204 49 0 23.162 0.00839 0.579597 0.733659 50 0 24.971 0.00462 0.538688 0.754073 51 0 25.135 0.00479 0.553134 0.775933 52 0 25.030 0.00474 0.507504 0.760361 53 0 24.692 0.00481 0.459766 0.766204 54 0 25.429 0.00484 0.420383 0.785714 55 1 21.028 0.01036 0.536009 0.819032 56 1 20.767 0.01180 0.558586 0.811843 57 1 21.422 0.00969 0.541781 0.821364 58 1 22.817 0.00681 0.530529 0.817756 59 1 22.603 0.00786 0.540049 0.813432 60 1 21.660 0.01143 0.547975 0.817396 61 0 25.554 0.00871 0.341788 0.678874 62 0 26.138 0.00301 0.447979 0.686264 63 0 25.856 0.00340 0.364867 0.694399 64 0 25.964 0.00351 0.256570 0.683296 65 0 26.415 0.00300 0.276850 0.673636 66 0 24.547 0.00420 0.305429 0.681811 67 1 19.560 0.02183 0.460139 0.720908 68 1 19.979 0.02659 0.498133 0.729067 69 1 20.338 0.04882 0.513237 0.731444 70 1 21.718 0.02431 0.487407 0.727313 71 1 20.264 0.02599 0.489345 0.730387 72 1 18.570 0.03361 0.543299 0.733232 73 1 25.742 0.00442 0.495954 0.762959 74 1 24.178 0.00623 0.509127 0.789532 75 1 25.438 0.00479 0.437031 0.815908 76 1 25.197 0.00472 0.463514 0.807217 77 1 23.370 0.00905 0.489538 0.789977 78 1 25.820 0.00420 0.429484 0.816340 79 1 21.875 0.01062 0.644954 0.779612 80 1 19.200 0.02220 0.594387 0.790117 81 1 19.055 0.01823 0.544805 0.770466 82 1 19.659 0.01825 0.576084 0.778747 83 1 20.536 0.01237 0.554610 0.787896 84 1 22.244 0.00882 0.576644 0.772416 85 1 13.893 0.05470 0.556494 0.729586 86 1 16.176 0.02782 0.583574 0.727747 87 1 15.924 0.03151 0.598714 0.712199 88 1 13.922 0.04824 0.602874 0.740837 89 1 14.739 0.04214 0.599371 0.743937 90 1 11.866 0.07223 0.590951 0.745526 91 1 11.744 0.08725 0.653410 0.733165 92 1 19.664 0.01658 0.501037 0.714360 93 1 18.780 0.01914 0.454444 0.734504 94 1 20.969 0.01211 0.447456 0.697790 95 1 22.219 0.00850 0.502380 0.712170 96 1 21.693 0.01018 0.447285 0.705658 97 1 22.663 0.00852 0.366329 0.693429 98 1 15.338 0.08151 0.629574 0.714485 99 1 15.433 0.10323 0.571010 0.690892 100 1 12.435 0.16744 0.638545 0.674953 101 1 8.867 0.31482 0.671299 0.656846 102 1 15.060 0.11843 0.639808 0.643327 103 1 10.489 0.25930 0.596362 0.641418 104 1 26.759 0.00495 0.296888 0.722356 105 1 28.409 0.00243 0.263654 0.691483 106 1 27.421 0.00578 0.365488 0.719974 107 1 29.746 0.00233 0.334171 0.677930 108 1 26.833 0.00659 0.393563 0.700246 109 1 29.928 0.00238 0.311369 0.676066 110 1 21.934 0.00947 0.497554 0.740539 111 1 23.239 0.00704 0.436084 0.727863 112 1 22.407 0.00830 0.338097 0.712466 113 1 21.305 0.01316 0.498877 0.722085 114 1 23.671 0.00620 0.441097 0.722254 115 1 21.864 0.01048 0.331508 0.715121 116 1 23.693 0.06051 0.407701 0.662668 117 1 26.356 0.01554 0.450798 0.653823 118 1 25.690 0.01802 0.486738 0.676023 119 1 25.020 0.00856 0.470422 0.655239 120 1 24.581 0.00681 0.462516 0.582710 121 1 24.743 0.02350 0.487756 0.684130 122 1 27.166 0.01161 0.400088 0.656182 123 1 18.305 0.01968 0.538016 0.741480 124 1 18.784 0.01813 0.589956 0.732903 125 1 19.196 0.02020 0.618663 0.728421 126 1 18.857 0.01874 0.637518 0.735546 127 1 18.178 0.01794 0.623209 0.738245 128 1 18.330 0.01796 0.585169 0.736964 129 1 26.842 0.01724 0.457541 0.699787 130 1 26.369 0.00487 0.491345 0.718839 131 1 23.949 0.01610 0.467160 0.724045 132 1 26.017 0.01015 0.468621 0.735136 133 1 23.389 0.00903 0.470972 0.721308 134 1 25.619 0.00504 0.482296 0.723096 135 1 17.060 0.03031 0.637814 0.744064 136 1 17.707 0.02529 0.653427 0.706687 137 1 19.013 0.02278 0.647900 0.708144 138 1 16.747 0.03690 0.625362 0.708617 139 1 17.366 0.02629 0.640945 0.701404 140 1 18.801 0.01827 0.624811 0.696049 141 1 18.540 0.02485 0.677131 0.685057 142 1 15.648 0.04238 0.606344 0.665945 143 1 18.702 0.01728 0.606273 0.661735 144 1 18.687 0.02010 0.536102 0.632631 145 1 20.680 0.01049 0.497480 0.630409 146 1 20.366 0.01493 0.566849 0.574282 147 1 12.359 0.07530 0.561610 0.793509 148 1 14.367 0.06057 0.478024 0.768974 149 1 12.298 0.08069 0.552870 0.764036 150 1 14.989 0.07889 0.427627 0.775708 151 1 12.529 0.10952 0.507826 0.762726 152 1 8.441 0.21713 0.625866 0.768320 153 1 9.449 0.16265 0.584164 0.754449 154 1 21.520 0.04179 0.566867 0.670475 155 1 21.824 0.04611 0.651680 0.659333 156 1 22.431 0.02631 0.628300 0.652025 157 1 22.953 0.03191 0.611679 0.623731 158 1 19.075 0.10748 0.630547 0.646786 159 1 21.534 0.03828 0.635015 0.627337 160 1 19.651 0.02663 0.654945 0.675865 161 1 20.437 0.02073 0.653139 0.694571 162 1 19.388 0.02810 0.577802 0.684373 163 1 18.954 0.02707 0.685151 0.719576 164 1 21.219 0.01435 0.557045 0.673086 165 1 18.447 0.03882 0.671378 0.674562 166 0 24.078 0.00620 0.469928 0.628232 167 0 24.679 0.00533 0.384868 0.626710 168 0 21.083 0.00910 0.440988 0.628058 169 0 19.269 0.01337 0.372222 0.725216 170 0 21.020 0.00965 0.371837 0.646167 171 0 21.528 0.01049 0.522812 0.646818 172 0 26.436 0.00435 0.413295 0.756700 173 0 26.550 0.00430 0.369090 0.776158 174 0 26.547 0.00478 0.380253 0.766700 175 0 25.445 0.00590 0.387482 0.756482 176 0 26.005 0.00401 0.405991 0.761255 177 0 26.143 0.00415 0.361232 0.763242 178 1 24.151 0.00570 0.396610 0.745957 179 1 24.412 0.00488 0.402591 0.762508 180 1 23.683 0.00540 0.398499 0.778349 181 1 23.133 0.00611 0.352396 0.759320 182 1 22.866 0.00639 0.408598 0.768845 183 1 23.008 0.00595 0.329577 0.757180 184 0 23.079 0.00955 0.603515 0.669565 185 0 22.085 0.01179 0.663842 0.656516 186 0 24.199 0.00737 0.598515 0.654331 187 0 23.958 0.01397 0.566424 0.667654 188 0 25.023 0.00680 0.528485 0.663884 189 0 24.775 0.00703 0.555303 0.659132 190 0 19.368 0.04441 0.508479 0.683761 191 0 19.517 0.02764 0.448439 0.657899 192 0 19.147 0.01810 0.431674 0.683244 193 0 17.883 0.10715 0.407567 0.655683 194 0 19.020 0.07223 0.451221 0.643956 195 0 21.209 0.04398 0.462803 0.664357 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) HNR NHR RPDE DFA -0.3627 -0.0279 -0.5409 0.7608 1.8958 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -0.82522 -0.20019 0.06908 0.29273 0.68046 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -0.36266 0.58423 -0.621 0.535512 HNR -0.02790 0.01075 -2.597 0.010152 * NHR -0.54089 1.01519 -0.533 0.594797 RPDE 0.76076 0.34188 2.225 0.027244 * DFA 1.89576 0.52199 3.632 0.000362 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.3887 on 190 degrees of freedom Multiple R-squared: 0.2066, Adjusted R-squared: 0.1899 F-statistic: 12.37 on 4 and 190 DF, p-value: 5.86e-09 > 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,] 4.398878e-48 8.797756e-48 1.000000e+00 [2,] 5.611401e-65 1.122280e-64 1.000000e+00 [3,] 8.319897e-81 1.663979e-80 1.000000e+00 [4,] 1.209017e-94 2.418035e-94 1.000000e+00 [5,] 2.835471e-107 5.670942e-107 1.000000e+00 [6,] 9.174407e-143 1.834881e-142 1.000000e+00 [7,] 1.887641e-140 3.775281e-140 1.000000e+00 [8,] 1.123187e-154 2.246373e-154 1.000000e+00 [9,] 0.000000e+00 0.000000e+00 1.000000e+00 [10,] 4.491955e-200 8.983909e-200 1.000000e+00 [11,] 2.640573e-198 5.281147e-198 1.000000e+00 [12,] 2.802517e-214 5.605035e-214 1.000000e+00 [13,] 9.749939e-244 1.949988e-243 1.000000e+00 [14,] 9.484011e-280 1.896802e-279 1.000000e+00 [15,] 1.769068e-257 3.538136e-257 1.000000e+00 [16,] 3.612535e-277 7.225071e-277 1.000000e+00 [17,] 5.119387e-288 1.023877e-287 1.000000e+00 [18,] 7.303000e-315 1.460600e-314 1.000000e+00 [19,] 0.000000e+00 0.000000e+00 1.000000e+00 [20,] 0.000000e+00 0.000000e+00 1.000000e+00 [21,] 0.000000e+00 0.000000e+00 1.000000e+00 [22,] 0.000000e+00 0.000000e+00 1.000000e+00 [23,] 0.000000e+00 0.000000e+00 1.000000e+00 [24,] 9.514241e-06 1.902848e-05 9.999905e-01 [25,] 2.169859e-04 4.339718e-04 9.997830e-01 [26,] 5.043145e-04 1.008629e-03 9.994957e-01 [27,] 3.978789e-04 7.957579e-04 9.996021e-01 [28,] 2.645542e-04 5.291084e-04 9.997354e-01 [29,] 2.203698e-04 4.407395e-04 9.997796e-01 [30,] 1.231933e-04 2.463867e-04 9.998768e-01 [31,] 7.940360e-05 1.588072e-04 9.999206e-01 [32,] 8.370991e-05 1.674198e-04 9.999163e-01 [33,] 6.772794e-05 1.354559e-04 9.999323e-01 [34,] 5.769463e-05 1.153893e-04 9.999423e-01 [35,] 4.058593e-05 8.117186e-05 9.999594e-01 [36,] 8.861400e-03 1.772280e-02 9.911386e-01 [37,] 4.314182e-02 8.628364e-02 9.568582e-01 [38,] 6.896358e-02 1.379272e-01 9.310364e-01 [39,] 9.382804e-02 1.876561e-01 9.061720e-01 [40,] 1.181899e-01 2.363798e-01 8.818101e-01 [41,] 1.373005e-01 2.746010e-01 8.626995e-01 [42,] 2.632954e-01 5.265908e-01 7.367046e-01 [43,] 3.738332e-01 7.476663e-01 6.261668e-01 [44,] 4.998885e-01 9.997769e-01 5.001115e-01 [45,] 6.015406e-01 7.969187e-01 3.984594e-01 [46,] 6.975827e-01 6.048346e-01 3.024173e-01 [47,] 7.812080e-01 4.375840e-01 2.187920e-01 [48,] 7.474820e-01 5.050360e-01 2.525180e-01 [49,] 7.107377e-01 5.785245e-01 2.892623e-01 [50,] 6.731651e-01 6.536697e-01 3.268349e-01 [51,] 6.398711e-01 7.202577e-01 3.601289e-01 [52,] 6.033855e-01 7.932290e-01 3.966145e-01 [53,] 5.607325e-01 8.785350e-01 4.392675e-01 [54,] 5.945058e-01 8.109883e-01 4.054942e-01 [55,] 6.200465e-01 7.599069e-01 3.799535e-01 [56,] 6.407061e-01 7.185878e-01 3.592939e-01 [57,] 6.393134e-01 7.213732e-01 3.606866e-01 [58,] 6.312722e-01 7.374555e-01 3.687278e-01 [59,] 6.401901e-01 7.196198e-01 3.598099e-01 [60,] 6.033960e-01 7.932081e-01 3.966040e-01 [61,] 5.642036e-01 8.715929e-01 4.357964e-01 [62,] 5.512144e-01 8.975711e-01 4.487856e-01 [63,] 5.130064e-01 9.739872e-01 4.869936e-01 [64,] 4.727549e-01 9.455097e-01 5.272451e-01 [65,] 4.375887e-01 8.751775e-01 5.624113e-01 [66,] 4.303793e-01 8.607585e-01 5.696207e-01 [67,] 4.010252e-01 8.020503e-01 5.989748e-01 [68,] 3.750122e-01 7.500244e-01 6.249878e-01 [69,] 3.484272e-01 6.968544e-01 6.515728e-01 [70,] 3.154263e-01 6.308525e-01 6.845737e-01 [71,] 2.915568e-01 5.831135e-01 7.084432e-01 [72,] 2.564239e-01 5.128478e-01 7.435761e-01 [73,] 2.283459e-01 4.566918e-01 7.716541e-01 [74,] 1.980431e-01 3.960861e-01 8.019569e-01 [75,] 1.704135e-01 3.408270e-01 8.295865e-01 [76,] 1.447951e-01 2.895901e-01 8.552049e-01 [77,] 1.238384e-01 2.476768e-01 8.761616e-01 [78,] 1.263767e-01 2.527534e-01 8.736233e-01 [79,] 1.077424e-01 2.154848e-01 8.922576e-01 [80,] 9.134101e-02 1.826820e-01 9.086590e-01 [81,] 8.593215e-02 1.718643e-01 9.140679e-01 [82,] 7.598435e-02 1.519687e-01 9.240156e-01 [83,] 7.631365e-02 1.526273e-01 9.236864e-01 [84,] 7.110412e-02 1.422082e-01 9.288959e-01 [85,] 6.117218e-02 1.223444e-01 9.388278e-01 [86,] 5.162411e-02 1.032482e-01 9.483759e-01 [87,] 4.782720e-02 9.565441e-02 9.521728e-01 [88,] 4.260440e-02 8.520880e-02 9.573956e-01 [89,] 3.915672e-02 7.831345e-02 9.608433e-01 [90,] 4.071812e-02 8.143625e-02 9.592819e-01 [91,] 3.246978e-02 6.493957e-02 9.675302e-01 [92,] 2.620955e-02 5.241910e-02 9.737905e-01 [93,] 2.053496e-02 4.106992e-02 9.794650e-01 [94,] 1.597663e-02 3.195326e-02 9.840234e-01 [95,] 1.269561e-02 2.539122e-02 9.873044e-01 [96,] 9.833436e-03 1.966687e-02 9.901666e-01 [97,] 1.231684e-02 2.463369e-02 9.876832e-01 [98,] 1.969249e-02 3.938497e-02 9.803075e-01 [99,] 2.253762e-02 4.507523e-02 9.774624e-01 [100,] 3.475730e-02 6.951460e-02 9.652427e-01 [101,] 3.913258e-02 7.826515e-02 9.608674e-01 [102,] 6.051597e-02 1.210319e-01 9.394840e-01 [103,] 5.160930e-02 1.032186e-01 9.483907e-01 [104,] 4.748224e-02 9.496449e-02 9.525178e-01 [105,] 4.930875e-02 9.861751e-02 9.506912e-01 [106,] 4.261368e-02 8.522736e-02 9.573863e-01 [107,] 4.028090e-02 8.056181e-02 9.597191e-01 [108,] 4.374646e-02 8.749292e-02 9.562535e-01 [109,] 5.235613e-02 1.047123e-01 9.476439e-01 [110,] 6.559901e-02 1.311980e-01 9.344010e-01 [111,] 7.177531e-02 1.435506e-01 9.282247e-01 [112,] 8.325829e-02 1.665166e-01 9.167417e-01 [113,] 1.262945e-01 2.525891e-01 8.737055e-01 [114,] 1.358796e-01 2.717591e-01 8.641204e-01 [115,] 2.111681e-01 4.223362e-01 7.888319e-01 [116,] 1.824563e-01 3.649126e-01 8.175437e-01 [117,] 1.553581e-01 3.107162e-01 8.446419e-01 [118,] 1.311028e-01 2.622055e-01 8.688972e-01 [119,] 1.102620e-01 2.205239e-01 8.897380e-01 [120,] 9.189604e-02 1.837921e-01 9.081040e-01 [121,] 7.521296e-02 1.504259e-01 9.247870e-01 [122,] 9.690071e-02 1.938014e-01 9.030993e-01 [123,] 1.057054e-01 2.114108e-01 8.942946e-01 [124,] 1.115279e-01 2.230558e-01 8.884721e-01 [125,] 1.267845e-01 2.535690e-01 8.732155e-01 [126,] 1.332056e-01 2.664112e-01 8.667944e-01 [127,] 1.559538e-01 3.119076e-01 8.440462e-01 [128,] 1.341232e-01 2.682465e-01 8.658768e-01 [129,] 1.119860e-01 2.239721e-01 8.880140e-01 [130,] 9.200637e-02 1.840127e-01 9.079936e-01 [131,] 7.488924e-02 1.497785e-01 9.251108e-01 [132,] 6.037106e-02 1.207421e-01 9.396289e-01 [133,] 4.797420e-02 9.594841e-02 9.520258e-01 [134,] 3.768537e-02 7.537074e-02 9.623146e-01 [135,] 2.928890e-02 5.857780e-02 9.707111e-01 [136,] 2.335115e-02 4.670231e-02 9.766488e-01 [137,] 2.305102e-02 4.610203e-02 9.769490e-01 [138,] 3.131933e-02 6.263867e-02 9.686807e-01 [139,] 5.408036e-02 1.081607e-01 9.459196e-01 [140,] 4.898237e-02 9.796473e-02 9.510176e-01 [141,] 3.846053e-02 7.692105e-02 9.615395e-01 [142,] 3.150021e-02 6.300042e-02 9.684998e-01 [143,] 2.501309e-02 5.002617e-02 9.749869e-01 [144,] 1.890665e-02 3.781330e-02 9.810933e-01 [145,] 1.758718e-02 3.517435e-02 9.824128e-01 [146,] 2.076379e-02 4.152759e-02 9.792362e-01 [147,] 2.188893e-02 4.377786e-02 9.781111e-01 [148,] 2.013047e-02 4.026095e-02 9.798695e-01 [149,] 2.391978e-02 4.783955e-02 9.760802e-01 [150,] 5.682661e-02 1.136532e-01 9.431734e-01 [151,] 7.682881e-02 1.536576e-01 9.231712e-01 [152,] 1.845183e-01 3.690366e-01 8.154817e-01 [153,] 1.726772e-01 3.453545e-01 8.273228e-01 [154,] 1.571155e-01 3.142309e-01 8.428845e-01 [155,] 1.640911e-01 3.281823e-01 8.359089e-01 [156,] 1.324048e-01 2.648096e-01 8.675952e-01 [157,] 2.144661e-01 4.289321e-01 7.855339e-01 [158,] 3.109425e-01 6.218850e-01 6.890575e-01 [159,] 3.093638e-01 6.187276e-01 6.906362e-01 [160,] 3.276863e-01 6.553726e-01 6.723137e-01 [161,] 3.165316e-01 6.330631e-01 6.834684e-01 [162,] 5.583784e-01 8.832432e-01 4.416216e-01 [163,] 5.204769e-01 9.590461e-01 4.795231e-01 [164,] 4.884708e-01 9.769417e-01 5.115292e-01 [165,] 4.811610e-01 9.623221e-01 5.188390e-01 [166,] 5.331302e-01 9.337396e-01 4.668698e-01 [167,] 5.926206e-01 8.147587e-01 4.073794e-01 [168,] 7.128590e-01 5.742820e-01 2.871410e-01 [169,] 8.973058e-01 2.053884e-01 1.026942e-01 [170,] 9.999905e-01 1.901827e-05 9.509136e-06 [171,] 9.999888e-01 2.236100e-05 1.118050e-05 [172,] 9.999614e-01 7.728618e-05 3.864309e-05 [173,] 9.999060e-01 1.879845e-04 9.399223e-05 [174,] 9.997153e-01 5.694356e-04 2.847178e-04 [175,] 9.990711e-01 1.857828e-03 9.289141e-04 [176,] 1.000000e+00 0.000000e+00 0.000000e+00 [177,] 1.000000e+00 0.000000e+00 0.000000e+00 [178,] 1.000000e+00 0.000000e+00 0.000000e+00 [179,] 1.000000e+00 0.000000e+00 0.000000e+00 [180,] 1.000000e+00 0.000000e+00 0.000000e+00 > postscript(file="/var/fisher/rcomp/tmp/1fe7d1386318622.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/fisher/rcomp/tmp/20vnh1386318622.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/fisher/rcomp/tmp/3k40t1386318622.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/fisher/rcomp/tmp/4ouiy1386318622.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/fisher/rcomp/tmp/55kn81386318622.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 0.100348104 0.003288604 0.054350956 0.062008567 0.041829466 0.085482695 7 8 9 10 11 12 0.158297954 0.182978181 0.042226126 0.048325178 0.021869165 0.020079474 13 14 15 16 17 18 0.506297582 0.473231556 0.460248269 0.391225315 0.342030385 0.319140796 19 20 21 22 23 24 -0.008183437 0.064667953 0.035912507 0.112982149 0.236728954 0.231513128 25 26 27 28 29 30 0.345871458 0.197305880 0.406314053 0.420216029 0.450993978 0.387869787 31 32 33 34 35 36 -0.615098156 -0.508888222 -0.532887734 -0.412273534 -0.380082942 -0.421167100 37 38 39 40 41 42 0.263134787 0.315365736 0.350147015 0.358731404 0.412487195 0.429745987 43 44 45 46 47 48 -0.471189608 -0.538515939 -0.464851806 -0.475680466 -0.501429092 -0.555625980 49 50 51 52 53 54 -0.818309711 -0.777452342 -0.825215541 -0.763938334 -0.748091313 -0.734536669 55 56 57 58 59 60 -0.005473550 -0.015524082 -0.003654535 0.049110907 0.044662666 0.006737526 61 62 63 64 65 66 -0.466621637 -0.548204919 -0.508056417 -0.401547421 -0.386354591 -0.475065894 67 68 69 70 71 72 0.203507876 0.173401842 0.179445944 0.232175219 0.185212500 0.095628858 73 74 75 76 77 78 0.259616361 0.156559300 0.195781919 0.185348600 0.149598607 0.211043814 79 80 81 82 83 84 0.010150269 -0.039669910 0.029110226 0.006479443 0.026761274 0.085081556 85 86 87 88 89 90 -0.026587734 0.005458516 0.018380455 -0.085885683 -0.069601077 -0.130095014 91 92 93 94 95 96 -0.149457502 0.184870060 0.158847137 0.291039098 0.254919318 0.295410523 97 98 99 100 101 102 0.406348486 0.001263676 0.104941877 0.034860920 0.024431300 0.140589083 103 104 105 106 107 108 0.125914678 0.516693223 0.645179084 0.487941166 0.654476969 0.488014162 109 110 111 112 113 114 0.680462607 0.197382633 0.303274610 0.384474727 0.215805936 0.321693555 115 116 117 118 119 120 0.370482461 0.490049678 0.524010671 0.437342028 0.465344743 0.595660969 121 122 123 124 125 126 0.397739559 0.578591417 0.069083138 0.058356087 0.057629125 0.019529353 127 128 129 130 131 132 0.005920185 0.041539699 0.446224290 0.364501358 0.311582242 0.343928021 133 134 135 136 137 138 0.294421724 0.342480650 -0.040725703 0.033591608 0.070116577 0.030777181 139 140 141 142 143 144 0.044128934 0.102256184 0.079568230 0.098440653 0.178112231 0.287776021 145 146 147 148 149 150 0.371781041 0.419051576 -0.183321502 -0.025160713 -0.119585543 0.027677168 151 152 153 154 155 156 -0.060795481 -0.217058325 -0.160379646 0.283406667 0.250826083 0.288693654 157 158 159 160 161 162 0.372570484 0.247180848 0.311833918 0.145834036 0.130485700 0.181848771 163 164 165 166 167 168 0.020779601 0.262688518 0.108802125 -0.510640967 -0.426747254 -0.570292779 169 170 171 172 173 174 -0.750471114 -0.553476362 -0.654936958 -0.646308710 -0.646413345 -0.636799683 175 176 177 178 179 180 -0.653070571 -0.661596985 -0.627387006 0.323724706 0.294636880 0.247659932 181 182 183 184 185 186 0.303845285 0.235733863 0.321687582 -0.716687357 -0.764366733 -0.653932536 187 188 189 190 191 192 -0.657930808 -0.596084049 -0.614272648 -0.755989348 -0.666198875 -0.716976542 193 194 195 -0.633490165 -0.631631882 -0.633320848 > postscript(file="/var/fisher/rcomp/tmp/6y75u1386318622.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 0.100348104 NA 1 0.003288604 0.100348104 2 0.054350956 0.003288604 3 0.062008567 0.054350956 4 0.041829466 0.062008567 5 0.085482695 0.041829466 6 0.158297954 0.085482695 7 0.182978181 0.158297954 8 0.042226126 0.182978181 9 0.048325178 0.042226126 10 0.021869165 0.048325178 11 0.020079474 0.021869165 12 0.506297582 0.020079474 13 0.473231556 0.506297582 14 0.460248269 0.473231556 15 0.391225315 0.460248269 16 0.342030385 0.391225315 17 0.319140796 0.342030385 18 -0.008183437 0.319140796 19 0.064667953 -0.008183437 20 0.035912507 0.064667953 21 0.112982149 0.035912507 22 0.236728954 0.112982149 23 0.231513128 0.236728954 24 0.345871458 0.231513128 25 0.197305880 0.345871458 26 0.406314053 0.197305880 27 0.420216029 0.406314053 28 0.450993978 0.420216029 29 0.387869787 0.450993978 30 -0.615098156 0.387869787 31 -0.508888222 -0.615098156 32 -0.532887734 -0.508888222 33 -0.412273534 -0.532887734 34 -0.380082942 -0.412273534 35 -0.421167100 -0.380082942 36 0.263134787 -0.421167100 37 0.315365736 0.263134787 38 0.350147015 0.315365736 39 0.358731404 0.350147015 40 0.412487195 0.358731404 41 0.429745987 0.412487195 42 -0.471189608 0.429745987 43 -0.538515939 -0.471189608 44 -0.464851806 -0.538515939 45 -0.475680466 -0.464851806 46 -0.501429092 -0.475680466 47 -0.555625980 -0.501429092 48 -0.818309711 -0.555625980 49 -0.777452342 -0.818309711 50 -0.825215541 -0.777452342 51 -0.763938334 -0.825215541 52 -0.748091313 -0.763938334 53 -0.734536669 -0.748091313 54 -0.005473550 -0.734536669 55 -0.015524082 -0.005473550 56 -0.003654535 -0.015524082 57 0.049110907 -0.003654535 58 0.044662666 0.049110907 59 0.006737526 0.044662666 60 -0.466621637 0.006737526 61 -0.548204919 -0.466621637 62 -0.508056417 -0.548204919 63 -0.401547421 -0.508056417 64 -0.386354591 -0.401547421 65 -0.475065894 -0.386354591 66 0.203507876 -0.475065894 67 0.173401842 0.203507876 68 0.179445944 0.173401842 69 0.232175219 0.179445944 70 0.185212500 0.232175219 71 0.095628858 0.185212500 72 0.259616361 0.095628858 73 0.156559300 0.259616361 74 0.195781919 0.156559300 75 0.185348600 0.195781919 76 0.149598607 0.185348600 77 0.211043814 0.149598607 78 0.010150269 0.211043814 79 -0.039669910 0.010150269 80 0.029110226 -0.039669910 81 0.006479443 0.029110226 82 0.026761274 0.006479443 83 0.085081556 0.026761274 84 -0.026587734 0.085081556 85 0.005458516 -0.026587734 86 0.018380455 0.005458516 87 -0.085885683 0.018380455 88 -0.069601077 -0.085885683 89 -0.130095014 -0.069601077 90 -0.149457502 -0.130095014 91 0.184870060 -0.149457502 92 0.158847137 0.184870060 93 0.291039098 0.158847137 94 0.254919318 0.291039098 95 0.295410523 0.254919318 96 0.406348486 0.295410523 97 0.001263676 0.406348486 98 0.104941877 0.001263676 99 0.034860920 0.104941877 100 0.024431300 0.034860920 101 0.140589083 0.024431300 102 0.125914678 0.140589083 103 0.516693223 0.125914678 104 0.645179084 0.516693223 105 0.487941166 0.645179084 106 0.654476969 0.487941166 107 0.488014162 0.654476969 108 0.680462607 0.488014162 109 0.197382633 0.680462607 110 0.303274610 0.197382633 111 0.384474727 0.303274610 112 0.215805936 0.384474727 113 0.321693555 0.215805936 114 0.370482461 0.321693555 115 0.490049678 0.370482461 116 0.524010671 0.490049678 117 0.437342028 0.524010671 118 0.465344743 0.437342028 119 0.595660969 0.465344743 120 0.397739559 0.595660969 121 0.578591417 0.397739559 122 0.069083138 0.578591417 123 0.058356087 0.069083138 124 0.057629125 0.058356087 125 0.019529353 0.057629125 126 0.005920185 0.019529353 127 0.041539699 0.005920185 128 0.446224290 0.041539699 129 0.364501358 0.446224290 130 0.311582242 0.364501358 131 0.343928021 0.311582242 132 0.294421724 0.343928021 133 0.342480650 0.294421724 134 -0.040725703 0.342480650 135 0.033591608 -0.040725703 136 0.070116577 0.033591608 137 0.030777181 0.070116577 138 0.044128934 0.030777181 139 0.102256184 0.044128934 140 0.079568230 0.102256184 141 0.098440653 0.079568230 142 0.178112231 0.098440653 143 0.287776021 0.178112231 144 0.371781041 0.287776021 145 0.419051576 0.371781041 146 -0.183321502 0.419051576 147 -0.025160713 -0.183321502 148 -0.119585543 -0.025160713 149 0.027677168 -0.119585543 150 -0.060795481 0.027677168 151 -0.217058325 -0.060795481 152 -0.160379646 -0.217058325 153 0.283406667 -0.160379646 154 0.250826083 0.283406667 155 0.288693654 0.250826083 156 0.372570484 0.288693654 157 0.247180848 0.372570484 158 0.311833918 0.247180848 159 0.145834036 0.311833918 160 0.130485700 0.145834036 161 0.181848771 0.130485700 162 0.020779601 0.181848771 163 0.262688518 0.020779601 164 0.108802125 0.262688518 165 -0.510640967 0.108802125 166 -0.426747254 -0.510640967 167 -0.570292779 -0.426747254 168 -0.750471114 -0.570292779 169 -0.553476362 -0.750471114 170 -0.654936958 -0.553476362 171 -0.646308710 -0.654936958 172 -0.646413345 -0.646308710 173 -0.636799683 -0.646413345 174 -0.653070571 -0.636799683 175 -0.661596985 -0.653070571 176 -0.627387006 -0.661596985 177 0.323724706 -0.627387006 178 0.294636880 0.323724706 179 0.247659932 0.294636880 180 0.303845285 0.247659932 181 0.235733863 0.303845285 182 0.321687582 0.235733863 183 -0.716687357 0.321687582 184 -0.764366733 -0.716687357 185 -0.653932536 -0.764366733 186 -0.657930808 -0.653932536 187 -0.596084049 -0.657930808 188 -0.614272648 -0.596084049 189 -0.755989348 -0.614272648 190 -0.666198875 -0.755989348 191 -0.716976542 -0.666198875 192 -0.633490165 -0.716976542 193 -0.631631882 -0.633490165 194 -0.633320848 -0.631631882 195 NA -0.633320848 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 0.003288604 0.100348104 [2,] 0.054350956 0.003288604 [3,] 0.062008567 0.054350956 [4,] 0.041829466 0.062008567 [5,] 0.085482695 0.041829466 [6,] 0.158297954 0.085482695 [7,] 0.182978181 0.158297954 [8,] 0.042226126 0.182978181 [9,] 0.048325178 0.042226126 [10,] 0.021869165 0.048325178 [11,] 0.020079474 0.021869165 [12,] 0.506297582 0.020079474 [13,] 0.473231556 0.506297582 [14,] 0.460248269 0.473231556 [15,] 0.391225315 0.460248269 [16,] 0.342030385 0.391225315 [17,] 0.319140796 0.342030385 [18,] -0.008183437 0.319140796 [19,] 0.064667953 -0.008183437 [20,] 0.035912507 0.064667953 [21,] 0.112982149 0.035912507 [22,] 0.236728954 0.112982149 [23,] 0.231513128 0.236728954 [24,] 0.345871458 0.231513128 [25,] 0.197305880 0.345871458 [26,] 0.406314053 0.197305880 [27,] 0.420216029 0.406314053 [28,] 0.450993978 0.420216029 [29,] 0.387869787 0.450993978 [30,] -0.615098156 0.387869787 [31,] -0.508888222 -0.615098156 [32,] -0.532887734 -0.508888222 [33,] -0.412273534 -0.532887734 [34,] -0.380082942 -0.412273534 [35,] -0.421167100 -0.380082942 [36,] 0.263134787 -0.421167100 [37,] 0.315365736 0.263134787 [38,] 0.350147015 0.315365736 [39,] 0.358731404 0.350147015 [40,] 0.412487195 0.358731404 [41,] 0.429745987 0.412487195 [42,] -0.471189608 0.429745987 [43,] -0.538515939 -0.471189608 [44,] -0.464851806 -0.538515939 [45,] -0.475680466 -0.464851806 [46,] -0.501429092 -0.475680466 [47,] -0.555625980 -0.501429092 [48,] -0.818309711 -0.555625980 [49,] -0.777452342 -0.818309711 [50,] -0.825215541 -0.777452342 [51,] -0.763938334 -0.825215541 [52,] -0.748091313 -0.763938334 [53,] -0.734536669 -0.748091313 [54,] -0.005473550 -0.734536669 [55,] -0.015524082 -0.005473550 [56,] -0.003654535 -0.015524082 [57,] 0.049110907 -0.003654535 [58,] 0.044662666 0.049110907 [59,] 0.006737526 0.044662666 [60,] -0.466621637 0.006737526 [61,] -0.548204919 -0.466621637 [62,] -0.508056417 -0.548204919 [63,] -0.401547421 -0.508056417 [64,] -0.386354591 -0.401547421 [65,] -0.475065894 -0.386354591 [66,] 0.203507876 -0.475065894 [67,] 0.173401842 0.203507876 [68,] 0.179445944 0.173401842 [69,] 0.232175219 0.179445944 [70,] 0.185212500 0.232175219 [71,] 0.095628858 0.185212500 [72,] 0.259616361 0.095628858 [73,] 0.156559300 0.259616361 [74,] 0.195781919 0.156559300 [75,] 0.185348600 0.195781919 [76,] 0.149598607 0.185348600 [77,] 0.211043814 0.149598607 [78,] 0.010150269 0.211043814 [79,] -0.039669910 0.010150269 [80,] 0.029110226 -0.039669910 [81,] 0.006479443 0.029110226 [82,] 0.026761274 0.006479443 [83,] 0.085081556 0.026761274 [84,] -0.026587734 0.085081556 [85,] 0.005458516 -0.026587734 [86,] 0.018380455 0.005458516 [87,] -0.085885683 0.018380455 [88,] -0.069601077 -0.085885683 [89,] -0.130095014 -0.069601077 [90,] -0.149457502 -0.130095014 [91,] 0.184870060 -0.149457502 [92,] 0.158847137 0.184870060 [93,] 0.291039098 0.158847137 [94,] 0.254919318 0.291039098 [95,] 0.295410523 0.254919318 [96,] 0.406348486 0.295410523 [97,] 0.001263676 0.406348486 [98,] 0.104941877 0.001263676 [99,] 0.034860920 0.104941877 [100,] 0.024431300 0.034860920 [101,] 0.140589083 0.024431300 [102,] 0.125914678 0.140589083 [103,] 0.516693223 0.125914678 [104,] 0.645179084 0.516693223 [105,] 0.487941166 0.645179084 [106,] 0.654476969 0.487941166 [107,] 0.488014162 0.654476969 [108,] 0.680462607 0.488014162 [109,] 0.197382633 0.680462607 [110,] 0.303274610 0.197382633 [111,] 0.384474727 0.303274610 [112,] 0.215805936 0.384474727 [113,] 0.321693555 0.215805936 [114,] 0.370482461 0.321693555 [115,] 0.490049678 0.370482461 [116,] 0.524010671 0.490049678 [117,] 0.437342028 0.524010671 [118,] 0.465344743 0.437342028 [119,] 0.595660969 0.465344743 [120,] 0.397739559 0.595660969 [121,] 0.578591417 0.397739559 [122,] 0.069083138 0.578591417 [123,] 0.058356087 0.069083138 [124,] 0.057629125 0.058356087 [125,] 0.019529353 0.057629125 [126,] 0.005920185 0.019529353 [127,] 0.041539699 0.005920185 [128,] 0.446224290 0.041539699 [129,] 0.364501358 0.446224290 [130,] 0.311582242 0.364501358 [131,] 0.343928021 0.311582242 [132,] 0.294421724 0.343928021 [133,] 0.342480650 0.294421724 [134,] -0.040725703 0.342480650 [135,] 0.033591608 -0.040725703 [136,] 0.070116577 0.033591608 [137,] 0.030777181 0.070116577 [138,] 0.044128934 0.030777181 [139,] 0.102256184 0.044128934 [140,] 0.079568230 0.102256184 [141,] 0.098440653 0.079568230 [142,] 0.178112231 0.098440653 [143,] 0.287776021 0.178112231 [144,] 0.371781041 0.287776021 [145,] 0.419051576 0.371781041 [146,] -0.183321502 0.419051576 [147,] -0.025160713 -0.183321502 [148,] -0.119585543 -0.025160713 [149,] 0.027677168 -0.119585543 [150,] -0.060795481 0.027677168 [151,] -0.217058325 -0.060795481 [152,] -0.160379646 -0.217058325 [153,] 0.283406667 -0.160379646 [154,] 0.250826083 0.283406667 [155,] 0.288693654 0.250826083 [156,] 0.372570484 0.288693654 [157,] 0.247180848 0.372570484 [158,] 0.311833918 0.247180848 [159,] 0.145834036 0.311833918 [160,] 0.130485700 0.145834036 [161,] 0.181848771 0.130485700 [162,] 0.020779601 0.181848771 [163,] 0.262688518 0.020779601 [164,] 0.108802125 0.262688518 [165,] -0.510640967 0.108802125 [166,] -0.426747254 -0.510640967 [167,] -0.570292779 -0.426747254 [168,] -0.750471114 -0.570292779 [169,] -0.553476362 -0.750471114 [170,] -0.654936958 -0.553476362 [171,] -0.646308710 -0.654936958 [172,] -0.646413345 -0.646308710 [173,] -0.636799683 -0.646413345 [174,] -0.653070571 -0.636799683 [175,] -0.661596985 -0.653070571 [176,] -0.627387006 -0.661596985 [177,] 0.323724706 -0.627387006 [178,] 0.294636880 0.323724706 [179,] 0.247659932 0.294636880 [180,] 0.303845285 0.247659932 [181,] 0.235733863 0.303845285 [182,] 0.321687582 0.235733863 [183,] -0.716687357 0.321687582 [184,] -0.764366733 -0.716687357 [185,] -0.653932536 -0.764366733 [186,] -0.657930808 -0.653932536 [187,] -0.596084049 -0.657930808 [188,] -0.614272648 -0.596084049 [189,] -0.755989348 -0.614272648 [190,] -0.666198875 -0.755989348 [191,] -0.716976542 -0.666198875 [192,] -0.633490165 -0.716976542 [193,] -0.631631882 -0.633490165 [194,] -0.633320848 -0.631631882 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 0.003288604 0.100348104 2 0.054350956 0.003288604 3 0.062008567 0.054350956 4 0.041829466 0.062008567 5 0.085482695 0.041829466 6 0.158297954 0.085482695 7 0.182978181 0.158297954 8 0.042226126 0.182978181 9 0.048325178 0.042226126 10 0.021869165 0.048325178 11 0.020079474 0.021869165 12 0.506297582 0.020079474 13 0.473231556 0.506297582 14 0.460248269 0.473231556 15 0.391225315 0.460248269 16 0.342030385 0.391225315 17 0.319140796 0.342030385 18 -0.008183437 0.319140796 19 0.064667953 -0.008183437 20 0.035912507 0.064667953 21 0.112982149 0.035912507 22 0.236728954 0.112982149 23 0.231513128 0.236728954 24 0.345871458 0.231513128 25 0.197305880 0.345871458 26 0.406314053 0.197305880 27 0.420216029 0.406314053 28 0.450993978 0.420216029 29 0.387869787 0.450993978 30 -0.615098156 0.387869787 31 -0.508888222 -0.615098156 32 -0.532887734 -0.508888222 33 -0.412273534 -0.532887734 34 -0.380082942 -0.412273534 35 -0.421167100 -0.380082942 36 0.263134787 -0.421167100 37 0.315365736 0.263134787 38 0.350147015 0.315365736 39 0.358731404 0.350147015 40 0.412487195 0.358731404 41 0.429745987 0.412487195 42 -0.471189608 0.429745987 43 -0.538515939 -0.471189608 44 -0.464851806 -0.538515939 45 -0.475680466 -0.464851806 46 -0.501429092 -0.475680466 47 -0.555625980 -0.501429092 48 -0.818309711 -0.555625980 49 -0.777452342 -0.818309711 50 -0.825215541 -0.777452342 51 -0.763938334 -0.825215541 52 -0.748091313 -0.763938334 53 -0.734536669 -0.748091313 54 -0.005473550 -0.734536669 55 -0.015524082 -0.005473550 56 -0.003654535 -0.015524082 57 0.049110907 -0.003654535 58 0.044662666 0.049110907 59 0.006737526 0.044662666 60 -0.466621637 0.006737526 61 -0.548204919 -0.466621637 62 -0.508056417 -0.548204919 63 -0.401547421 -0.508056417 64 -0.386354591 -0.401547421 65 -0.475065894 -0.386354591 66 0.203507876 -0.475065894 67 0.173401842 0.203507876 68 0.179445944 0.173401842 69 0.232175219 0.179445944 70 0.185212500 0.232175219 71 0.095628858 0.185212500 72 0.259616361 0.095628858 73 0.156559300 0.259616361 74 0.195781919 0.156559300 75 0.185348600 0.195781919 76 0.149598607 0.185348600 77 0.211043814 0.149598607 78 0.010150269 0.211043814 79 -0.039669910 0.010150269 80 0.029110226 -0.039669910 81 0.006479443 0.029110226 82 0.026761274 0.006479443 83 0.085081556 0.026761274 84 -0.026587734 0.085081556 85 0.005458516 -0.026587734 86 0.018380455 0.005458516 87 -0.085885683 0.018380455 88 -0.069601077 -0.085885683 89 -0.130095014 -0.069601077 90 -0.149457502 -0.130095014 91 0.184870060 -0.149457502 92 0.158847137 0.184870060 93 0.291039098 0.158847137 94 0.254919318 0.291039098 95 0.295410523 0.254919318 96 0.406348486 0.295410523 97 0.001263676 0.406348486 98 0.104941877 0.001263676 99 0.034860920 0.104941877 100 0.024431300 0.034860920 101 0.140589083 0.024431300 102 0.125914678 0.140589083 103 0.516693223 0.125914678 104 0.645179084 0.516693223 105 0.487941166 0.645179084 106 0.654476969 0.487941166 107 0.488014162 0.654476969 108 0.680462607 0.488014162 109 0.197382633 0.680462607 110 0.303274610 0.197382633 111 0.384474727 0.303274610 112 0.215805936 0.384474727 113 0.321693555 0.215805936 114 0.370482461 0.321693555 115 0.490049678 0.370482461 116 0.524010671 0.490049678 117 0.437342028 0.524010671 118 0.465344743 0.437342028 119 0.595660969 0.465344743 120 0.397739559 0.595660969 121 0.578591417 0.397739559 122 0.069083138 0.578591417 123 0.058356087 0.069083138 124 0.057629125 0.058356087 125 0.019529353 0.057629125 126 0.005920185 0.019529353 127 0.041539699 0.005920185 128 0.446224290 0.041539699 129 0.364501358 0.446224290 130 0.311582242 0.364501358 131 0.343928021 0.311582242 132 0.294421724 0.343928021 133 0.342480650 0.294421724 134 -0.040725703 0.342480650 135 0.033591608 -0.040725703 136 0.070116577 0.033591608 137 0.030777181 0.070116577 138 0.044128934 0.030777181 139 0.102256184 0.044128934 140 0.079568230 0.102256184 141 0.098440653 0.079568230 142 0.178112231 0.098440653 143 0.287776021 0.178112231 144 0.371781041 0.287776021 145 0.419051576 0.371781041 146 -0.183321502 0.419051576 147 -0.025160713 -0.183321502 148 -0.119585543 -0.025160713 149 0.027677168 -0.119585543 150 -0.060795481 0.027677168 151 -0.217058325 -0.060795481 152 -0.160379646 -0.217058325 153 0.283406667 -0.160379646 154 0.250826083 0.283406667 155 0.288693654 0.250826083 156 0.372570484 0.288693654 157 0.247180848 0.372570484 158 0.311833918 0.247180848 159 0.145834036 0.311833918 160 0.130485700 0.145834036 161 0.181848771 0.130485700 162 0.020779601 0.181848771 163 0.262688518 0.020779601 164 0.108802125 0.262688518 165 -0.510640967 0.108802125 166 -0.426747254 -0.510640967 167 -0.570292779 -0.426747254 168 -0.750471114 -0.570292779 169 -0.553476362 -0.750471114 170 -0.654936958 -0.553476362 171 -0.646308710 -0.654936958 172 -0.646413345 -0.646308710 173 -0.636799683 -0.646413345 174 -0.653070571 -0.636799683 175 -0.661596985 -0.653070571 176 -0.627387006 -0.661596985 177 0.323724706 -0.627387006 178 0.294636880 0.323724706 179 0.247659932 0.294636880 180 0.303845285 0.247659932 181 0.235733863 0.303845285 182 0.321687582 0.235733863 183 -0.716687357 0.321687582 184 -0.764366733 -0.716687357 185 -0.653932536 -0.764366733 186 -0.657930808 -0.653932536 187 -0.596084049 -0.657930808 188 -0.614272648 -0.596084049 189 -0.755989348 -0.614272648 190 -0.666198875 -0.755989348 191 -0.716976542 -0.666198875 192 -0.633490165 -0.716976542 193 -0.631631882 -0.633490165 194 -0.633320848 -0.631631882 > 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/fisher/rcomp/tmp/7fae91386318622.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/fisher/rcomp/tmp/8qmrr1386318622.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/fisher/rcomp/tmp/9swgq1386318622.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/fisher/rcomp/tmp/10dcsn1386318623.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/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/fisher/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/fisher/rcomp/tmp/11e6mn1386318623.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/fisher/rcomp/tmp/12m2nr1386318623.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/fisher/rcomp/tmp/13fbur1386318623.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/fisher/rcomp/tmp/14u43c1386318623.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/fisher/rcomp/tmp/15c5k21386318623.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/fisher/rcomp/tmp/16c65y1386318623.tab") + } > > try(system("convert tmp/1fe7d1386318622.ps tmp/1fe7d1386318622.png",intern=TRUE)) character(0) > try(system("convert tmp/20vnh1386318622.ps tmp/20vnh1386318622.png",intern=TRUE)) character(0) > try(system("convert tmp/3k40t1386318622.ps tmp/3k40t1386318622.png",intern=TRUE)) character(0) > try(system("convert tmp/4ouiy1386318622.ps tmp/4ouiy1386318622.png",intern=TRUE)) character(0) > try(system("convert tmp/55kn81386318622.ps tmp/55kn81386318622.png",intern=TRUE)) character(0) > try(system("convert tmp/6y75u1386318622.ps tmp/6y75u1386318622.png",intern=TRUE)) character(0) > try(system("convert tmp/7fae91386318622.ps tmp/7fae91386318622.png",intern=TRUE)) character(0) > try(system("convert tmp/8qmrr1386318622.ps tmp/8qmrr1386318622.png",intern=TRUE)) character(0) > try(system("convert tmp/9swgq1386318622.ps tmp/9swgq1386318622.png",intern=TRUE)) character(0) > try(system("convert tmp/10dcsn1386318623.ps tmp/10dcsn1386318623.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 18.294 3.240 21.592