R version 2.8.0 (2008-10-20) Copyright (C) 2008 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(40399 + ,44164 + ,44496 + ,43110 + ,43880 + ,195722 + ,198563 + ,229139 + ,229527 + ,211868 + ,36763 + ,40399 + ,44164 + ,44496 + ,43110 + ,202196 + ,195722 + ,198563 + ,229139 + ,229527 + ,37903 + ,36763 + ,40399 + ,44164 + ,44496 + ,205816 + ,202196 + ,195722 + ,198563 + ,229139 + ,35532 + ,37903 + ,36763 + ,40399 + ,44164 + ,212588 + ,205816 + ,202196 + ,195722 + ,198563 + ,35533 + ,35532 + ,37903 + ,36763 + ,40399 + ,214320 + ,212588 + ,205816 + ,202196 + ,195722 + ,32110 + ,35533 + ,35532 + ,37903 + ,36763 + ,220375 + ,214320 + ,212588 + ,205816 + ,202196 + ,33374 + ,32110 + ,35533 + ,35532 + ,37903 + ,204442 + ,220375 + ,214320 + ,212588 + ,205816 + ,35462 + ,33374 + ,32110 + ,35533 + ,35532 + ,206903 + ,204442 + ,220375 + ,214320 + ,212588 + ,33508 + ,35462 + ,33374 + ,32110 + ,35533 + ,214126 + ,206903 + ,204442 + ,220375 + ,214320 + ,36080 + ,33508 + ,35462 + ,33374 + ,32110 + ,226899 + ,214126 + ,206903 + ,204442 + ,220375 + ,34560 + ,36080 + ,33508 + ,35462 + ,33374 + ,223532 + ,226899 + ,214126 + ,206903 + ,204442 + ,38737 + ,34560 + ,36080 + ,33508 + ,35462 + ,195309 + ,223532 + ,226899 + ,214126 + ,206903 + ,38144 + ,38737 + ,34560 + ,36080 + ,33508 + ,186005 + ,195309 + ,223532 + ,226899 + ,214126 + ,37594 + ,38144 + ,38737 + ,34560 + ,36080 + ,188906 + ,186005 + ,195309 + ,223532 + ,226899 + ,36424 + ,37594 + ,38144 + ,38737 + ,34560 + ,191563 + ,188906 + ,186005 + ,195309 + ,223532 + ,36843 + ,36424 + ,37594 + ,38144 + ,38737 + ,189226 + ,191563 + ,188906 + ,186005 + ,195309 + ,37246 + ,36843 + ,36424 + ,37594 + ,38144 + ,186413 + ,189226 + ,191563 + ,188906 + ,186005 + ,38661 + ,37246 + ,36843 + ,36424 + ,37594 + ,178037 + ,186413 + ,189226 + ,191563 + ,188906 + ,40454 + ,38661 + ,37246 + ,36843 + ,36424 + ,166827 + ,178037 + ,186413 + ,189226 + ,191563 + ,44928 + ,40454 + ,38661 + ,37246 + ,36843 + ,169362 + ,166827 + ,178037 + ,186413 + ,189226 + ,48441 + ,44928 + ,40454 + ,38661 + ,37246 + ,174330 + ,169362 + ,166827 + ,178037 + ,186413 + ,48140 + ,48441 + ,44928 + ,40454 + ,38661 + ,187069 + ,174330 + ,169362 + ,166827 + ,178037 + ,45998 + ,48140 + ,48441 + ,44928 + ,40454 + ,186530 + ,187069 + ,174330 + ,169362 + ,166827 + ,47369 + ,45998 + ,48140 + ,48441 + ,44928 + ,158114 + ,186530 + ,187069 + ,174330 + ,169362 + ,49554 + ,47369 + ,45998 + ,48140 + ,48441 + ,151001 + ,158114 + ,186530 + ,187069 + ,174330 + ,47510 + ,49554 + ,47369 + ,45998 + ,48140 + ,159612 + ,151001 + ,158114 + ,186530 + ,187069 + ,44873 + ,47510 + ,49554 + ,47369 + ,45998 + ,161914 + ,159612 + ,151001 + ,158114 + ,186530 + ,45344 + ,44873 + ,47510 + ,49554 + ,47369 + ,164182 + ,161914 + ,159612 + ,151001 + ,158114 + ,42413 + ,45344 + ,44873 + ,47510 + ,49554 + ,169701 + ,164182 + ,161914 + ,159612 + ,151001 + ,36912 + ,42413 + ,45344 + ,44873 + ,47510 + ,171297 + ,169701 + ,164182 + ,161914 + ,159612 + ,43452 + ,36912 + ,42413 + ,45344 + ,44873 + ,166444 + ,171297 + ,169701 + ,164182 + ,161914 + ,42142 + ,43452 + ,36912 + ,42413 + ,45344 + ,173476 + ,166444 + ,171297 + ,169701 + ,164182 + ,44382 + ,42142 + ,43452 + ,36912 + ,42413 + ,182516 + ,173476 + ,166444 + ,171297 + ,169701 + ,43636 + ,44382 + ,42142 + ,43452 + ,36912 + ,202388 + ,182516 + ,173476 + ,166444 + ,171297 + ,44167 + ,43636 + ,44382 + ,42142 + ,43452 + ,202300 + ,202388 + ,182516 + ,173476 + ,166444 + ,44423 + ,44167 + ,43636 + ,44382 + ,42142 + ,168053 + ,202300 + ,202388 + ,182516 + ,173476 + ,42868 + ,44423 + ,44167 + ,43636 + ,44382 + ,167302 + ,168053 + ,202300 + ,202388 + ,182516 + ,43908 + ,42868 + ,44423 + ,44167 + ,43636 + ,172608 + ,167302 + ,168053 + ,202300 + ,202388 + ,42013 + ,43908 + ,42868 + ,44423 + ,44167 + ,178106 + ,172608 + ,167302 + ,168053 + ,202300 + ,38846 + ,42013 + ,43908 + ,42868 + ,44423 + ,185686 + ,178106 + ,172608 + ,167302 + ,168053 + ,35087 + ,38846 + ,42013 + ,43908 + ,42868 + ,194581 + ,185686 + ,178106 + ,172608 + ,167302 + ,33026 + ,35087 + ,38846 + ,42013 + ,43908 + ,194596 + ,194581 + ,185686 + ,178106 + ,172608 + ,34646 + ,33026 + ,35087 + ,38846 + ,42013 + ,197922 + ,194596 + ,194581 + ,185686 + ,178106 + ,37135 + ,34646 + ,33026 + ,35087 + ,38846 + ,208795 + ,197922 + ,194596 + ,194581 + ,185686 + ,37985 + ,37135 + ,34646 + ,33026 + ,35087 + ,230580 + ,208795 + ,197922 + ,194596 + ,194581 + ,43121 + ,37985 + ,37135 + ,34646 + ,33026 + ,240636 + ,230580 + ,208795 + ,197922 + ,194596 + ,43722 + ,43121 + ,37985 + ,37135 + ,34646 + ,240048 + ,240636 + ,230580 + ,208795 + ,197922 + ,43630 + ,43722 + ,43121 + ,37985 + ,37135 + ,211457 + ,240048 + ,240636 + ,230580 + ,208795 + ,42234 + ,43630 + ,43722 + ,43121 + ,37985 + ,211142 + ,211457 + ,240048 + ,240636 + ,230580 + ,39351 + ,42234 + ,43630 + ,43722 + ,43121 + ,214771 + ,211142 + ,211457 + ,240048 + ,240636 + ,39327 + ,39351 + ,42234 + ,43630 + ,43722 + ,212610 + ,214771 + ,211142 + ,211457 + ,240048 + ,35704 + ,39327 + ,39351 + ,42234 + ,43630 + ,219313 + ,212610 + ,214771 + ,211142 + ,211457 + ,30466 + ,35704 + ,39327 + ,39351 + ,42234 + ,219277 + ,219313 + ,212610 + ,214771 + ,211142 + ,28155 + ,30466 + ,35704 + ,39327 + ,39351 + ,231805 + ,219277 + ,219313 + ,212610 + ,214771 + ,29257 + ,28155 + ,30466 + ,35704 + ,39327 + ,229245 + ,231805 + ,219277 + ,219313 + ,212610 + ,29998 + ,29257 + ,28155 + ,30466 + ,35704 + ,241114 + ,229245 + ,231805 + ,219277 + ,219313 + ,32529 + ,29998 + ,29257 + ,28155 + ,30466 + ,248624 + ,241114 + ,229245 + ,231805 + ,219277 + ,34787 + ,32529 + ,29998 + ,29257 + ,28155 + ,265845 + ,248624 + ,241114 + ,229245 + ,231805 + ,33855 + ,34787 + ,32529 + ,29998 + ,29257 + ,256446 + ,265845 + ,248624 + ,241114 + ,229245 + ,34556 + ,33855 + ,34787 + ,32529 + ,29998 + ,219452 + ,256446 + ,265845 + ,248624 + ,241114 + ,31348 + ,34556 + ,33855 + ,34787 + ,32529 + ,217142 + ,219452 + ,256446 + ,265845 + ,248624 + ,30805 + ,31348 + ,34556 + ,33855 + ,34787 + ,221678 + ,217142 + ,219452 + ,256446 + ,265845 + ,28353 + ,30805 + ,31348 + ,34556 + ,33855 + ,227184 + ,221678 + ,217142 + ,219452 + ,256446 + ,24514 + ,28353 + ,30805 + ,31348 + ,34556 + ,230354 + ,227184 + ,221678 + ,217142 + ,219452 + ,21106 + ,24514 + ,28353 + ,30805 + ,31348 + ,235243 + ,230354 + ,227184 + ,221678 + ,217142 + ,21346 + ,21106 + ,24514 + ,28353 + ,30805 + ,237217 + ,235243 + ,230354 + ,227184 + ,221678 + ,23335 + ,21346 + ,21106 + ,24514 + ,28353 + ,233575 + ,237217 + ,235243 + ,230354 + ,227184 + ,24379 + ,23335 + ,21346 + ,21106 + ,24514 + ,244460 + ,233575 + ,237217 + ,235243 + ,230354 + ,26290 + ,24379 + ,23335 + ,21346 + ,21106 + ,243324 + ,244460 + ,233575 + ,237217 + ,235243 + ,30084 + ,26290 + ,24379 + ,23335 + ,21346 + ,260307 + ,243324 + ,244460 + ,233575 + ,237217 + ,29429 + ,30084 + ,26290 + ,24379 + ,23335 + ,241476 + ,260307 + ,243324 + ,244460 + ,233575 + ,30632 + ,29429 + ,30084 + ,26290 + ,24379 + ,203666 + ,241476 + ,260307 + ,243324 + ,244460 + ,27349 + ,30632 + ,29429 + ,30084 + ,26290 + ,200237 + ,203666 + ,241476 + ,260307 + ,243324 + ,27264 + ,27349 + ,30632 + ,29429 + ,30084 + ,204045 + ,200237 + ,203666 + ,241476 + ,260307 + ,27474 + ,27264 + ,27349 + ,30632 + ,29429 + ,209465 + ,204045 + ,200237 + ,203666 + ,241476 + ,24482 + ,27474 + ,27264 + ,27349 + ,30632 + ,213586 + ,209465 + ,204045 + ,200237 + ,203666 + ,21453 + ,24482 + ,27474 + ,27264 + ,27349 + ,216234 + ,213586 + ,209465 + ,204045 + ,200237 + ,18788 + ,21453 + ,24482 + ,27474 + ,27264 + ,213188 + ,216234 + ,213586 + ,209465 + ,204045 + ,19282 + ,18788 + ,21453 + ,24482 + ,27474 + ,208679 + ,213188 + ,216234 + ,213586 + ,209465 + ,19713 + ,19282 + ,18788 + ,21453 + ,24482 + ,217859 + ,208679 + ,213188 + ,216234 + ,213586 + ,21917 + ,19713 + ,19282 + ,18788 + ,21453 + ,227247 + ,217859 + ,208679 + ,213188 + ,216234 + ,23812 + ,21917 + ,19713 + ,19282 + ,18788 + ,243477 + ,227247 + ,217859 + ,208679 + ,213188 + ,23785 + ,23812 + ,21917 + ,19713 + ,19282 + ,232571 + ,243477 + ,227247 + ,217859 + ,208679 + ,24696 + ,23785 + ,23812 + ,21917 + ,19713 + ,191531 + ,232571 + ,243477 + ,227247 + ,217859 + ,24562 + ,24696 + ,23785 + ,23812 + ,21917 + ,186029 + ,191531 + ,232571 + ,243477 + ,227247 + ,23580 + ,24562 + ,24696 + ,23785 + ,23812 + ,189733 + ,186029 + ,191531 + ,232571 + ,243477 + ,24939 + ,23580 + ,24562 + ,24696 + ,23785 + ,190420 + ,189733 + ,186029 + ,191531 + ,232571 + ,23899 + ,24939 + ,23580 + ,24562 + ,24696 + ,194163 + ,190420 + ,189733 + ,186029 + ,191531 + ,21454 + ,23899 + ,24939 + ,23580 + ,24562 + ,198770 + ,194163 + ,190420 + ,189733 + ,186029 + ,19761 + ,21454 + ,23899 + ,24939 + ,23580 + ,195198 + ,198770 + ,194163 + ,190420 + ,189733 + ,19815 + ,19761 + ,21454 + ,23899 + ,24939 + ,193111 + ,195198 + ,198770 + ,194163 + ,190420 + ,20780 + ,19815 + ,19761 + ,21454 + ,23899 + ,195411 + ,193111 + ,195198 + ,198770 + ,194163 + ,23462 + ,20780 + ,19815 + ,19761 + ,21454 + ,202108 + ,195411 + ,193111 + ,195198 + ,198770 + ,25005 + ,23462 + ,20780 + ,19815 + ,19761 + ,215706 + ,202108 + ,195411 + ,193111 + ,195198 + ,24725 + ,25005 + ,23462 + ,20780 + ,19815 + ,206348 + ,215706 + ,202108 + ,195411 + ,193111 + ,26198 + ,24725 + ,25005 + ,23462 + ,20780 + ,166972 + ,206348 + ,215706 + ,202108 + ,195411 + ,27543 + ,26198 + ,24725 + ,25005 + ,23462 + ,166070 + ,166972 + ,206348 + ,215706 + ,202108 + ,26471 + ,27543 + ,26198 + ,24725 + ,25005 + ,169292 + ,166070 + ,166972 + ,206348 + ,215706 + ,26558 + ,26471 + ,27543 + ,26198 + ,24725 + ,175041 + ,169292 + ,166070 + ,166972 + ,206348 + ,25317 + ,26558 + ,26471 + ,27543 + ,26198 + ,177876 + ,175041 + ,169292 + ,166070 + ,166972 + ,22896 + ,25317 + ,26558 + ,26471 + ,27543 + ,181140 + ,177876 + ,175041 + ,169292 + ,166070 + ,22248 + ,22896 + ,25317 + ,26558 + ,26471 + ,179566 + ,181140 + ,177876 + ,175041 + ,169292 + ,23406 + ,22248 + ,22896 + ,25317 + ,26558 + ,175335 + ,179566 + ,181140 + ,177876 + ,175041 + ,25073 + ,23406 + ,22248 + ,22896 + ,25317 + ,184128 + ,175335 + ,179566 + ,181140 + ,177876 + ,27691 + ,25073 + ,23406 + ,22248 + ,22896 + ,189917 + ,184128 + ,175335 + ,179566 + ,181140 + ,30599 + ,27691 + ,25073 + ,23406 + ,22248 + ,194690 + ,189917 + ,184128 + ,175335 + ,179566 + ,31948 + ,30599 + ,27691 + ,25073 + ,23406 + ,179612 + ,194690 + ,189917 + ,184128 + ,175335 + ,32946 + ,31948 + ,30599 + ,27691 + ,25073 + ,150605 + ,179612 + ,194690 + ,189917 + ,184128 + ,34012 + ,32946 + ,31948 + ,30599 + ,27691 + ,150569 + ,150605 + ,179612 + ,194690 + ,189917 + ,32936 + ,34012 + ,32946 + ,31948 + ,30599 + ,153745 + ,150569 + ,150605 + ,179612 + ,194690 + ,32974 + ,32936 + ,34012 + ,32946 + ,31948 + ,155511 + ,153745 + ,150569 + ,150605 + ,179612 + ,30951 + ,32974 + ,32936 + ,34012 + ,32946 + ,159044 + ,155511 + ,153745 + ,150569 + ,150605 + ,29812 + ,30951 + ,32974 + ,32936 + ,34012 + ,163095 + ,159044 + ,155511 + ,153745 + ,150569 + ,29010 + ,29812 + ,30951 + ,32974 + ,32936 + ,159585 + ,163095 + ,159044 + ,155511 + ,153745 + ,31068 + ,29010 + ,29812 + ,30951 + ,32974 + ,158644 + ,159585 + ,163095 + ,159044 + ,155511 + ,32447 + ,31068 + ,29010 + ,29812 + ,30951 + ,166618 + ,158644 + ,159585 + ,163095 + ,159044 + ,34844 + ,32447 + ,31068 + ,29010 + ,29812 + ,176512 + ,166618 + ,158644 + ,159585 + ,163095 + ,35676 + ,34844 + ,32447 + ,31068 + ,29010 + ,200765 + ,176512 + ,166618 + ,158644 + ,159585 + ,35387 + ,35676 + ,34844 + ,32447 + ,31068 + ,182698 + ,200765 + ,176512 + ,166618 + ,158644 + ,36488 + ,35387 + ,35676 + ,34844 + ,32447 + ,153730 + ,182698 + ,200765 + ,176512 + ,166618 + ,35652 + ,36488 + ,35387 + ,35676 + ,34844 + ,156145 + ,153730 + ,182698 + ,200765 + ,176512 + ,33488 + ,35652 + ,36488 + ,35387 + ,35676 + ,161570 + ,156145 + ,153730 + ,182698 + ,200765 + ,32914 + ,33488 + ,35652 + ,36488 + ,35387 + ,165688 + ,161570 + ,156145 + ,153730 + ,182698 + ,29781 + ,32914 + ,33488 + ,35652 + ,36488 + ,173666 + ,165688 + ,161570 + ,156145 + ,153730 + ,27951 + ,29781 + ,32914 + ,33488 + ,35652 + ,180144 + ,173666 + ,165688 + ,161570 + ,156145) + ,dim=c(10 + ,125) + ,dimnames=list(c('OPENVAC' + ,'Y1' + ,'Y2' + ,'Y3' + ,'Y4' + ,'NWWZ' + ,'X1' + ,'X2' + ,'X3' + ,'X4') + ,1:125)) > y <- array(NA,dim=c(10,125),dimnames=list(c('OPENVAC','Y1','Y2','Y3','Y4','NWWZ','X1','X2','X3','X4'),1:125)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'No Linear Trend' > par2 = 'Do not include Seasonal Dummies' > par1 = '1' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo Attaching package: 'zoo' The following object(s) are masked from package:base : as.Date.numeric > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > par1 <- as.numeric(par1) > x <- t(y) > k <- length(x[1,]) > n <- length(x[,1]) > x1 <- cbind(x[,par1], x[,1:k!=par1]) > mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1]) > colnames(x1) <- mycolnames #colnames(x)[par1] > x <- x1 > if (par3 == 'First Differences'){ + x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep=''))) + for (i in 1:n-1) { + for (j in 1:k) { + x2[i,j] <- x[i+1,j] - x[i,j] + } + } + x <- x2 + } > if (par2 == 'Include Monthly Dummies'){ + x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep =''))) + for (i in 1:11){ + x2[seq(i,n,12),i] <- 1 + } + x <- cbind(x, x2) + } > if (par2 == 'Include Quarterly Dummies'){ + x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep =''))) + for (i in 1:3){ + x2[seq(i,n,4),i] <- 1 + } + x <- cbind(x, x2) + } > k <- length(x[1,]) > if (par3 == 'Linear Trend'){ + x <- cbind(x, c(1:n)) + colnames(x)[k+1] <- 't' + } > x OPENVAC Y1 Y2 Y3 Y4 NWWZ X1 X2 X3 X4 1 40399 44164 44496 43110 43880 195722 198563 229139 229527 211868 2 36763 40399 44164 44496 43110 202196 195722 198563 229139 229527 3 37903 36763 40399 44164 44496 205816 202196 195722 198563 229139 4 35532 37903 36763 40399 44164 212588 205816 202196 195722 198563 5 35533 35532 37903 36763 40399 214320 212588 205816 202196 195722 6 32110 35533 35532 37903 36763 220375 214320 212588 205816 202196 7 33374 32110 35533 35532 37903 204442 220375 214320 212588 205816 8 35462 33374 32110 35533 35532 206903 204442 220375 214320 212588 9 33508 35462 33374 32110 35533 214126 206903 204442 220375 214320 10 36080 33508 35462 33374 32110 226899 214126 206903 204442 220375 11 34560 36080 33508 35462 33374 223532 226899 214126 206903 204442 12 38737 34560 36080 33508 35462 195309 223532 226899 214126 206903 13 38144 38737 34560 36080 33508 186005 195309 223532 226899 214126 14 37594 38144 38737 34560 36080 188906 186005 195309 223532 226899 15 36424 37594 38144 38737 34560 191563 188906 186005 195309 223532 16 36843 36424 37594 38144 38737 189226 191563 188906 186005 195309 17 37246 36843 36424 37594 38144 186413 189226 191563 188906 186005 18 38661 37246 36843 36424 37594 178037 186413 189226 191563 188906 19 40454 38661 37246 36843 36424 166827 178037 186413 189226 191563 20 44928 40454 38661 37246 36843 169362 166827 178037 186413 189226 21 48441 44928 40454 38661 37246 174330 169362 166827 178037 186413 22 48140 48441 44928 40454 38661 187069 174330 169362 166827 178037 23 45998 48140 48441 44928 40454 186530 187069 174330 169362 166827 24 47369 45998 48140 48441 44928 158114 186530 187069 174330 169362 25 49554 47369 45998 48140 48441 151001 158114 186530 187069 174330 26 47510 49554 47369 45998 48140 159612 151001 158114 186530 187069 27 44873 47510 49554 47369 45998 161914 159612 151001 158114 186530 28 45344 44873 47510 49554 47369 164182 161914 159612 151001 158114 29 42413 45344 44873 47510 49554 169701 164182 161914 159612 151001 30 36912 42413 45344 44873 47510 171297 169701 164182 161914 159612 31 43452 36912 42413 45344 44873 166444 171297 169701 164182 161914 32 42142 43452 36912 42413 45344 173476 166444 171297 169701 164182 33 44382 42142 43452 36912 42413 182516 173476 166444 171297 169701 34 43636 44382 42142 43452 36912 202388 182516 173476 166444 171297 35 44167 43636 44382 42142 43452 202300 202388 182516 173476 166444 36 44423 44167 43636 44382 42142 168053 202300 202388 182516 173476 37 42868 44423 44167 43636 44382 167302 168053 202300 202388 182516 38 43908 42868 44423 44167 43636 172608 167302 168053 202300 202388 39 42013 43908 42868 44423 44167 178106 172608 167302 168053 202300 40 38846 42013 43908 42868 44423 185686 178106 172608 167302 168053 41 35087 38846 42013 43908 42868 194581 185686 178106 172608 167302 42 33026 35087 38846 42013 43908 194596 194581 185686 178106 172608 43 34646 33026 35087 38846 42013 197922 194596 194581 185686 178106 44 37135 34646 33026 35087 38846 208795 197922 194596 194581 185686 45 37985 37135 34646 33026 35087 230580 208795 197922 194596 194581 46 43121 37985 37135 34646 33026 240636 230580 208795 197922 194596 47 43722 43121 37985 37135 34646 240048 240636 230580 208795 197922 48 43630 43722 43121 37985 37135 211457 240048 240636 230580 208795 49 42234 43630 43722 43121 37985 211142 211457 240048 240636 230580 50 39351 42234 43630 43722 43121 214771 211142 211457 240048 240636 51 39327 39351 42234 43630 43722 212610 214771 211142 211457 240048 52 35704 39327 39351 42234 43630 219313 212610 214771 211142 211457 53 30466 35704 39327 39351 42234 219277 219313 212610 214771 211142 54 28155 30466 35704 39327 39351 231805 219277 219313 212610 214771 55 29257 28155 30466 35704 39327 229245 231805 219277 219313 212610 56 29998 29257 28155 30466 35704 241114 229245 231805 219277 219313 57 32529 29998 29257 28155 30466 248624 241114 229245 231805 219277 58 34787 32529 29998 29257 28155 265845 248624 241114 229245 231805 59 33855 34787 32529 29998 29257 256446 265845 248624 241114 229245 60 34556 33855 34787 32529 29998 219452 256446 265845 248624 241114 61 31348 34556 33855 34787 32529 217142 219452 256446 265845 248624 62 30805 31348 34556 33855 34787 221678 217142 219452 256446 265845 63 28353 30805 31348 34556 33855 227184 221678 217142 219452 256446 64 24514 28353 30805 31348 34556 230354 227184 221678 217142 219452 65 21106 24514 28353 30805 31348 235243 230354 227184 221678 217142 66 21346 21106 24514 28353 30805 237217 235243 230354 227184 221678 67 23335 21346 21106 24514 28353 233575 237217 235243 230354 227184 68 24379 23335 21346 21106 24514 244460 233575 237217 235243 230354 69 26290 24379 23335 21346 21106 243324 244460 233575 237217 235243 70 30084 26290 24379 23335 21346 260307 243324 244460 233575 237217 71 29429 30084 26290 24379 23335 241476 260307 243324 244460 233575 72 30632 29429 30084 26290 24379 203666 241476 260307 243324 244460 73 27349 30632 29429 30084 26290 200237 203666 241476 260307 243324 74 27264 27349 30632 29429 30084 204045 200237 203666 241476 260307 75 27474 27264 27349 30632 29429 209465 204045 200237 203666 241476 76 24482 27474 27264 27349 30632 213586 209465 204045 200237 203666 77 21453 24482 27474 27264 27349 216234 213586 209465 204045 200237 78 18788 21453 24482 27474 27264 213188 216234 213586 209465 204045 79 19282 18788 21453 24482 27474 208679 213188 216234 213586 209465 80 19713 19282 18788 21453 24482 217859 208679 213188 216234 213586 81 21917 19713 19282 18788 21453 227247 217859 208679 213188 216234 82 23812 21917 19713 19282 18788 243477 227247 217859 208679 213188 83 23785 23812 21917 19713 19282 232571 243477 227247 217859 208679 84 24696 23785 23812 21917 19713 191531 232571 243477 227247 217859 85 24562 24696 23785 23812 21917 186029 191531 232571 243477 227247 86 23580 24562 24696 23785 23812 189733 186029 191531 232571 243477 87 24939 23580 24562 24696 23785 190420 189733 186029 191531 232571 88 23899 24939 23580 24562 24696 194163 190420 189733 186029 191531 89 21454 23899 24939 23580 24562 198770 194163 190420 189733 186029 90 19761 21454 23899 24939 23580 195198 198770 194163 190420 189733 91 19815 19761 21454 23899 24939 193111 195198 198770 194163 190420 92 20780 19815 19761 21454 23899 195411 193111 195198 198770 194163 93 23462 20780 19815 19761 21454 202108 195411 193111 195198 198770 94 25005 23462 20780 19815 19761 215706 202108 195411 193111 195198 95 24725 25005 23462 20780 19815 206348 215706 202108 195411 193111 96 26198 24725 25005 23462 20780 166972 206348 215706 202108 195411 97 27543 26198 24725 25005 23462 166070 166972 206348 215706 202108 98 26471 27543 26198 24725 25005 169292 166070 166972 206348 215706 99 26558 26471 27543 26198 24725 175041 169292 166070 166972 206348 100 25317 26558 26471 27543 26198 177876 175041 169292 166070 166972 101 22896 25317 26558 26471 27543 181140 177876 175041 169292 166070 102 22248 22896 25317 26558 26471 179566 181140 177876 175041 169292 103 23406 22248 22896 25317 26558 175335 179566 181140 177876 175041 104 25073 23406 22248 22896 25317 184128 175335 179566 181140 177876 105 27691 25073 23406 22248 22896 189917 184128 175335 179566 181140 106 30599 27691 25073 23406 22248 194690 189917 184128 175335 179566 107 31948 30599 27691 25073 23406 179612 194690 189917 184128 175335 108 32946 31948 30599 27691 25073 150605 179612 194690 189917 184128 109 34012 32946 31948 30599 27691 150569 150605 179612 194690 189917 110 32936 34012 32946 31948 30599 153745 150569 150605 179612 194690 111 32974 32936 34012 32946 31948 155511 153745 150569 150605 179612 112 30951 32974 32936 34012 32946 159044 155511 153745 150569 150605 113 29812 30951 32974 32936 34012 163095 159044 155511 153745 150569 114 29010 29812 30951 32974 32936 159585 163095 159044 155511 153745 115 31068 29010 29812 30951 32974 158644 159585 163095 159044 155511 116 32447 31068 29010 29812 30951 166618 158644 159585 163095 159044 117 34844 32447 31068 29010 29812 176512 166618 158644 159585 163095 118 35676 34844 32447 31068 29010 200765 176512 166618 158644 159585 119 35387 35676 34844 32447 31068 182698 200765 176512 166618 158644 120 36488 35387 35676 34844 32447 153730 182698 200765 176512 166618 121 35652 36488 35387 35676 34844 156145 153730 182698 200765 176512 122 33488 35652 36488 35387 35676 161570 156145 153730 182698 200765 123 32914 33488 35652 36488 35387 165688 161570 156145 153730 182698 124 29781 32914 33488 35652 36488 173666 165688 161570 156145 153730 125 27951 29781 32914 33488 35652 180144 173666 165688 161570 156145 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Y1 Y2 Y3 Y4 NWWZ 2.916e+03 1.207e+00 -7.694e-02 -2.950e-01 1.061e-01 -1.906e-02 X1 X2 X3 X4 8.303e-03 4.169e-02 -6.189e-02 2.551e-02 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -4559.9 -1385.0 -52.1 1303.2 8560.3 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 2.916e+03 2.007e+03 1.453 0.1489 Y1 1.207e+00 9.634e-02 12.532 <2e-16 *** Y2 -7.694e-02 1.526e-01 -0.504 0.6151 Y3 -2.950e-01 1.520e-01 -1.941 0.0547 . Y4 1.061e-01 1.001e-01 1.060 0.2915 NWWZ -1.906e-02 1.908e-02 -0.999 0.3198 X1 8.303e-03 2.962e-02 0.280 0.7798 X2 4.169e-02 3.111e-02 1.340 0.1828 X3 -6.189e-02 2.857e-02 -2.166 0.0324 * X4 2.551e-02 1.805e-02 1.414 0.1602 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 2053 on 115 degrees of freedom Multiple R-squared: 0.9361, Adjusted R-squared: 0.9311 F-statistic: 187.1 on 9 and 115 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,] 0.26396106 5.279221e-01 7.360389e-01 [2,] 0.16993592 3.398718e-01 8.300641e-01 [3,] 0.12204144 2.440829e-01 8.779586e-01 [4,] 0.09155697 1.831139e-01 9.084430e-01 [5,] 0.08870044 1.774009e-01 9.112996e-01 [6,] 0.06917355 1.383471e-01 9.308264e-01 [7,] 0.04569638 9.139277e-02 9.543036e-01 [8,] 0.28298737 5.659747e-01 7.170126e-01 [9,] 0.46945928 9.389186e-01 5.305407e-01 [10,] 0.41872969 8.374594e-01 5.812703e-01 [11,] 0.33958699 6.791740e-01 6.604130e-01 [12,] 0.29544958 5.908992e-01 7.045504e-01 [13,] 0.33031095 6.606219e-01 6.696891e-01 [14,] 0.26846727 5.369345e-01 7.315327e-01 [15,] 0.44192483 8.838497e-01 5.580752e-01 [16,] 0.38388659 7.677732e-01 6.161134e-01 [17,] 0.36401243 7.280249e-01 6.359876e-01 [18,] 0.68526663 6.294667e-01 3.147334e-01 [19,] 0.97966642 4.066716e-02 2.033358e-02 [20,] 0.97399968 5.200063e-02 2.600032e-02 [21,] 0.97250819 5.498361e-02 2.749181e-02 [22,] 0.96330811 7.338378e-02 3.669189e-02 [23,] 0.96898268 6.203463e-02 3.101732e-02 [24,] 0.95905646 8.188708e-02 4.094354e-02 [25,] 0.95072511 9.854977e-02 4.927489e-02 [26,] 0.97181269 5.637462e-02 2.818731e-02 [27,] 0.96628196 6.743607e-02 3.371804e-02 [28,] 0.97405143 5.189715e-02 2.594857e-02 [29,] 0.97984550 4.030901e-02 2.015450e-02 [30,] 0.97646228 4.707544e-02 2.353772e-02 [31,] 0.97903765 4.192470e-02 2.096235e-02 [32,] 0.98506246 2.987509e-02 1.493754e-02 [33,] 0.98281770 3.436461e-02 1.718230e-02 [34,] 0.99940458 1.190848e-03 5.954241e-04 [35,] 0.99920764 1.584722e-03 7.923608e-04 [36,] 0.99877408 2.451847e-03 1.225923e-03 [37,] 0.99826823 3.463545e-03 1.731773e-03 [38,] 0.99750044 4.999129e-03 2.499565e-03 [39,] 0.99776012 4.479762e-03 2.239881e-03 [40,] 0.99751708 4.965843e-03 2.482922e-03 [41,] 0.99899409 2.011823e-03 1.005912e-03 [42,] 0.99863486 2.730281e-03 1.365141e-03 [43,] 0.99934242 1.315158e-03 6.575790e-04 [44,] 0.99896917 2.061658e-03 1.030829e-03 [45,] 0.99933022 1.339555e-03 6.697774e-04 [46,] 0.99937646 1.247080e-03 6.235402e-04 [47,] 0.99915136 1.697273e-03 8.486364e-04 [48,] 0.99910583 1.788333e-03 8.941666e-04 [49,] 0.99917196 1.656075e-03 8.280373e-04 [50,] 0.99946065 1.078691e-03 5.393453e-04 [51,] 0.99953535 9.293024e-04 4.646512e-04 [52,] 0.99988208 2.358322e-04 1.179161e-04 [53,] 0.99991660 1.668094e-04 8.340468e-05 [54,] 0.99993274 1.345164e-04 6.725819e-05 [55,] 0.99992206 1.558745e-04 7.793726e-05 [56,] 0.99988124 2.375162e-04 1.187581e-04 [57,] 0.99988205 2.359090e-04 1.179545e-04 [58,] 0.99997555 4.889787e-05 2.444894e-05 [59,] 0.99996798 6.403887e-05 3.201944e-05 [60,] 0.99995075 9.849153e-05 4.924577e-05 [61,] 0.99996399 7.202377e-05 3.601188e-05 [62,] 0.99999069 1.862652e-05 9.313259e-06 [63,] 0.99998484 3.031655e-05 1.515827e-05 [64,] 0.99999946 1.077631e-06 5.388156e-07 [65,] 0.99999949 1.018756e-06 5.093782e-07 [66,] 0.99999922 1.563836e-06 7.819178e-07 [67,] 0.99999888 2.236822e-06 1.118411e-06 [68,] 0.99999777 4.455625e-06 2.227813e-06 [69,] 0.99999716 5.683853e-06 2.841927e-06 [70,] 0.99999547 9.055516e-06 4.527758e-06 [71,] 0.99999181 1.638512e-05 8.192558e-06 [72,] 0.99998365 3.269814e-05 1.634907e-05 [73,] 0.99996899 6.201779e-05 3.100890e-05 [74,] 0.99994576 1.084899e-04 5.424496e-05 [75,] 0.99992176 1.564710e-04 7.823549e-05 [76,] 0.99996713 6.574705e-05 3.287352e-05 [77,] 0.99998811 2.378000e-05 1.189000e-05 [78,] 0.99997683 4.634038e-05 2.317019e-05 [79,] 0.99995251 9.497815e-05 4.748907e-05 [80,] 0.99989638 2.072428e-04 1.036214e-04 [81,] 0.99985094 2.981255e-04 1.490628e-04 [82,] 0.99968334 6.333175e-04 3.166588e-04 [83,] 0.99965974 6.805219e-04 3.402610e-04 [84,] 0.99931982 1.360361e-03 6.801805e-04 [85,] 0.99864856 2.702889e-03 1.351445e-03 [86,] 0.99773793 4.524134e-03 2.262067e-03 [87,] 0.99654001 6.919980e-03 3.459990e-03 [88,] 0.99438918 1.122165e-02 5.610823e-03 [89,] 0.99944058 1.118832e-03 5.594161e-04 [90,] 0.99867082 2.658359e-03 1.329180e-03 [91,] 0.99756040 4.879208e-03 2.439604e-03 [92,] 0.99652631 6.947371e-03 3.473686e-03 [93,] 0.99270721 1.458559e-02 7.292793e-03 [94,] 0.98428061 3.143877e-02 1.571939e-02 [95,] 0.97415874 5.168253e-02 2.584126e-02 [96,] 0.99206000 1.587999e-02 7.939995e-03 [97,] 0.98558647 2.882706e-02 1.441353e-02 [98,] 0.98153769 3.692461e-02 1.846231e-02 [99,] 0.96677361 6.645278e-02 3.322639e-02 [100,] 0.91691318 1.661736e-01 8.308682e-02 > postscript(file="/var/www/html/freestat/rcomp/tmp/1nxjy1291972173.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index') > points(x[,1]-mysum$resid) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/2y70j1291972173.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/3y70j1291972173.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/4y70j1291972173.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals') > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/5jq2g1291972174.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 = 125 Frequency = 1 1 2 3 4 5 6 -3017.62577 -695.90197 2550.25802 -2119.05419 457.80293 -2549.22990 7 8 9 10 11 12 1927.54484 2339.17647 -1936.20761 2831.72058 -1374.41464 3379.29700 13 14 15 16 17 18 -603.72044 -62.67304 -467.24414 660.50487 640.18123 1365.62479 19 20 21 22 23 24 1489.76130 4358.55441 3077.20971 -1126.12493 -1385.02133 2285.17012 25 26 27 28 29 30 2973.32884 -1153.49244 -1999.12376 1947.15157 -1885.32472 -4559.86522 31 32 33 34 35 36 8560.31715 -1591.64349 1695.30498 326.60756 865.87031 122.73750 37 38 39 40 41 42 -885.09396 3310.54616 -1965.84059 -2546.16569 -1930.79138 -551.33146 43 44 45 46 47 48 2555.65588 2693.43899 414.17535 5174.98708 -211.57220 -535.62584 49 50 51 52 53 54 -26.67487 -627.95435 817.52960 -2696.12285 -3998.06697 -232.05653 55 56 57 58 59 60 2509.33513 133.04174 2655.69837 1778.35167 -1418.56945 66.35303 61 62 63 64 65 66 -2132.66230 1363.72729 -2260.20749 -3575.18413 -2180.02628 1303.16494 67 68 69 70 71 72 1633.80985 73.93157 1347.12099 3079.24018 -1598.09949 -479.81975 73 74 75 76 77 78 -2235.14527 1218.93317 58.17777 -3662.95818 -2627.02494 -1807.94737 79 80 81 82 83 84 711.16928 162.67066 1454.03957 797.08691 -1324.22813 -651.87286 85 86 87 88 89 90 -106.86205 -327.65426 428.02440 -1846.77576 -2809.43566 -1439.92837 91 92 93 94 95 96 30.85484 589.15292 1727.11767 371.60516 -1660.82021 73.82619 97 98 99 100 101 102 1160.40491 -883.82107 -1012.84885 -1380.17010 -2733.74741 -316.70139 103 104 105 106 107 108 887.14626 921.71917 1714.95689 1455.51694 -52.09527 -356.17748 109 110 111 112 113 114 1205.52328 -775.89924 -607.43635 -1892.45501 -844.96850 -521.74074 115 116 117 118 119 120 1831.93860 1009.96722 1625.70967 441.18424 -920.03785 150.38580 121 122 123 124 125 242.68634 -1446.65470 -516.24483 -2706.02795 -1187.81692 > postscript(file="/var/www/html/freestat/rcomp/tmp/6jq2g1291972174.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 = 125 Frequency = 1 lag(myerror, k = 1) myerror 0 -3017.62577 NA 1 -695.90197 -3017.62577 2 2550.25802 -695.90197 3 -2119.05419 2550.25802 4 457.80293 -2119.05419 5 -2549.22990 457.80293 6 1927.54484 -2549.22990 7 2339.17647 1927.54484 8 -1936.20761 2339.17647 9 2831.72058 -1936.20761 10 -1374.41464 2831.72058 11 3379.29700 -1374.41464 12 -603.72044 3379.29700 13 -62.67304 -603.72044 14 -467.24414 -62.67304 15 660.50487 -467.24414 16 640.18123 660.50487 17 1365.62479 640.18123 18 1489.76130 1365.62479 19 4358.55441 1489.76130 20 3077.20971 4358.55441 21 -1126.12493 3077.20971 22 -1385.02133 -1126.12493 23 2285.17012 -1385.02133 24 2973.32884 2285.17012 25 -1153.49244 2973.32884 26 -1999.12376 -1153.49244 27 1947.15157 -1999.12376 28 -1885.32472 1947.15157 29 -4559.86522 -1885.32472 30 8560.31715 -4559.86522 31 -1591.64349 8560.31715 32 1695.30498 -1591.64349 33 326.60756 1695.30498 34 865.87031 326.60756 35 122.73750 865.87031 36 -885.09396 122.73750 37 3310.54616 -885.09396 38 -1965.84059 3310.54616 39 -2546.16569 -1965.84059 40 -1930.79138 -2546.16569 41 -551.33146 -1930.79138 42 2555.65588 -551.33146 43 2693.43899 2555.65588 44 414.17535 2693.43899 45 5174.98708 414.17535 46 -211.57220 5174.98708 47 -535.62584 -211.57220 48 -26.67487 -535.62584 49 -627.95435 -26.67487 50 817.52960 -627.95435 51 -2696.12285 817.52960 52 -3998.06697 -2696.12285 53 -232.05653 -3998.06697 54 2509.33513 -232.05653 55 133.04174 2509.33513 56 2655.69837 133.04174 57 1778.35167 2655.69837 58 -1418.56945 1778.35167 59 66.35303 -1418.56945 60 -2132.66230 66.35303 61 1363.72729 -2132.66230 62 -2260.20749 1363.72729 63 -3575.18413 -2260.20749 64 -2180.02628 -3575.18413 65 1303.16494 -2180.02628 66 1633.80985 1303.16494 67 73.93157 1633.80985 68 1347.12099 73.93157 69 3079.24018 1347.12099 70 -1598.09949 3079.24018 71 -479.81975 -1598.09949 72 -2235.14527 -479.81975 73 1218.93317 -2235.14527 74 58.17777 1218.93317 75 -3662.95818 58.17777 76 -2627.02494 -3662.95818 77 -1807.94737 -2627.02494 78 711.16928 -1807.94737 79 162.67066 711.16928 80 1454.03957 162.67066 81 797.08691 1454.03957 82 -1324.22813 797.08691 83 -651.87286 -1324.22813 84 -106.86205 -651.87286 85 -327.65426 -106.86205 86 428.02440 -327.65426 87 -1846.77576 428.02440 88 -2809.43566 -1846.77576 89 -1439.92837 -2809.43566 90 30.85484 -1439.92837 91 589.15292 30.85484 92 1727.11767 589.15292 93 371.60516 1727.11767 94 -1660.82021 371.60516 95 73.82619 -1660.82021 96 1160.40491 73.82619 97 -883.82107 1160.40491 98 -1012.84885 -883.82107 99 -1380.17010 -1012.84885 100 -2733.74741 -1380.17010 101 -316.70139 -2733.74741 102 887.14626 -316.70139 103 921.71917 887.14626 104 1714.95689 921.71917 105 1455.51694 1714.95689 106 -52.09527 1455.51694 107 -356.17748 -52.09527 108 1205.52328 -356.17748 109 -775.89924 1205.52328 110 -607.43635 -775.89924 111 -1892.45501 -607.43635 112 -844.96850 -1892.45501 113 -521.74074 -844.96850 114 1831.93860 -521.74074 115 1009.96722 1831.93860 116 1625.70967 1009.96722 117 441.18424 1625.70967 118 -920.03785 441.18424 119 150.38580 -920.03785 120 242.68634 150.38580 121 -1446.65470 242.68634 122 -516.24483 -1446.65470 123 -2706.02795 -516.24483 124 -1187.81692 -2706.02795 125 NA -1187.81692 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -695.90197 -3017.62577 [2,] 2550.25802 -695.90197 [3,] -2119.05419 2550.25802 [4,] 457.80293 -2119.05419 [5,] -2549.22990 457.80293 [6,] 1927.54484 -2549.22990 [7,] 2339.17647 1927.54484 [8,] -1936.20761 2339.17647 [9,] 2831.72058 -1936.20761 [10,] -1374.41464 2831.72058 [11,] 3379.29700 -1374.41464 [12,] -603.72044 3379.29700 [13,] -62.67304 -603.72044 [14,] -467.24414 -62.67304 [15,] 660.50487 -467.24414 [16,] 640.18123 660.50487 [17,] 1365.62479 640.18123 [18,] 1489.76130 1365.62479 [19,] 4358.55441 1489.76130 [20,] 3077.20971 4358.55441 [21,] -1126.12493 3077.20971 [22,] -1385.02133 -1126.12493 [23,] 2285.17012 -1385.02133 [24,] 2973.32884 2285.17012 [25,] -1153.49244 2973.32884 [26,] -1999.12376 -1153.49244 [27,] 1947.15157 -1999.12376 [28,] -1885.32472 1947.15157 [29,] -4559.86522 -1885.32472 [30,] 8560.31715 -4559.86522 [31,] -1591.64349 8560.31715 [32,] 1695.30498 -1591.64349 [33,] 326.60756 1695.30498 [34,] 865.87031 326.60756 [35,] 122.73750 865.87031 [36,] -885.09396 122.73750 [37,] 3310.54616 -885.09396 [38,] -1965.84059 3310.54616 [39,] -2546.16569 -1965.84059 [40,] -1930.79138 -2546.16569 [41,] -551.33146 -1930.79138 [42,] 2555.65588 -551.33146 [43,] 2693.43899 2555.65588 [44,] 414.17535 2693.43899 [45,] 5174.98708 414.17535 [46,] -211.57220 5174.98708 [47,] -535.62584 -211.57220 [48,] -26.67487 -535.62584 [49,] -627.95435 -26.67487 [50,] 817.52960 -627.95435 [51,] -2696.12285 817.52960 [52,] -3998.06697 -2696.12285 [53,] -232.05653 -3998.06697 [54,] 2509.33513 -232.05653 [55,] 133.04174 2509.33513 [56,] 2655.69837 133.04174 [57,] 1778.35167 2655.69837 [58,] -1418.56945 1778.35167 [59,] 66.35303 -1418.56945 [60,] -2132.66230 66.35303 [61,] 1363.72729 -2132.66230 [62,] -2260.20749 1363.72729 [63,] -3575.18413 -2260.20749 [64,] -2180.02628 -3575.18413 [65,] 1303.16494 -2180.02628 [66,] 1633.80985 1303.16494 [67,] 73.93157 1633.80985 [68,] 1347.12099 73.93157 [69,] 3079.24018 1347.12099 [70,] -1598.09949 3079.24018 [71,] -479.81975 -1598.09949 [72,] -2235.14527 -479.81975 [73,] 1218.93317 -2235.14527 [74,] 58.17777 1218.93317 [75,] -3662.95818 58.17777 [76,] -2627.02494 -3662.95818 [77,] -1807.94737 -2627.02494 [78,] 711.16928 -1807.94737 [79,] 162.67066 711.16928 [80,] 1454.03957 162.67066 [81,] 797.08691 1454.03957 [82,] -1324.22813 797.08691 [83,] -651.87286 -1324.22813 [84,] -106.86205 -651.87286 [85,] -327.65426 -106.86205 [86,] 428.02440 -327.65426 [87,] -1846.77576 428.02440 [88,] -2809.43566 -1846.77576 [89,] -1439.92837 -2809.43566 [90,] 30.85484 -1439.92837 [91,] 589.15292 30.85484 [92,] 1727.11767 589.15292 [93,] 371.60516 1727.11767 [94,] -1660.82021 371.60516 [95,] 73.82619 -1660.82021 [96,] 1160.40491 73.82619 [97,] -883.82107 1160.40491 [98,] -1012.84885 -883.82107 [99,] -1380.17010 -1012.84885 [100,] -2733.74741 -1380.17010 [101,] -316.70139 -2733.74741 [102,] 887.14626 -316.70139 [103,] 921.71917 887.14626 [104,] 1714.95689 921.71917 [105,] 1455.51694 1714.95689 [106,] -52.09527 1455.51694 [107,] -356.17748 -52.09527 [108,] 1205.52328 -356.17748 [109,] -775.89924 1205.52328 [110,] -607.43635 -775.89924 [111,] -1892.45501 -607.43635 [112,] -844.96850 -1892.45501 [113,] -521.74074 -844.96850 [114,] 1831.93860 -521.74074 [115,] 1009.96722 1831.93860 [116,] 1625.70967 1009.96722 [117,] 441.18424 1625.70967 [118,] -920.03785 441.18424 [119,] 150.38580 -920.03785 [120,] 242.68634 150.38580 [121,] -1446.65470 242.68634 [122,] -516.24483 -1446.65470 [123,] -2706.02795 -516.24483 [124,] -1187.81692 -2706.02795 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -695.90197 -3017.62577 2 2550.25802 -695.90197 3 -2119.05419 2550.25802 4 457.80293 -2119.05419 5 -2549.22990 457.80293 6 1927.54484 -2549.22990 7 2339.17647 1927.54484 8 -1936.20761 2339.17647 9 2831.72058 -1936.20761 10 -1374.41464 2831.72058 11 3379.29700 -1374.41464 12 -603.72044 3379.29700 13 -62.67304 -603.72044 14 -467.24414 -62.67304 15 660.50487 -467.24414 16 640.18123 660.50487 17 1365.62479 640.18123 18 1489.76130 1365.62479 19 4358.55441 1489.76130 20 3077.20971 4358.55441 21 -1126.12493 3077.20971 22 -1385.02133 -1126.12493 23 2285.17012 -1385.02133 24 2973.32884 2285.17012 25 -1153.49244 2973.32884 26 -1999.12376 -1153.49244 27 1947.15157 -1999.12376 28 -1885.32472 1947.15157 29 -4559.86522 -1885.32472 30 8560.31715 -4559.86522 31 -1591.64349 8560.31715 32 1695.30498 -1591.64349 33 326.60756 1695.30498 34 865.87031 326.60756 35 122.73750 865.87031 36 -885.09396 122.73750 37 3310.54616 -885.09396 38 -1965.84059 3310.54616 39 -2546.16569 -1965.84059 40 -1930.79138 -2546.16569 41 -551.33146 -1930.79138 42 2555.65588 -551.33146 43 2693.43899 2555.65588 44 414.17535 2693.43899 45 5174.98708 414.17535 46 -211.57220 5174.98708 47 -535.62584 -211.57220 48 -26.67487 -535.62584 49 -627.95435 -26.67487 50 817.52960 -627.95435 51 -2696.12285 817.52960 52 -3998.06697 -2696.12285 53 -232.05653 -3998.06697 54 2509.33513 -232.05653 55 133.04174 2509.33513 56 2655.69837 133.04174 57 1778.35167 2655.69837 58 -1418.56945 1778.35167 59 66.35303 -1418.56945 60 -2132.66230 66.35303 61 1363.72729 -2132.66230 62 -2260.20749 1363.72729 63 -3575.18413 -2260.20749 64 -2180.02628 -3575.18413 65 1303.16494 -2180.02628 66 1633.80985 1303.16494 67 73.93157 1633.80985 68 1347.12099 73.93157 69 3079.24018 1347.12099 70 -1598.09949 3079.24018 71 -479.81975 -1598.09949 72 -2235.14527 -479.81975 73 1218.93317 -2235.14527 74 58.17777 1218.93317 75 -3662.95818 58.17777 76 -2627.02494 -3662.95818 77 -1807.94737 -2627.02494 78 711.16928 -1807.94737 79 162.67066 711.16928 80 1454.03957 162.67066 81 797.08691 1454.03957 82 -1324.22813 797.08691 83 -651.87286 -1324.22813 84 -106.86205 -651.87286 85 -327.65426 -106.86205 86 428.02440 -327.65426 87 -1846.77576 428.02440 88 -2809.43566 -1846.77576 89 -1439.92837 -2809.43566 90 30.85484 -1439.92837 91 589.15292 30.85484 92 1727.11767 589.15292 93 371.60516 1727.11767 94 -1660.82021 371.60516 95 73.82619 -1660.82021 96 1160.40491 73.82619 97 -883.82107 1160.40491 98 -1012.84885 -883.82107 99 -1380.17010 -1012.84885 100 -2733.74741 -1380.17010 101 -316.70139 -2733.74741 102 887.14626 -316.70139 103 921.71917 887.14626 104 1714.95689 921.71917 105 1455.51694 1714.95689 106 -52.09527 1455.51694 107 -356.17748 -52.09527 108 1205.52328 -356.17748 109 -775.89924 1205.52328 110 -607.43635 -775.89924 111 -1892.45501 -607.43635 112 -844.96850 -1892.45501 113 -521.74074 -844.96850 114 1831.93860 -521.74074 115 1009.96722 1831.93860 116 1625.70967 1009.96722 117 441.18424 1625.70967 118 -920.03785 441.18424 119 150.38580 -920.03785 120 242.68634 150.38580 121 -1446.65470 242.68634 122 -516.24483 -1446.65470 123 -2706.02795 -516.24483 124 -1187.81692 -2706.02795 > plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals') > lines(lowess(z)) > abline(lm(z)) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/7uhjj1291972174.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/8uhjj1291972174.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/9nr1m1291972174.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) > plot(mylm, las = 1, sub='Residual Diagnostics') > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/www/html/freestat/rcomp/tmp/10nr1m1291972174.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') + grid() + dev.off() + } null device 1 > > #Note: the /var/www/html/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE) > a<-table.row.end(a) > myeq <- colnames(x)[1] > myeq <- paste(myeq, '[t] = ', sep='') > for (i in 1:k){ + if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '') + myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ') + if (rownames(mysum$coefficients)[i] != '(Intercept)') { + myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='') + if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='') + } + } > myeq <- paste(myeq, ' + e[t]') > a<-table.row.start(a) > a<-table.element(a, myeq) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/freestat/rcomp/tmp/11q9za1291972174.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Variable',header=TRUE) > a<-table.element(a,'Parameter',header=TRUE) > a<-table.element(a,'S.D.',header=TRUE) > a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE) > a<-table.element(a,'2-tail p-value',header=TRUE) > a<-table.element(a,'1-tail p-value',header=TRUE) > a<-table.row.end(a) > for (i in 1:k){ + a<-table.row.start(a) + a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE) + a<-table.element(a,mysum$coefficients[i,1]) + a<-table.element(a, round(mysum$coefficients[i,2],6)) + a<-table.element(a, round(mysum$coefficients[i,3],4)) + a<-table.element(a, round(mysum$coefficients[i,4],6)) + a<-table.element(a, round(mysum$coefficients[i,4]/2,6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/freestat/rcomp/tmp/12t9yy1291972174.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple R',1,TRUE) > a<-table.element(a, sqrt(mysum$r.squared)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'R-squared',1,TRUE) > a<-table.element(a, mysum$r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Adjusted R-squared',1,TRUE) > a<-table.element(a, mysum$adj.r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (value)',1,TRUE) > a<-table.element(a, mysum$fstatistic[1]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[2]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[3]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'p-value',1,TRUE) > a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3])) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Residual Standard Deviation',1,TRUE) > a<-table.element(a, mysum$sigma) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Sum Squared Residuals',1,TRUE) > a<-table.element(a, sum(myerror*myerror)) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/freestat/rcomp/tmp/13iavs1291972174.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Time or Index', 1, TRUE) > a<-table.element(a, 'Actuals', 1, TRUE) > a<-table.element(a, 'Interpolation
Forecast', 1, TRUE) > a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE) > a<-table.row.end(a) > for (i in 1:n) { + a<-table.row.start(a) + a<-table.element(a,i, 1, TRUE) + a<-table.element(a,x[i]) + a<-table.element(a,x[i]-mysum$resid[i]) + a<-table.element(a,mysum$resid[i]) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/freestat/rcomp/tmp/14rw0m1291972174.tab") > if (n > n25) { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'p-values',header=TRUE) + a<-table.element(a,'Alternative Hypothesis',3,header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'breakpoint index',header=TRUE) + a<-table.element(a,'greater',header=TRUE) + a<-table.element(a,'2-sided',header=TRUE) + a<-table.element(a,'less',header=TRUE) + a<-table.row.end(a) + for (mypoint in kp3:nmkm3) { + a<-table.row.start(a) + a<-table.element(a,mypoint,header=TRUE) + a<-table.element(a,gqarr[mypoint-kp3+1,1]) + a<-table.element(a,gqarr[mypoint-kp3+1,2]) + a<-table.element(a,gqarr[mypoint-kp3+1,3]) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/www/html/freestat/rcomp/tmp/157ta31291972174.tab") + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Description',header=TRUE) + a<-table.element(a,'# significant tests',header=TRUE) + a<-table.element(a,'% significant tests',header=TRUE) + a<-table.element(a,'OK/NOK',header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'1% type I error level',header=TRUE) + a<-table.element(a,numsignificant1) + a<-table.element(a,numsignificant1/numgqtests) + if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'5% type I error level',header=TRUE) + a<-table.element(a,numsignificant5) + a<-table.element(a,numsignificant5/numgqtests) + if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'10% type I error level',header=TRUE) + a<-table.element(a,numsignificant10) + a<-table.element(a,numsignificant10/numgqtests) + if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/www/html/freestat/rcomp/tmp/16ac8r1291972174.tab") + } > > try(system("convert tmp/1nxjy1291972173.ps tmp/1nxjy1291972173.png",intern=TRUE)) character(0) > try(system("convert tmp/2y70j1291972173.ps tmp/2y70j1291972173.png",intern=TRUE)) character(0) > try(system("convert tmp/3y70j1291972173.ps tmp/3y70j1291972173.png",intern=TRUE)) character(0) > try(system("convert tmp/4y70j1291972173.ps tmp/4y70j1291972173.png",intern=TRUE)) character(0) > try(system("convert tmp/5jq2g1291972174.ps tmp/5jq2g1291972174.png",intern=TRUE)) character(0) > try(system("convert tmp/6jq2g1291972174.ps tmp/6jq2g1291972174.png",intern=TRUE)) character(0) > try(system("convert tmp/7uhjj1291972174.ps tmp/7uhjj1291972174.png",intern=TRUE)) character(0) > try(system("convert tmp/8uhjj1291972174.ps tmp/8uhjj1291972174.png",intern=TRUE)) character(0) > try(system("convert tmp/9nr1m1291972174.ps tmp/9nr1m1291972174.png",intern=TRUE)) character(0) > try(system("convert tmp/10nr1m1291972174.ps tmp/10nr1m1291972174.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.578 2.751 5.972