R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 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(6217 + ,1148 + ,4753 + ,78 + ,14 + ,103 + ,121 + ,5884 + ,1457 + ,4057 + ,3 + ,4 + ,115 + ,248 + ,1431 + ,374 + ,894 + ,15 + ,16 + ,123 + ,9 + ,2610 + ,178 + ,2232 + ,13 + ,11 + ,152 + ,24 + ,3395 + ,1445 + ,1821 + ,5 + ,29 + ,68 + ,27 + ,14135 + ,2870 + ,9878 + ,297 + ,129 + ,442 + ,519 + ,8611 + ,1339 + ,7182 + ,2 + ,4 + ,30 + ,55 + ,255 + ,155 + ,33 + ,7 + ,14 + ,7 + ,39 + ,1722 + ,392 + ,725 + ,8 + ,131 + ,241 + ,225 + ,3736 + ,988 + ,1846 + ,426 + ,7 + ,370 + ,101 + ,2241 + ,600 + ,430 + ,15 + ,156 + ,101 + ,939 + ,1871 + ,837 + ,688 + ,2 + ,69 + ,144 + ,130 + ,6911 + ,779 + ,3268 + ,4 + ,13 + ,2760 + ,86 + ,1515 + ,298 + ,1069 + ,1 + ,8 + ,76 + ,62 + ,2289 + ,616 + ,307 + ,131 + ,28 + ,372 + ,835 + ,1299 + ,606 + ,273 + ,16 + ,213 + ,174 + ,17 + ,774 + ,314 + ,156 + ,4 + ,6 + ,178 + ,116 + ,9485 + ,5281 + ,2199 + ,228 + ,73 + ,977 + ,727 + ,2107 + ,1047 + ,249 + ,5 + ,32 + ,29 + ,745 + ,1720 + ,343 + ,1210 + ,9 + ,9 + ,52 + ,98 + ,2643 + ,1422 + ,1024 + ,32 + ,37 + ,72 + ,55 + ,12106 + ,371 + ,6734 + ,15 + ,137 + ,3812 + ,1036 + ,962 + ,491 + ,72 + ,6 + ,148 + ,237 + ,8 + ,2309 + ,895 + ,535 + ,19 + ,162 + ,535 + ,162 + ,7083 + ,912 + ,5911 + ,70 + ,31 + ,38 + ,121 + ,4895 + ,466 + ,921 + ,86 + ,27 + ,42 + ,3353 + ,5256 + ,2834 + ,743 + ,4 + ,1017 + ,110 + ,546 + ,3856 + ,997 + ,164 + ,811 + ,1613 + ,121 + ,150 + ,3742 + ,920 + ,2391 + ,14 + ,130 + ,103 + ,184 + ,23692 + ,14367 + ,5798 + ,2517 + ,316 + ,325 + ,369 + ,3198 + ,472 + ,906 + ,18 + ,72 + ,49 + ,1681 + ,1993 + ,643 + ,173 + ,6 + ,254 + ,829 + ,88 + ,5442 + ,1932 + ,1547 + ,106 + ,25 + ,323 + ,1508 + ,2245 + ,815 + ,176 + ,5 + ,165 + ,64 + ,1020 + ,1239 + ,478 + ,374 + ,4 + ,97 + ,56 + ,229 + ,6388 + ,1083 + ,1629 + ,1255 + ,907 + ,1298 + ,215 + ,1679 + ,185 + ,1040 + ,9 + ,20 + ,16 + ,409 + ,830 + ,224 + ,130 + ,7 + ,6 + ,54 + ,408 + ,2505 + ,1148 + ,346 + ,2 + ,804 + ,53 + ,152 + ,4387 + ,501 + ,2614 + ,1 + ,381 + ,296 + ,593 + ,2162 + ,882 + ,1051 + ,3 + ,13 + ,42 + ,170 + ,11993 + ,4115 + ,7092 + ,7 + ,152 + ,239 + ,389 + ,18864 + ,11544 + ,1324 + ,433 + ,23 + ,293 + ,5246 + ,1979 + ,1533 + ,290 + ,19 + ,10 + ,76 + ,51 + ,19220 + ,16061 + ,422 + ,204 + ,41 + ,759 + ,1733 + ,4410 + ,3057 + ,565 + ,33 + ,37 + ,55 + ,664 + ,6942 + ,4858 + ,760 + ,11 + ,182 + ,220 + ,911 + ,7762 + ,3417 + ,3497 + ,118 + ,111 + ,242 + ,376 + ,17814 + ,4783 + ,9768 + ,11 + ,82 + ,114 + ,3057 + ,2523 + ,1631 + ,458 + ,32 + ,47 + ,219 + ,136 + ,12586 + ,4622 + ,6225 + ,49 + ,254 + ,237 + ,1199 + ,2244 + ,1292 + ,449 + ,151 + ,106 + ,58 + ,188 + ,7931 + ,3167 + ,2963 + ,56 + ,94 + ,1467 + ,185 + ,15720 + ,4019 + ,6676 + ,122 + ,152 + ,578 + ,4173 + ,3029 + ,1432 + ,354 + ,677 + ,14 + ,25 + ,527 + ,8217 + ,2339 + ,358 + ,54 + ,55 + ,88 + ,5323 + ,14346 + ,8323 + ,1902 + ,37 + ,489 + ,484 + ,3110 + ,7944 + ,6085 + ,761 + ,77 + ,408 + ,48 + ,565 + ,6745 + ,2291 + ,3466 + ,209 + ,119 + ,491 + ,170 + ,10650 + ,3023 + ,3415 + ,43 + ,1195 + ,202 + ,2774 + ,17682 + ,6288 + ,2152 + ,3709 + ,1979 + ,1270 + ,2284 + ,6789 + ,6005 + ,307 + ,9 + ,127 + ,160 + ,182 + ,10109 + ,5006 + ,2237 + ,49 + ,1162 + ,296 + ,1360 + ,11981 + ,6187 + ,1628 + ,168 + ,523 + ,335 + ,3139 + ,24259 + ,2127 + ,19327 + ,1578 + ,89 + ,233 + ,906 + ,68744 + ,17503 + ,31561 + ,830 + ,725 + ,571 + ,17553 + ,85056 + ,3661 + ,76825 + ,11 + ,62 + ,60 + ,4436 + ,3134 + ,2026 + ,101 + ,120 + ,440 + ,412 + ,35 + ,6751 + ,3231 + ,1096 + ,24 + ,62 + ,186 + ,2151 + ,7098 + ,3226 + ,906 + ,86 + ,60 + ,195 + ,2625 + ,6142 + ,1805 + ,3666 + ,343 + ,74 + ,185 + ,69 + ,3974 + ,1290 + ,447 + ,179 + ,323 + ,422 + ,1313 + ,14614 + ,6500 + ,5219 + ,35 + ,236 + ,427 + ,2198 + ,13438 + ,2539 + ,643 + ,4 + ,9 + ,9159 + ,1084 + ,9746 + ,6710 + ,529 + ,881 + ,105 + ,863 + ,658 + ,23024 + ,10028 + ,2608 + ,76 + ,1095 + ,4707 + ,4509 + ,12102 + ,5223 + ,1402 + ,147 + ,40 + ,507 + ,4782 + ,41056 + ,20553 + ,3504 + ,2593 + ,142 + ,958 + ,13306 + ,2495 + ,746 + ,188 + ,5 + ,608 + ,13 + ,935 + ,7056 + ,3947 + ,1383 + ,36 + ,19 + ,70 + ,1601 + ,7708 + ,2218 + ,649 + ,58 + ,1833 + ,474 + ,2475 + ,8229 + ,4053 + ,470 + ,44 + ,217 + ,179 + ,3266 + ,4714 + ,1548 + ,896 + ,8 + ,207 + ,247 + ,1807 + ,14317 + ,6280 + ,986 + ,369 + ,4304 + ,1989 + ,389 + ,5267 + ,1674 + ,1315 + ,777 + ,14 + ,321 + ,1165 + ,4087 + ,3700 + ,126 + ,11 + ,74 + ,158 + ,18 + ,3823 + ,843 + ,932 + ,13 + ,161 + ,340 + ,1532 + ,2137 + ,1449 + ,310 + ,45 + ,60 + ,154 + ,118 + ,4241 + ,2098 + ,548 + ,73 + ,174 + ,963 + ,384 + ,13654 + ,4027 + ,4649 + ,1876 + ,584 + ,1770 + ,748 + ,1913 + ,1343 + ,70 + ,10 + ,307 + ,112 + ,70 + ,2380 + ,1763 + ,314 + ,17 + ,22 + ,102 + ,162 + ,5223 + ,731 + ,4038 + ,24 + ,188 + ,99 + ,142 + ,2337 + ,1923 + ,127 + ,125 + ,24 + ,129 + ,10 + ,10031 + ,2334 + ,276 + ,89 + ,467 + ,4178 + ,2687 + ,4588 + ,2647 + ,624 + ,51 + ,49 + ,315 + ,900 + ,9479 + ,3400 + ,4929 + ,782 + ,123 + ,182 + ,62 + ,18171 + ,2434 + ,14635 + ,7 + ,237 + ,852 + ,6 + ,14015 + ,2237 + ,9832 + ,14 + ,755 + ,1122 + ,55 + ,4919 + ,1700 + ,1148 + ,244 + ,539 + ,177 + ,1112 + ,4573 + ,513 + ,2482 + ,22 + ,107 + ,114 + ,1334 + ,82257 + ,22476 + ,47568 + ,6098 + ,186 + ,974 + ,4954 + ,2375 + ,385 + ,728 + ,5 + ,284 + ,92 + ,880 + ,3772 + ,1961 + ,512 + ,431 + ,99 + ,61 + ,707 + ,3954 + ,1135 + ,574 + ,24 + ,123 + ,779 + ,1318 + ,4861 + ,698 + ,834 + ,18 + ,2869 + ,254 + ,189 + ,2652 + ,308 + ,918 + ,19 + ,483 + ,161 + ,764 + ,13527 + ,2432 + ,7258 + ,115 + ,912 + ,306 + ,2504 + ,28039 + ,810 + ,23428 + ,3 + ,730 + ,282 + ,2786 + ,2874 + ,456 + ,418 + ,311 + ,1126 + ,350 + ,212 + ,11152 + ,765 + ,9300 + ,156 + ,36 + ,605 + ,290 + ,2727 + ,1018 + ,363 + ,40 + ,30 + ,71 + ,1204 + ,3056 + ,1682 + ,290 + ,6 + ,199 + ,225 + ,655 + ,47201 + ,4177 + ,33868 + ,639 + ,998 + ,4298 + ,3221 + ,2370 + ,1137 + ,205 + ,22 + ,145 + ,302 + ,560 + ,2439 + ,1870 + ,218 + ,6 + ,24 + ,88 + ,233 + ,10484 + ,6845 + ,1048 + ,1750 + ,30 + ,220 + ,591 + ,3107 + ,636 + ,1742 + ,7 + ,335 + ,58 + ,329 + ,14931 + ,1375 + ,377 + ,51 + ,11986 + ,379 + ,762 + ,8929 + ,1418 + ,401 + ,23 + ,857 + ,2859 + ,3371 + ,3814 + ,1479 + ,959 + ,15 + ,173 + ,311 + ,878) + ,dim=c(7 + ,121) + ,dimnames=list(c('Totaal' + ,'InbrengInContanten' + ,'InbrengInNatura' + ,'TeStortenBedrag' + ,'ConversieVanEigenMiddelen' + ,'Schuldconversie' + ,'Uitgiftepremies') + ,1:121)) > y <- array(NA,dim=c(7,121),dimnames=list(c('Totaal','InbrengInContanten','InbrengInNatura','TeStortenBedrag','ConversieVanEigenMiddelen','Schuldconversie','Uitgiftepremies'),1:121)) > 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.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, 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 Totaal InbrengInContanten InbrengInNatura TeStortenBedrag 1 6217 1148 4753 78 2 5884 1457 4057 3 3 1431 374 894 15 4 2610 178 2232 13 5 3395 1445 1821 5 6 14135 2870 9878 297 7 8611 1339 7182 2 8 255 155 33 7 9 1722 392 725 8 10 3736 988 1846 426 11 2241 600 430 15 12 1871 837 688 2 13 6911 779 3268 4 14 1515 298 1069 1 15 2289 616 307 131 16 1299 606 273 16 17 774 314 156 4 18 9485 5281 2199 228 19 2107 1047 249 5 20 1720 343 1210 9 21 2643 1422 1024 32 22 12106 371 6734 15 23 962 491 72 6 24 2309 895 535 19 25 7083 912 5911 70 26 4895 466 921 86 27 5256 2834 743 4 28 3856 997 164 811 29 3742 920 2391 14 30 23692 14367 5798 2517 31 3198 472 906 18 32 1993 643 173 6 33 5442 1932 1547 106 34 2245 815 176 5 35 1239 478 374 4 36 6388 1083 1629 1255 37 1679 185 1040 9 38 830 224 130 7 39 2505 1148 346 2 40 4387 501 2614 1 41 2162 882 1051 3 42 11993 4115 7092 7 43 18864 11544 1324 433 44 1979 1533 290 19 45 19220 16061 422 204 46 4410 3057 565 33 47 6942 4858 760 11 48 7762 3417 3497 118 49 17814 4783 9768 11 50 2523 1631 458 32 51 12586 4622 6225 49 52 2244 1292 449 151 53 7931 3167 2963 56 54 15720 4019 6676 122 55 3029 1432 354 677 56 8217 2339 358 54 57 14346 8323 1902 37 58 7944 6085 761 77 59 6745 2291 3466 209 60 10650 3023 3415 43 61 17682 6288 2152 3709 62 6789 6005 307 9 63 10109 5006 2237 49 64 11981 6187 1628 168 65 24259 2127 19327 1578 66 68744 17503 31561 830 67 85056 3661 76825 11 68 3134 2026 101 120 69 6751 3231 1096 24 70 7098 3226 906 86 71 6142 1805 3666 343 72 3974 1290 447 179 73 14614 6500 5219 35 74 13438 2539 643 4 75 9746 6710 529 881 76 23024 10028 2608 76 77 12102 5223 1402 147 78 41056 20553 3504 2593 79 2495 746 188 5 80 7056 3947 1383 36 81 7708 2218 649 58 82 8229 4053 470 44 83 4714 1548 896 8 84 14317 6280 986 369 85 5267 1674 1315 777 86 4087 3700 126 11 87 3823 843 932 13 88 2137 1449 310 45 89 4241 2098 548 73 90 13654 4027 4649 1876 91 1913 1343 70 10 92 2380 1763 314 17 93 5223 731 4038 24 94 2337 1923 127 125 95 10031 2334 276 89 96 4588 2647 624 51 97 9479 3400 4929 782 98 18171 2434 14635 7 99 14015 2237 9832 14 100 4919 1700 1148 244 101 4573 513 2482 22 102 82257 22476 47568 6098 103 2375 385 728 5 104 3772 1961 512 431 105 3954 1135 574 24 106 4861 698 834 18 107 2652 308 918 19 108 13527 2432 7258 115 109 28039 810 23428 3 110 2874 456 418 311 111 11152 765 9300 156 112 2727 1018 363 40 113 3056 1682 290 6 114 47201 4177 33868 639 115 2370 1137 205 22 116 2439 1870 218 6 117 10484 6845 1048 1750 118 3107 636 1742 7 119 14931 1375 377 51 120 8929 1418 401 23 121 3814 1479 959 15 ConversieVanEigenMiddelen Schuldconversie Uitgiftepremies 1 14 103 121 2 4 115 248 3 16 123 9 4 11 152 24 5 29 68 27 6 129 442 519 7 4 30 55 8 14 7 39 9 131 241 225 10 7 370 101 11 156 101 939 12 69 144 130 13 13 2760 86 14 8 76 62 15 28 372 835 16 213 174 17 17 6 178 116 18 73 977 727 19 32 29 745 20 9 52 98 21 37 72 55 22 137 3812 1036 23 148 237 8 24 162 535 162 25 31 38 121 26 27 42 3353 27 1017 110 546 28 1613 121 150 29 130 103 184 30 316 325 369 31 72 49 1681 32 254 829 88 33 25 323 1508 34 165 64 1020 35 97 56 229 36 907 1298 215 37 20 16 409 38 6 54 408 39 804 53 152 40 381 296 593 41 13 42 170 42 152 239 389 43 23 293 5246 44 10 76 51 45 41 759 1733 46 37 55 664 47 182 220 911 48 111 242 376 49 82 114 3057 50 47 219 136 51 254 237 1199 52 106 58 188 53 94 1467 185 54 152 578 4173 55 14 25 527 56 55 88 5323 57 489 484 3110 58 408 48 565 59 119 491 170 60 1195 202 2774 61 1979 1270 2284 62 127 160 182 63 1162 296 1360 64 523 335 3139 65 89 233 906 66 725 571 17553 67 62 60 4436 68 440 412 35 69 62 186 2151 70 60 195 2625 71 74 185 69 72 323 422 1313 73 236 427 2198 74 9 9159 1084 75 105 863 658 76 1095 4707 4509 77 40 507 4782 78 142 958 13306 79 608 13 935 80 19 70 1601 81 1833 474 2475 82 217 179 3266 83 207 247 1807 84 4304 1989 389 85 14 321 1165 86 74 158 18 87 161 340 1532 88 60 154 118 89 174 963 384 90 584 1770 748 91 307 112 70 92 22 102 162 93 188 99 142 94 24 129 10 95 467 4178 2687 96 49 315 900 97 123 182 62 98 237 852 6 99 755 1122 55 100 539 177 1112 101 107 114 1334 102 186 974 4954 103 284 92 880 104 99 61 707 105 123 779 1318 106 2869 254 189 107 483 161 764 108 912 306 2504 109 730 282 2786 110 1126 350 212 111 36 605 290 112 30 71 1204 113 199 225 655 114 998 4298 3221 115 145 302 560 116 24 88 233 117 30 220 591 118 335 58 329 119 11986 379 762 120 857 2859 3371 121 173 311 878 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) InbrengInContanten 0.1137 1.0000 InbrengInNatura TeStortenBedrag 1.0000 1.0000 ConversieVanEigenMiddelen Schuldconversie 1.0000 1.0000 Uitgiftepremies 1.0001 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -2.2641 -0.2629 -0.1116 0.7957 1.8780 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.137e-01 9.812e-02 1.159e+00 0.249 InbrengInContanten 1.000e+00 3.169e-05 3.155e+04 <2e-16 *** InbrengInNatura 1.000e+00 8.522e-06 1.173e+05 <2e-16 *** TeStortenBedrag 1.000e+00 1.282e-04 7.799e+03 <2e-16 *** ConversieVanEigenMiddelen 1.000e+00 5.935e-05 1.685e+04 <2e-16 *** Schuldconversie 1.000e+00 6.253e-05 1.599e+04 <2e-16 *** Uitgiftepremies 1.000e+00 4.504e-05 2.220e+04 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.7812 on 114 degrees of freedom Multiple R-squared: 1, Adjusted R-squared: 1 F-statistic: 5.873e+09 on 6 and 114 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.40757836 0.81515672 0.5924216 [2,] 0.29641786 0.59283572 0.7035821 [3,] 0.28860408 0.57720816 0.7113959 [4,] 0.22257803 0.44515606 0.7774220 [5,] 0.37935223 0.75870446 0.6206478 [6,] 0.29735880 0.59471759 0.7026412 [7,] 0.22920297 0.45840594 0.7707970 [8,] 0.15858637 0.31717274 0.8414136 [9,] 0.12142000 0.24284000 0.8785800 [10,] 0.08300133 0.16600265 0.9169987 [11,] 0.12282178 0.24564355 0.8771782 [12,] 0.16546839 0.33093679 0.8345316 [13,] 0.12458112 0.24916225 0.8754189 [14,] 0.09125524 0.18251048 0.9087448 [15,] 0.08378953 0.16757905 0.9162105 [16,] 0.06050222 0.12100444 0.9394978 [17,] 0.04195488 0.08390977 0.9580451 [18,] 0.03818002 0.07636004 0.9618200 [19,] 0.02616697 0.05233395 0.9738330 [20,] 0.01759911 0.03519821 0.9824009 [21,] 0.07671156 0.15342312 0.9232884 [22,] 0.05469144 0.10938289 0.9453086 [23,] 0.04532576 0.09065152 0.9546742 [24,] 0.04552791 0.09105581 0.9544721 [25,] 0.03348370 0.06696740 0.9665163 [26,] 0.04310940 0.08621879 0.9568906 [27,] 0.08425058 0.16850116 0.9157494 [28,] 0.06227886 0.12455772 0.9377211 [29,] 0.07638120 0.15276240 0.9236188 [30,] 0.07482177 0.14964355 0.9251782 [31,] 0.07500241 0.15000482 0.9249976 [32,] 0.08581535 0.17163071 0.9141846 [33,] 0.11942592 0.23885184 0.8805741 [34,] 0.10005388 0.20010776 0.8999461 [35,] 0.07810074 0.15620148 0.9218993 [36,] 0.08424774 0.16849547 0.9157523 [37,] 0.11654061 0.23308121 0.8834594 [38,] 0.09281070 0.18562141 0.9071893 [39,] 0.10922557 0.21845114 0.8907744 [40,] 0.12168631 0.24337261 0.8783137 [41,] 0.09633714 0.19267429 0.9036629 [42,] 0.07449897 0.14899793 0.9255010 [43,] 0.05697423 0.11394846 0.9430258 [44,] 0.09271283 0.18542565 0.9072872 [45,] 0.07293973 0.14587945 0.9270603 [46,] 0.05567328 0.11134656 0.9443267 [47,] 0.04570205 0.09140409 0.9542980 [48,] 0.04203153 0.08406305 0.9579685 [49,] 0.03220898 0.06441797 0.9677910 [50,] 0.04173919 0.08347837 0.9582608 [51,] 0.26372175 0.52744349 0.7362783 [52,] 0.23316676 0.46633352 0.7668332 [53,] 0.27571229 0.55142458 0.7242877 [54,] 0.32034501 0.64069002 0.6796550 [55,] 0.32192111 0.64384222 0.6780789 [56,] 0.36620894 0.73241787 0.6337911 [57,] 0.37244060 0.74488120 0.6275594 [58,] 0.44962481 0.89924961 0.5503752 [59,] 0.39750755 0.79501510 0.6024925 [60,] 0.40047907 0.80095814 0.5995209 [61,] 0.35179748 0.70359496 0.6482025 [62,] 0.30420584 0.60841168 0.6957942 [63,] 0.26267364 0.52534728 0.7373264 [64,] 0.30623638 0.61247276 0.6937636 [65,] 0.28727506 0.57455012 0.7127249 [66,] 0.24405738 0.48811476 0.7559426 [67,] 0.26024949 0.52049897 0.7397505 [68,] 0.25257618 0.50515236 0.7474238 [69,] 0.22594963 0.45189926 0.7740504 [70,] 0.19106320 0.38212640 0.8089368 [71,] 0.15672295 0.31344590 0.8432771 [72,] 0.13767920 0.27535840 0.8623208 [73,] 0.11683750 0.23367500 0.8831625 [74,] 0.10700587 0.21401174 0.8929941 [75,] 0.08482567 0.16965134 0.9151743 [76,] 0.07945755 0.15891511 0.9205424 [77,] 0.06025901 0.12051802 0.9397410 [78,] 0.15075322 0.30150644 0.8492468 [79,] 0.15225688 0.30451377 0.8477431 [80,] 0.15762648 0.31525297 0.8423735 [81,] 0.12636684 0.25273368 0.8736332 [82,] 0.13260678 0.26521356 0.8673932 [83,] 0.10070178 0.20140355 0.8992982 [84,] 0.10629680 0.21259360 0.8937032 [85,] 0.12464372 0.24928744 0.8753563 [86,] 0.09535692 0.19071385 0.9046431 [87,] 0.36327364 0.72654729 0.6367264 [88,] 0.38026620 0.76053241 0.6197338 [89,] 0.34545515 0.69091030 0.6545449 [90,] 0.34089885 0.68179771 0.6591011 [91,] 0.41653517 0.83307034 0.5834648 [92,] 0.39119822 0.78239645 0.6088018 [93,] 0.33602680 0.67205360 0.6639732 [94,] 0.33815296 0.67630592 0.6618470 [95,] 0.35671757 0.71343513 0.6432824 [96,] 0.46290959 0.92581919 0.5370904 [97,] 0.51932840 0.96134319 0.4806716 [98,] 0.65512168 0.68975665 0.3448783 [99,] 0.56599476 0.86801048 0.4340052 [100,] 0.53331023 0.93337953 0.4666898 [101,] 0.46037875 0.92075750 0.5396213 [102,] 0.31063688 0.62127376 0.6893631 > postscript(file="/var/wessaorg/rcomp/tmp/12giu1353055832.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index') > points(x[,1]-mysum$resid) > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/2yuwt1353055832.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/3g3x01353055832.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/4tncc1353055832.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals') > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/51mt71353055832.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 = 121 Frequency = 1 1 2 3 4 5 6 -0.10975799 -0.10592255 -0.11162829 -0.11911869 -0.08970735 -0.12589385 7 8 9 10 11 12 -1.09971518 -0.11369703 -0.12998689 -2.13023505 -0.16504660 0.88985948 13 14 15 16 17 18 0.82862347 0.88538162 -0.16587450 -0.11406522 -0.11853648 -0.08208947 19 20 21 22 23 24 -0.13741058 -1.11583786 0.90768175 0.72971941 -0.11449957 0.87645105 25 26 27 28 29 30 -0.11524029 -0.30843892 1.87694564 -0.19722133 -0.11573940 0.02700613 31 32 33 34 35 36 -0.20829375 -0.13336923 0.82340791 -0.16378396 0.87776846 0.77407097 37 38 39 40 41 42 -0.13683309 0.86510185 -0.12694181 0.83851494 0.89213843 -1.06958780 43 44 45 46 47 48 0.79567110 -0.08716859 0.10053252 -1.09196675 -0.07571236 0.91751425 49 50 51 52 53 54 -1.21118854 -0.09549128 -0.11047879 -0.10976683 -1.10065543 -0.30713700 55 56 57 58 59 60 -0.14775749 -0.38377018 0.84997502 -0.03573484 -1.10490734 -2.26411269 61 62 63 64 65 66 -0.38895101 -1.00410272 -1.13780110 0.79877606 -1.23349832 0.10548224 67 68 69 70 71 72 0.58603058 -0.10244218 0.81999851 -0.21082741 -0.10749563 -0.19312312 73 74 75 76 77 78 -1.13051781 -0.33634935 -0.07435163 0.68319093 0.69496419 -0.61053372 79 80 81 82 83 84 -0.17405569 -0.12907610 0.71172232 -0.23305373 0.79879092 -0.21186035 85 86 87 88 89 90 0.80684965 -0.04203423 1.79892073 0.90231824 0.87636228 -0.22804207 91 92 93 94 95 96 0.89752063 -0.08970193 0.87788423 -1.08287033 -0.33880869 1.87794965 97 98 99 100 101 102 0.90286755 -0.11144481 -0.13551880 -1.17822355 0.80780526 0.68843688 103 104 105 106 107 108 0.82972313 0.86080858 0.80893055 -1.21464663 -1.17436734 -0.26291221 109 110 111 112 113 114 -0.32634375 0.82206727 -0.15076428 0.83220196 -1.12873146 -0.42727619 115 116 117 118 119 120 -1.13546046 -0.09065691 -0.09225035 -0.13496982 0.45464274 -0.37846356 121 -1.14876102 > postscript(file="/var/wessaorg/rcomp/tmp/6wk961353055832.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 = 121 Frequency = 1 lag(myerror, k = 1) myerror 0 -0.10975799 NA 1 -0.10592255 -0.10975799 2 -0.11162829 -0.10592255 3 -0.11911869 -0.11162829 4 -0.08970735 -0.11911869 5 -0.12589385 -0.08970735 6 -1.09971518 -0.12589385 7 -0.11369703 -1.09971518 8 -0.12998689 -0.11369703 9 -2.13023505 -0.12998689 10 -0.16504660 -2.13023505 11 0.88985948 -0.16504660 12 0.82862347 0.88985948 13 0.88538162 0.82862347 14 -0.16587450 0.88538162 15 -0.11406522 -0.16587450 16 -0.11853648 -0.11406522 17 -0.08208947 -0.11853648 18 -0.13741058 -0.08208947 19 -1.11583786 -0.13741058 20 0.90768175 -1.11583786 21 0.72971941 0.90768175 22 -0.11449957 0.72971941 23 0.87645105 -0.11449957 24 -0.11524029 0.87645105 25 -0.30843892 -0.11524029 26 1.87694564 -0.30843892 27 -0.19722133 1.87694564 28 -0.11573940 -0.19722133 29 0.02700613 -0.11573940 30 -0.20829375 0.02700613 31 -0.13336923 -0.20829375 32 0.82340791 -0.13336923 33 -0.16378396 0.82340791 34 0.87776846 -0.16378396 35 0.77407097 0.87776846 36 -0.13683309 0.77407097 37 0.86510185 -0.13683309 38 -0.12694181 0.86510185 39 0.83851494 -0.12694181 40 0.89213843 0.83851494 41 -1.06958780 0.89213843 42 0.79567110 -1.06958780 43 -0.08716859 0.79567110 44 0.10053252 -0.08716859 45 -1.09196675 0.10053252 46 -0.07571236 -1.09196675 47 0.91751425 -0.07571236 48 -1.21118854 0.91751425 49 -0.09549128 -1.21118854 50 -0.11047879 -0.09549128 51 -0.10976683 -0.11047879 52 -1.10065543 -0.10976683 53 -0.30713700 -1.10065543 54 -0.14775749 -0.30713700 55 -0.38377018 -0.14775749 56 0.84997502 -0.38377018 57 -0.03573484 0.84997502 58 -1.10490734 -0.03573484 59 -2.26411269 -1.10490734 60 -0.38895101 -2.26411269 61 -1.00410272 -0.38895101 62 -1.13780110 -1.00410272 63 0.79877606 -1.13780110 64 -1.23349832 0.79877606 65 0.10548224 -1.23349832 66 0.58603058 0.10548224 67 -0.10244218 0.58603058 68 0.81999851 -0.10244218 69 -0.21082741 0.81999851 70 -0.10749563 -0.21082741 71 -0.19312312 -0.10749563 72 -1.13051781 -0.19312312 73 -0.33634935 -1.13051781 74 -0.07435163 -0.33634935 75 0.68319093 -0.07435163 76 0.69496419 0.68319093 77 -0.61053372 0.69496419 78 -0.17405569 -0.61053372 79 -0.12907610 -0.17405569 80 0.71172232 -0.12907610 81 -0.23305373 0.71172232 82 0.79879092 -0.23305373 83 -0.21186035 0.79879092 84 0.80684965 -0.21186035 85 -0.04203423 0.80684965 86 1.79892073 -0.04203423 87 0.90231824 1.79892073 88 0.87636228 0.90231824 89 -0.22804207 0.87636228 90 0.89752063 -0.22804207 91 -0.08970193 0.89752063 92 0.87788423 -0.08970193 93 -1.08287033 0.87788423 94 -0.33880869 -1.08287033 95 1.87794965 -0.33880869 96 0.90286755 1.87794965 97 -0.11144481 0.90286755 98 -0.13551880 -0.11144481 99 -1.17822355 -0.13551880 100 0.80780526 -1.17822355 101 0.68843688 0.80780526 102 0.82972313 0.68843688 103 0.86080858 0.82972313 104 0.80893055 0.86080858 105 -1.21464663 0.80893055 106 -1.17436734 -1.21464663 107 -0.26291221 -1.17436734 108 -0.32634375 -0.26291221 109 0.82206727 -0.32634375 110 -0.15076428 0.82206727 111 0.83220196 -0.15076428 112 -1.12873146 0.83220196 113 -0.42727619 -1.12873146 114 -1.13546046 -0.42727619 115 -0.09065691 -1.13546046 116 -0.09225035 -0.09065691 117 -0.13496982 -0.09225035 118 0.45464274 -0.13496982 119 -0.37846356 0.45464274 120 -1.14876102 -0.37846356 121 NA -1.14876102 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -0.10592255 -0.10975799 [2,] -0.11162829 -0.10592255 [3,] -0.11911869 -0.11162829 [4,] -0.08970735 -0.11911869 [5,] -0.12589385 -0.08970735 [6,] -1.09971518 -0.12589385 [7,] -0.11369703 -1.09971518 [8,] -0.12998689 -0.11369703 [9,] -2.13023505 -0.12998689 [10,] -0.16504660 -2.13023505 [11,] 0.88985948 -0.16504660 [12,] 0.82862347 0.88985948 [13,] 0.88538162 0.82862347 [14,] -0.16587450 0.88538162 [15,] -0.11406522 -0.16587450 [16,] -0.11853648 -0.11406522 [17,] -0.08208947 -0.11853648 [18,] -0.13741058 -0.08208947 [19,] -1.11583786 -0.13741058 [20,] 0.90768175 -1.11583786 [21,] 0.72971941 0.90768175 [22,] -0.11449957 0.72971941 [23,] 0.87645105 -0.11449957 [24,] -0.11524029 0.87645105 [25,] -0.30843892 -0.11524029 [26,] 1.87694564 -0.30843892 [27,] -0.19722133 1.87694564 [28,] -0.11573940 -0.19722133 [29,] 0.02700613 -0.11573940 [30,] -0.20829375 0.02700613 [31,] -0.13336923 -0.20829375 [32,] 0.82340791 -0.13336923 [33,] -0.16378396 0.82340791 [34,] 0.87776846 -0.16378396 [35,] 0.77407097 0.87776846 [36,] -0.13683309 0.77407097 [37,] 0.86510185 -0.13683309 [38,] -0.12694181 0.86510185 [39,] 0.83851494 -0.12694181 [40,] 0.89213843 0.83851494 [41,] -1.06958780 0.89213843 [42,] 0.79567110 -1.06958780 [43,] -0.08716859 0.79567110 [44,] 0.10053252 -0.08716859 [45,] -1.09196675 0.10053252 [46,] -0.07571236 -1.09196675 [47,] 0.91751425 -0.07571236 [48,] -1.21118854 0.91751425 [49,] -0.09549128 -1.21118854 [50,] -0.11047879 -0.09549128 [51,] -0.10976683 -0.11047879 [52,] -1.10065543 -0.10976683 [53,] -0.30713700 -1.10065543 [54,] -0.14775749 -0.30713700 [55,] -0.38377018 -0.14775749 [56,] 0.84997502 -0.38377018 [57,] -0.03573484 0.84997502 [58,] -1.10490734 -0.03573484 [59,] -2.26411269 -1.10490734 [60,] -0.38895101 -2.26411269 [61,] -1.00410272 -0.38895101 [62,] -1.13780110 -1.00410272 [63,] 0.79877606 -1.13780110 [64,] -1.23349832 0.79877606 [65,] 0.10548224 -1.23349832 [66,] 0.58603058 0.10548224 [67,] -0.10244218 0.58603058 [68,] 0.81999851 -0.10244218 [69,] -0.21082741 0.81999851 [70,] -0.10749563 -0.21082741 [71,] -0.19312312 -0.10749563 [72,] -1.13051781 -0.19312312 [73,] -0.33634935 -1.13051781 [74,] -0.07435163 -0.33634935 [75,] 0.68319093 -0.07435163 [76,] 0.69496419 0.68319093 [77,] -0.61053372 0.69496419 [78,] -0.17405569 -0.61053372 [79,] -0.12907610 -0.17405569 [80,] 0.71172232 -0.12907610 [81,] -0.23305373 0.71172232 [82,] 0.79879092 -0.23305373 [83,] -0.21186035 0.79879092 [84,] 0.80684965 -0.21186035 [85,] -0.04203423 0.80684965 [86,] 1.79892073 -0.04203423 [87,] 0.90231824 1.79892073 [88,] 0.87636228 0.90231824 [89,] -0.22804207 0.87636228 [90,] 0.89752063 -0.22804207 [91,] -0.08970193 0.89752063 [92,] 0.87788423 -0.08970193 [93,] -1.08287033 0.87788423 [94,] -0.33880869 -1.08287033 [95,] 1.87794965 -0.33880869 [96,] 0.90286755 1.87794965 [97,] -0.11144481 0.90286755 [98,] -0.13551880 -0.11144481 [99,] -1.17822355 -0.13551880 [100,] 0.80780526 -1.17822355 [101,] 0.68843688 0.80780526 [102,] 0.82972313 0.68843688 [103,] 0.86080858 0.82972313 [104,] 0.80893055 0.86080858 [105,] -1.21464663 0.80893055 [106,] -1.17436734 -1.21464663 [107,] -0.26291221 -1.17436734 [108,] -0.32634375 -0.26291221 [109,] 0.82206727 -0.32634375 [110,] -0.15076428 0.82206727 [111,] 0.83220196 -0.15076428 [112,] -1.12873146 0.83220196 [113,] -0.42727619 -1.12873146 [114,] -1.13546046 -0.42727619 [115,] -0.09065691 -1.13546046 [116,] -0.09225035 -0.09065691 [117,] -0.13496982 -0.09225035 [118,] 0.45464274 -0.13496982 [119,] -0.37846356 0.45464274 [120,] -1.14876102 -0.37846356 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -0.10592255 -0.10975799 2 -0.11162829 -0.10592255 3 -0.11911869 -0.11162829 4 -0.08970735 -0.11911869 5 -0.12589385 -0.08970735 6 -1.09971518 -0.12589385 7 -0.11369703 -1.09971518 8 -0.12998689 -0.11369703 9 -2.13023505 -0.12998689 10 -0.16504660 -2.13023505 11 0.88985948 -0.16504660 12 0.82862347 0.88985948 13 0.88538162 0.82862347 14 -0.16587450 0.88538162 15 -0.11406522 -0.16587450 16 -0.11853648 -0.11406522 17 -0.08208947 -0.11853648 18 -0.13741058 -0.08208947 19 -1.11583786 -0.13741058 20 0.90768175 -1.11583786 21 0.72971941 0.90768175 22 -0.11449957 0.72971941 23 0.87645105 -0.11449957 24 -0.11524029 0.87645105 25 -0.30843892 -0.11524029 26 1.87694564 -0.30843892 27 -0.19722133 1.87694564 28 -0.11573940 -0.19722133 29 0.02700613 -0.11573940 30 -0.20829375 0.02700613 31 -0.13336923 -0.20829375 32 0.82340791 -0.13336923 33 -0.16378396 0.82340791 34 0.87776846 -0.16378396 35 0.77407097 0.87776846 36 -0.13683309 0.77407097 37 0.86510185 -0.13683309 38 -0.12694181 0.86510185 39 0.83851494 -0.12694181 40 0.89213843 0.83851494 41 -1.06958780 0.89213843 42 0.79567110 -1.06958780 43 -0.08716859 0.79567110 44 0.10053252 -0.08716859 45 -1.09196675 0.10053252 46 -0.07571236 -1.09196675 47 0.91751425 -0.07571236 48 -1.21118854 0.91751425 49 -0.09549128 -1.21118854 50 -0.11047879 -0.09549128 51 -0.10976683 -0.11047879 52 -1.10065543 -0.10976683 53 -0.30713700 -1.10065543 54 -0.14775749 -0.30713700 55 -0.38377018 -0.14775749 56 0.84997502 -0.38377018 57 -0.03573484 0.84997502 58 -1.10490734 -0.03573484 59 -2.26411269 -1.10490734 60 -0.38895101 -2.26411269 61 -1.00410272 -0.38895101 62 -1.13780110 -1.00410272 63 0.79877606 -1.13780110 64 -1.23349832 0.79877606 65 0.10548224 -1.23349832 66 0.58603058 0.10548224 67 -0.10244218 0.58603058 68 0.81999851 -0.10244218 69 -0.21082741 0.81999851 70 -0.10749563 -0.21082741 71 -0.19312312 -0.10749563 72 -1.13051781 -0.19312312 73 -0.33634935 -1.13051781 74 -0.07435163 -0.33634935 75 0.68319093 -0.07435163 76 0.69496419 0.68319093 77 -0.61053372 0.69496419 78 -0.17405569 -0.61053372 79 -0.12907610 -0.17405569 80 0.71172232 -0.12907610 81 -0.23305373 0.71172232 82 0.79879092 -0.23305373 83 -0.21186035 0.79879092 84 0.80684965 -0.21186035 85 -0.04203423 0.80684965 86 1.79892073 -0.04203423 87 0.90231824 1.79892073 88 0.87636228 0.90231824 89 -0.22804207 0.87636228 90 0.89752063 -0.22804207 91 -0.08970193 0.89752063 92 0.87788423 -0.08970193 93 -1.08287033 0.87788423 94 -0.33880869 -1.08287033 95 1.87794965 -0.33880869 96 0.90286755 1.87794965 97 -0.11144481 0.90286755 98 -0.13551880 -0.11144481 99 -1.17822355 -0.13551880 100 0.80780526 -1.17822355 101 0.68843688 0.80780526 102 0.82972313 0.68843688 103 0.86080858 0.82972313 104 0.80893055 0.86080858 105 -1.21464663 0.80893055 106 -1.17436734 -1.21464663 107 -0.26291221 -1.17436734 108 -0.32634375 -0.26291221 109 0.82206727 -0.32634375 110 -0.15076428 0.82206727 111 0.83220196 -0.15076428 112 -1.12873146 0.83220196 113 -0.42727619 -1.12873146 114 -1.13546046 -0.42727619 115 -0.09065691 -1.13546046 116 -0.09225035 -0.09065691 117 -0.13496982 -0.09225035 118 0.45464274 -0.13496982 119 -0.37846356 0.45464274 120 -1.14876102 -0.37846356 > plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals') > lines(lowess(z)) > abline(lm(z)) > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7torw1353055832.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/8szbx1353055832.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/9xfye1353055832.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) > plot(mylm, las = 1, sub='Residual Diagnostics') > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/wessaorg/rcomp/tmp/10mke91353055832.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') + grid() + dev.off() + } null device 1 > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE) > a<-table.row.end(a) > myeq <- colnames(x)[1] > myeq <- paste(myeq, '[t] = ', sep='') > for (i in 1:k){ + if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '') + myeq <- paste(myeq, 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/wessaorg/rcomp/tmp/11za491353055832.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/wessaorg/rcomp/tmp/12uy8d1353055833.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/wessaorg/rcomp/tmp/13aiw11353055833.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/wessaorg/rcomp/tmp/14ov191353055833.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/wessaorg/rcomp/tmp/15j5xk1353055833.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/wessaorg/rcomp/tmp/16rcoy1353055833.tab") + } > > try(system("convert tmp/12giu1353055832.ps tmp/12giu1353055832.png",intern=TRUE)) character(0) > try(system("convert tmp/2yuwt1353055832.ps tmp/2yuwt1353055832.png",intern=TRUE)) character(0) > try(system("convert tmp/3g3x01353055832.ps tmp/3g3x01353055832.png",intern=TRUE)) character(0) > try(system("convert tmp/4tncc1353055832.ps tmp/4tncc1353055832.png",intern=TRUE)) character(0) > try(system("convert tmp/51mt71353055832.ps tmp/51mt71353055832.png",intern=TRUE)) character(0) > try(system("convert tmp/6wk961353055832.ps tmp/6wk961353055832.png",intern=TRUE)) character(0) > try(system("convert tmp/7torw1353055832.ps tmp/7torw1353055832.png",intern=TRUE)) character(0) > try(system("convert tmp/8szbx1353055832.ps tmp/8szbx1353055832.png",intern=TRUE)) character(0) > try(system("convert tmp/9xfye1353055832.ps tmp/9xfye1353055832.png",intern=TRUE)) character(0) > try(system("convert tmp/10mke91353055832.ps tmp/10mke91353055832.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 11.987 2.144 14.164