R version 2.9.0 (2009-04-17) Copyright (C) 2009 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. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(1 + ,162556 + ,162556 + ,1081 + ,1081 + ,213118 + ,213118 + ,230380558 + ,6282929 + ,1 + ,29790 + ,29790 + ,309 + ,309 + ,81767 + ,81767 + ,25266003 + ,4324047 + ,1 + ,87550 + ,87550 + ,458 + ,458 + ,153198 + ,153198 + ,70164684 + ,4108272 + ,0 + ,84738 + ,0 + ,588 + ,0 + ,-26007 + ,0 + ,-15292116 + ,-1212617 + ,1 + ,54660 + ,54660 + ,299 + ,299 + ,126942 + ,126942 + ,37955658 + ,1485329 + ,1 + ,42634 + ,42634 + ,156 + ,156 + ,157214 + ,157214 + ,24525384 + ,1779876 + ,0 + ,40949 + ,0 + ,481 + ,0 + ,129352 + ,0 + ,62218312 + ,1367203 + ,1 + ,42312 + ,42312 + ,323 + ,323 + ,234817 + ,234817 + ,75845891 + ,2519076 + ,1 + ,37704 + ,37704 + ,452 + ,452 + ,60448 + ,60448 + ,27322496 + ,912684 + ,1 + ,16275 + ,16275 + ,109 + ,109 + ,47818 + ,47818 + ,5212162 + ,1443586 + ,0 + ,25830 + ,0 + ,115 + ,0 + ,245546 + ,0 + ,28237790 + ,1220017 + ,0 + ,12679 + ,0 + ,110 + ,0 + ,48020 + ,0 + ,5282200 + ,984885 + ,1 + ,18014 + ,18014 + ,239 + ,239 + ,-1710 + ,-1710 + ,-408690 + ,1457425 + ,0 + ,43556 + ,0 + ,247 + ,0 + ,32648 + ,0 + ,8064056 + ,-572920 + ,1 + ,24524 + ,24524 + ,497 + ,497 + ,95350 + ,95350 + ,47388950 + ,929144 + ,0 + ,6532 + ,0 + ,103 + ,0 + ,151352 + ,0 + ,15589256 + ,1151176 + ,0 + ,7123 + ,0 + ,109 + ,0 + ,288170 + ,0 + ,31410530 + ,790090 + ,1 + ,20813 + ,20813 + ,502 + ,502 + ,114337 + ,114337 + ,57397174 + ,774497 + ,1 + ,37597 + ,37597 + ,248 + ,248 + ,37884 + ,37884 + ,9395232 + ,990576 + ,0 + ,17821 + ,0 + ,373 + ,0 + ,122844 + ,0 + ,45820812 + ,454195 + ,1 + ,12988 + ,12988 + ,119 + ,119 + ,82340 + ,82340 + ,9798460 + ,876607 + ,1 + ,22330 + ,22330 + ,84 + ,84 + ,79801 + ,79801 + ,6703284 + ,711969 + ,0 + ,13326 + ,0 + ,102 + ,0 + ,165548 + ,0 + ,16885896 + ,702380 + ,0 + ,16189 + ,0 + ,295 + ,0 + ,116384 + ,0 + ,34333280 + ,264449 + ,0 + ,7146 + ,0 + ,105 + ,0 + ,134028 + ,0 + ,14072940 + ,450033 + ,0 + ,15824 + ,0 + ,64 + ,0 + ,63838 + ,0 + ,4085632 + ,541063 + ,1 + ,26088 + ,26088 + ,267 + ,267 + ,74996 + ,74996 + ,20023932 + ,588864 + ,0 + ,11326 + ,0 + ,129 + ,0 + ,31080 + ,0 + ,4009320 + ,-37216 + ,0 + ,8568 + ,0 + ,37 + ,0 + ,32168 + ,0 + ,1190216 + ,783310 + ,0 + ,14416 + ,0 + ,361 + ,0 + ,49857 + ,0 + ,17998377 + ,467359 + ,1 + ,3369 + ,3369 + ,28 + ,28 + ,87161 + ,87161 + ,2440508 + ,688779 + ,1 + ,11819 + ,11819 + ,85 + ,85 + ,106113 + ,106113 + ,9019605 + ,608419 + ,1 + ,6620 + ,6620 + ,44 + ,44 + ,80570 + ,80570 + ,3545080 + ,696348 + ,1 + ,4519 + ,4519 + ,49 + ,49 + ,102129 + ,102129 + ,5004321 + ,597793 + ,0 + ,2220 + ,0 + ,22 + ,0 + ,301670 + ,0 + ,6636740 + ,821730 + ,0 + ,18562 + ,0 + ,155 + ,0 + ,102313 + ,0 + ,15858515 + ,377934 + ,0 + ,10327 + ,0 + ,91 + ,0 + ,88577 + ,0 + ,8060507 + ,651939 + ,1 + ,5336 + ,5336 + ,81 + ,81 + ,112477 + ,112477 + ,9110637 + ,697458 + ,1 + ,2365 + ,2365 + ,79 + ,79 + ,191778 + ,191778 + ,15150462 + ,700368 + ,0 + ,4069 + ,0 + ,145 + ,0 + ,79804 + ,0 + ,11571580 + ,225986 + ,0 + ,7710 + ,0 + ,816 + ,0 + ,128294 + ,0 + ,104687904 + ,348695 + ,0 + ,13718 + ,0 + ,61 + ,0 + ,96448 + ,0 + ,5883328 + ,373683 + ,0 + ,4525 + ,0 + ,226 + ,0 + ,93811 + ,0 + ,21201286 + ,501709 + ,0 + ,6869 + ,0 + ,105 + ,0 + ,117520 + ,0 + ,12339600 + ,413743 + ,0 + ,4628 + ,0 + ,62 + ,0 + ,69159 + ,0 + ,4287858 + ,379825 + ,1 + ,3653 + ,3653 + ,24 + ,24 + ,101792 + ,101792 + ,2443008 + ,336260 + ,1 + ,1265 + ,1265 + ,26 + ,26 + ,210568 + ,210568 + ,5474768 + ,636765 + ,1 + ,7489 + ,7489 + ,322 + ,322 + ,136996 + ,136996 + ,44112712 + ,481231 + ,0 + ,4901 + ,0 + ,84 + ,0 + ,121920 + ,0 + ,10241280 + ,469107 + ,0 + ,2284 + ,0 + ,33 + ,0 + ,76403 + ,0 + ,2521299 + ,211928 + ,1 + ,3160 + ,3160 + ,108 + ,108 + ,108094 + ,108094 + ,11674152 + ,563925 + ,1 + ,4150 + ,4150 + ,150 + ,150 + ,134759 + ,134759 + ,20213850 + ,511939 + ,1 + ,7285 + ,7285 + ,115 + ,115 + ,188873 + ,188873 + ,21720395 + ,521016 + ,1 + ,1134 + ,1134 + ,162 + ,162 + ,146216 + ,146216 + ,23686992 + ,543856 + ,1 + ,4658 + ,4658 + ,158 + ,158 + ,156608 + ,156608 + ,24744064 + ,329304 + ,0 + ,2384 + ,0 + ,97 + ,0 + ,61348 + ,0 + ,5950756 + ,423262 + ,0 + ,3748 + ,0 + ,9 + ,0 + ,50350 + ,0 + ,453150 + ,509665 + ,0 + ,5371 + ,0 + ,66 + ,0 + ,87720 + ,0 + ,5789520 + ,455881 + ,0 + ,1285 + ,0 + ,107 + ,0 + ,99489 + ,0 + ,10645323 + ,367772 + ,1 + ,9327 + ,9327 + ,101 + ,101 + ,87419 + ,87419 + ,8829319 + ,406339 + ,1 + ,5565 + ,5565 + ,47 + ,47 + ,94355 + ,94355 + ,4434685 + ,493408 + ,0 + ,1528 + ,0 + ,38 + ,0 + ,60326 + ,0 + ,2292388 + ,232942 + ,1 + ,3122 + ,3122 + ,34 + ,34 + ,94670 + ,94670 + ,3218780 + ,416002 + ,1 + ,7317 + ,7317 + ,84 + ,84 + ,82425 + ,82425 + ,6923700 + ,337430 + ,0 + ,2675 + ,0 + ,79 + ,0 + ,59017 + ,0 + ,4662343 + ,361517 + ,0 + ,13253 + ,0 + ,947 + ,0 + ,90829 + ,0 + ,86015063 + ,360962 + ,0 + ,880 + ,0 + ,74 + ,0 + ,80791 + ,0 + ,5978534 + ,235561 + ,1 + ,2053 + ,2053 + ,53 + ,53 + ,100423 + ,100423 + ,5322419 + ,408247 + ,0 + ,1424 + ,0 + ,94 + ,0 + ,131116 + ,0 + ,12324904 + ,450296 + ,1 + ,4036 + ,4036 + ,63 + ,63 + ,100269 + ,100269 + ,6316947 + ,418799 + ,1 + ,3045 + ,3045 + ,58 + ,58 + ,27330 + ,27330 + ,1585140 + ,247405 + ,0 + ,5119 + ,0 + ,49 + ,0 + ,39039 + ,0 + ,1912911 + ,378519 + ,0 + ,1431 + ,0 + ,34 + ,0 + ,106885 + ,0 + ,3634090 + ,326638 + ,0 + ,554 + ,0 + ,11 + ,0 + ,79285 + ,0 + ,872135 + ,328233 + ,0 + ,1975 + ,0 + ,35 + ,0 + ,118881 + ,0 + ,4160835 + ,386225 + ,1 + ,1286 + ,1286 + ,17 + ,17 + ,77623 + ,77623 + ,1319591 + ,283662 + ,0 + ,1012 + ,0 + ,47 + ,0 + ,114768 + ,0 + ,5394096 + ,370225 + ,0 + ,810 + ,0 + ,43 + ,0 + ,74015 + ,0 + ,3182645 + ,269236 + ,0 + ,1280 + ,0 + ,117 + ,0 + ,69465 + ,0 + ,8127405 + ,365732 + ,1 + ,666 + ,666 + ,171 + ,171 + ,117869 + ,117869 + ,20155599 + ,420383 + ,0 + ,1380 + ,0 + ,26 + ,0 + ,60982 + ,0 + ,1585532 + ,345811 + ,1 + ,4608 + ,4608 + ,73 + ,73 + ,90131 + ,90131 + ,6579563 + ,431809 + ,0 + ,876 + ,0 + ,59 + ,0 + ,138971 + ,0 + ,8199289 + ,418876 + ,0 + ,814 + ,0 + ,18 + ,0 + ,39625 + ,0 + ,713250 + ,297476 + ,0 + ,514 + ,0 + ,15 + ,0 + ,102725 + ,0 + ,1540875 + ,416776 + ,1 + ,5692 + ,5692 + ,72 + ,72 + ,64239 + ,64239 + ,4625208 + ,357257 + ,0 + ,3642 + ,0 + ,86 + ,0 + ,90262 + ,0 + ,7762532 + ,458343 + ,0 + ,540 + ,0 + ,14 + ,0 + ,103960 + ,0 + ,1455440 + ,388386 + ,0 + ,2099 + ,0 + ,64 + ,0 + ,106611 + ,0 + ,6823104 + ,358934 + ,0 + ,567 + ,0 + ,11 + ,0 + ,103345 + ,0 + ,1136795 + ,407560 + ,0 + ,2001 + ,0 + ,52 + ,0 + ,95551 + ,0 + ,4968652 + ,392558 + ,1 + ,2949 + ,2949 + ,41 + ,41 + ,82903 + ,82903 + ,3399023 + ,373177 + ,0 + ,2253 + ,0 + ,99 + ,0 + ,63593 + ,0 + ,6295707 + ,428370 + ,1 + ,6533 + ,6533 + ,75 + ,75 + ,126910 + ,126910 + ,9518250 + ,369419 + ,0 + ,1889 + ,0 + ,45 + ,0 + ,37527 + ,0 + ,1688715 + ,358649 + ,1 + ,3055 + ,3055 + ,43 + ,43 + ,60247 + ,60247 + ,2590621 + ,376641 + ,0 + ,272 + ,0 + ,8 + ,0 + ,112995 + ,0 + ,903960 + ,467427 + ,1 + ,1414 + ,1414 + ,198 + ,198 + ,70184 + ,70184 + ,13896432 + ,364885 + ,0 + ,2564 + ,0 + ,22 + ,0 + ,130140 + ,0 + ,2863080 + ,436230 + ,1 + ,1383 + ,1383 + ,11 + ,11 + ,73221 + ,73221 + ,805431 + ,329118) + ,dim=c(9 + ,100) + ,dimnames=list(c('Group' + ,'Costs' + ,'GrCosts' + ,'Trades' + ,'GrTrades' + ,'Dividends' + ,'GrDiv' + ,'TrDiv' + ,'Wealth ') + ,1:100)) > y <- array(NA,dim=c(9,100),dimnames=list(c('Group','Costs','GrCosts','Trades','GrTrades','Dividends','GrDiv','TrDiv','Wealth '),1:100)) > 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 = '4' > #'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 Trades Group Costs GrCosts GrTrades Dividends GrDiv TrDiv Wealth\r 1 1081 1 162556 162556 1081 213118 213118 230380558 6282929 2 309 1 29790 29790 309 81767 81767 25266003 4324047 3 458 1 87550 87550 458 153198 153198 70164684 4108272 4 588 0 84738 0 0 -26007 0 -15292116 -1212617 5 299 1 54660 54660 299 126942 126942 37955658 1485329 6 156 1 42634 42634 156 157214 157214 24525384 1779876 7 481 0 40949 0 0 129352 0 62218312 1367203 8 323 1 42312 42312 323 234817 234817 75845891 2519076 9 452 1 37704 37704 452 60448 60448 27322496 912684 10 109 1 16275 16275 109 47818 47818 5212162 1443586 11 115 0 25830 0 0 245546 0 28237790 1220017 12 110 0 12679 0 0 48020 0 5282200 984885 13 239 1 18014 18014 239 -1710 -1710 -408690 1457425 14 247 0 43556 0 0 32648 0 8064056 -572920 15 497 1 24524 24524 497 95350 95350 47388950 929144 16 103 0 6532 0 0 151352 0 15589256 1151176 17 109 0 7123 0 0 288170 0 31410530 790090 18 502 1 20813 20813 502 114337 114337 57397174 774497 19 248 1 37597 37597 248 37884 37884 9395232 990576 20 373 0 17821 0 0 122844 0 45820812 454195 21 119 1 12988 12988 119 82340 82340 9798460 876607 22 84 1 22330 22330 84 79801 79801 6703284 711969 23 102 0 13326 0 0 165548 0 16885896 702380 24 295 0 16189 0 0 116384 0 34333280 264449 25 105 0 7146 0 0 134028 0 14072940 450033 26 64 0 15824 0 0 63838 0 4085632 541063 27 267 1 26088 26088 267 74996 74996 20023932 588864 28 129 0 11326 0 0 31080 0 4009320 -37216 29 37 0 8568 0 0 32168 0 1190216 783310 30 361 0 14416 0 0 49857 0 17998377 467359 31 28 1 3369 3369 28 87161 87161 2440508 688779 32 85 1 11819 11819 85 106113 106113 9019605 608419 33 44 1 6620 6620 44 80570 80570 3545080 696348 34 49 1 4519 4519 49 102129 102129 5004321 597793 35 22 0 2220 0 0 301670 0 6636740 821730 36 155 0 18562 0 0 102313 0 15858515 377934 37 91 0 10327 0 0 88577 0 8060507 651939 38 81 1 5336 5336 81 112477 112477 9110637 697458 39 79 1 2365 2365 79 191778 191778 15150462 700368 40 145 0 4069 0 0 79804 0 11571580 225986 41 816 0 7710 0 0 128294 0 104687904 348695 42 61 0 13718 0 0 96448 0 5883328 373683 43 226 0 4525 0 0 93811 0 21201286 501709 44 105 0 6869 0 0 117520 0 12339600 413743 45 62 0 4628 0 0 69159 0 4287858 379825 46 24 1 3653 3653 24 101792 101792 2443008 336260 47 26 1 1265 1265 26 210568 210568 5474768 636765 48 322 1 7489 7489 322 136996 136996 44112712 481231 49 84 0 4901 0 0 121920 0 10241280 469107 50 33 0 2284 0 0 76403 0 2521299 211928 51 108 1 3160 3160 108 108094 108094 11674152 563925 52 150 1 4150 4150 150 134759 134759 20213850 511939 53 115 1 7285 7285 115 188873 188873 21720395 521016 54 162 1 1134 1134 162 146216 146216 23686992 543856 55 158 1 4658 4658 158 156608 156608 24744064 329304 56 97 0 2384 0 0 61348 0 5950756 423262 57 9 0 3748 0 0 50350 0 453150 509665 58 66 0 5371 0 0 87720 0 5789520 455881 59 107 0 1285 0 0 99489 0 10645323 367772 60 101 1 9327 9327 101 87419 87419 8829319 406339 61 47 1 5565 5565 47 94355 94355 4434685 493408 62 38 0 1528 0 0 60326 0 2292388 232942 63 34 1 3122 3122 34 94670 94670 3218780 416002 64 84 1 7317 7317 84 82425 82425 6923700 337430 65 79 0 2675 0 0 59017 0 4662343 361517 66 947 0 13253 0 0 90829 0 86015063 360962 67 74 0 880 0 0 80791 0 5978534 235561 68 53 1 2053 2053 53 100423 100423 5322419 408247 69 94 0 1424 0 0 131116 0 12324904 450296 70 63 1 4036 4036 63 100269 100269 6316947 418799 71 58 1 3045 3045 58 27330 27330 1585140 247405 72 49 0 5119 0 0 39039 0 1912911 378519 73 34 0 1431 0 0 106885 0 3634090 326638 74 11 0 554 0 0 79285 0 872135 328233 75 35 0 1975 0 0 118881 0 4160835 386225 76 17 1 1286 1286 17 77623 77623 1319591 283662 77 47 0 1012 0 0 114768 0 5394096 370225 78 43 0 810 0 0 74015 0 3182645 269236 79 117 0 1280 0 0 69465 0 8127405 365732 80 171 1 666 666 171 117869 117869 20155599 420383 81 26 0 1380 0 0 60982 0 1585532 345811 82 73 1 4608 4608 73 90131 90131 6579563 431809 83 59 0 876 0 0 138971 0 8199289 418876 84 18 0 814 0 0 39625 0 713250 297476 85 15 0 514 0 0 102725 0 1540875 416776 86 72 1 5692 5692 72 64239 64239 4625208 357257 87 86 0 3642 0 0 90262 0 7762532 458343 88 14 0 540 0 0 103960 0 1455440 388386 89 64 0 2099 0 0 106611 0 6823104 358934 90 11 0 567 0 0 103345 0 1136795 407560 91 52 0 2001 0 0 95551 0 4968652 392558 92 41 1 2949 2949 41 82903 82903 3399023 373177 93 99 0 2253 0 0 63593 0 6295707 428370 94 75 1 6533 6533 75 126910 126910 9518250 369419 95 45 0 1889 0 0 37527 0 1688715 358649 96 43 1 3055 3055 43 60247 60247 2590621 376641 97 8 0 272 0 0 112995 0 903960 467427 98 198 1 1414 1414 198 70184 70184 13896432 364885 99 22 0 2564 0 0 130140 0 2863080 436230 100 11 1 1383 1383 11 73221 73221 805431 329118 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Group Costs GrCosts GrTrades Dividends 7.812e+01 8.523e+01 5.286e-03 -7.245e-03 3.280e-01 -6.164e-04 GrDiv TrDiv `Wealth\r` -6.034e-04 6.470e-06 -2.224e-05 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -209.270 -25.213 -9.376 10.042 306.335 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 7.812e+01 1.982e+01 3.942 0.000158 *** Group 8.523e+01 3.277e+01 2.601 0.010842 * Costs 5.286e-03 6.817e-04 7.754 1.24e-11 *** GrCosts -7.245e-03 1.195e-03 -6.062 3.01e-08 *** GrTrades 3.280e-01 1.111e-01 2.951 0.004025 ** Dividends -6.164e-04 1.743e-04 -3.537 0.000640 *** GrDiv -6.034e-04 2.700e-04 -2.235 0.027891 * TrDiv 6.470e-06 4.305e-07 15.029 < 2e-16 *** `Wealth\r` -2.224e-05 1.586e-05 -1.402 0.164291 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 65.37 on 91 degrees of freedom Multiple R-squared: 0.891, Adjusted R-squared: 0.8814 F-statistic: 92.98 on 8 and 91 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.9798082 4.038353e-02 2.019177e-02 [2,] 0.9763917 4.721660e-02 2.360830e-02 [3,] 0.9937059 1.258817e-02 6.294087e-03 [4,] 0.9886936 2.261281e-02 1.130641e-02 [5,] 0.9912597 1.748061e-02 8.740306e-03 [6,] 0.9934661 1.306784e-02 6.533921e-03 [7,] 0.9883523 2.329550e-02 1.164775e-02 [8,] 0.9825813 3.483734e-02 1.741867e-02 [9,] 0.9993152 1.369557e-03 6.847785e-04 [10,] 0.9991795 1.641051e-03 8.205254e-04 [11,] 0.9988585 2.283029e-03 1.141514e-03 [12,] 0.9986934 2.613191e-03 1.306595e-03 [13,] 0.9992857 1.428594e-03 7.142972e-04 [14,] 0.9988235 2.352906e-03 1.176453e-03 [15,] 0.9996061 7.877591e-04 3.938795e-04 [16,] 0.9995155 9.689392e-04 4.844696e-04 [17,] 0.9991551 1.689787e-03 8.448934e-04 [18,] 0.9993376 1.324782e-03 6.623910e-04 [19,] 0.9999998 3.821535e-07 1.910767e-07 [20,] 0.9999998 4.224996e-07 2.112498e-07 [21,] 0.9999996 8.324443e-07 4.162222e-07 [22,] 0.9999993 1.305581e-06 6.527907e-07 [23,] 0.9999987 2.550945e-06 1.275473e-06 [24,] 0.9999988 2.463957e-06 1.231979e-06 [25,] 0.9999985 2.961012e-06 1.480506e-06 [26,] 0.9999979 4.294429e-06 2.147215e-06 [27,] 0.9999956 8.814713e-06 4.407356e-06 [28,] 0.9999914 1.725805e-05 8.629025e-06 [29,] 0.9999884 2.329434e-05 1.164717e-05 [30,] 1.0000000 2.542167e-18 1.271084e-18 [31,] 1.0000000 7.047155e-18 3.523578e-18 [32,] 1.0000000 1.864497e-17 9.322484e-18 [33,] 1.0000000 4.575671e-17 2.287835e-17 [34,] 1.0000000 1.823203e-16 9.116016e-17 [35,] 1.0000000 5.484943e-16 2.742471e-16 [36,] 1.0000000 3.751680e-18 1.875840e-18 [37,] 1.0000000 5.889555e-22 2.944777e-22 [38,] 1.0000000 1.709432e-21 8.547162e-22 [39,] 1.0000000 9.297388e-21 4.648694e-21 [40,] 1.0000000 3.951417e-20 1.975709e-20 [41,] 1.0000000 1.467965e-19 7.339823e-20 [42,] 1.0000000 7.960425e-19 3.980213e-19 [43,] 1.0000000 6.385502e-19 3.192751e-19 [44,] 1.0000000 8.681936e-21 4.340968e-21 [45,] 1.0000000 1.898619e-20 9.493094e-21 [46,] 1.0000000 1.163031e-20 5.815156e-21 [47,] 1.0000000 5.726598e-20 2.863299e-20 [48,] 1.0000000 3.473322e-19 1.736661e-19 [49,] 1.0000000 1.643172e-18 8.215860e-19 [50,] 1.0000000 9.273029e-18 4.636514e-18 [51,] 1.0000000 5.785979e-17 2.892989e-17 [52,] 1.0000000 2.345003e-16 1.172502e-16 [53,] 1.0000000 1.205333e-15 6.026663e-16 [54,] 1.0000000 5.398794e-15 2.699397e-15 [55,] 1.0000000 8.533023e-17 4.266511e-17 [56,] 1.0000000 3.289369e-16 1.644685e-16 [57,] 1.0000000 1.488169e-15 7.440843e-16 [58,] 1.0000000 2.898803e-15 1.449401e-15 [59,] 1.0000000 1.850099e-14 9.250494e-15 [60,] 1.0000000 3.237977e-14 1.618989e-14 [61,] 1.0000000 2.288831e-13 1.144416e-13 [62,] 1.0000000 1.727394e-12 8.636969e-13 [63,] 1.0000000 1.153408e-11 5.767038e-12 [64,] 1.0000000 8.232247e-11 4.116123e-11 [65,] 1.0000000 3.312736e-10 1.656368e-10 [66,] 1.0000000 2.270815e-09 1.135408e-09 [67,] 1.0000000 1.390759e-08 6.953794e-09 [68,] 1.0000000 6.774287e-09 3.387144e-09 [69,] 1.0000000 2.072890e-10 1.036445e-10 [70,] 1.0000000 2.070647e-09 1.035323e-09 [71,] 1.0000000 1.235282e-08 6.176408e-09 [72,] 1.0000000 7.743279e-08 3.871640e-08 [73,] 0.9999998 3.412117e-07 1.706058e-07 [74,] 0.9999980 4.097205e-06 2.048603e-06 [75,] 0.9999855 2.903454e-05 1.451727e-05 [76,] 0.9999759 4.811164e-05 2.405582e-05 [77,] 0.9998255 3.490717e-04 1.745359e-04 > postscript(file="/var/www/html/rcomp/tmp/13v361293220838.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/rcomp/tmp/23v361293220838.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/rcomp/tmp/3dmkr1293220838.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/rcomp/tmp/4dmkr1293220838.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/rcomp/tmp/5dmkr1293220838.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 = 100 Frequency = 1 1 2 3 4 5 6 -209.2702864 135.1009848 140.2323221 117.9096450 86.9756071 97.6827075 7 8 9 10 11 12 -105.9735603 -11.6540456 131.5321439 -1.5072821 -103.8558510 -17.8132414 13 14 15 16 17 18 65.5246457 -106.1399366 49.0669351 8.3883652 -14.7882605 0.1267077 19 20 21 22 23 24 84.4209165 -9.9502801 -1.3975703 6.6487816 -38.1421129 -13.2029125 25 26 27 28 29 30 -9.3183571 -72.8147119 42.2132122 -16.5988371 -56.8632557 131.3565874 31 32 33 34 35 36 -32.0886728 1.5362077 -29.9851004 -16.0757660 93.4365889 -52.3667753 37 38 39 40 41 42 -24.7600593 -4.6981676 45.8572643 24.7215302 106.6451343 -59.9342050 43 44 45 46 47 48 55.7743657 -7.6228127 -17.2492094 -24.2292704 92.1901748 -39.8766515 49 50 51 52 53 54 -0.7010143 -21.6983264 -15.7173659 -9.4327646 29.6504458 -15.0622274 55 56 57 58 59 60 -9.7811533 15.0043800 -49.4946447 -13.7591185 22.7175079 -18.6588476 61 62 63 64 65 66 -23.4894413 -20.6643022 -30.4822914 -29.3162611 0.9920482 306.3351088 67 68 69 70 71 72 7.5855162 -26.5727920 19.4472349 -22.3552984 -89.8257778 -36.0748980 73 74 75 76 77 78 -2.0480864 -19.5210151 1.3883359 -56.9533963 7.6082975 -8.3834912 79 80 81 82 83 84 30.4814236 -24.4067230 -24.3942933 -28.2904638 18.1793662 -37.9990365 85 86 87 88 89 90 -3.2179956 -47.4357058 4.2365826 -3.6727378 4.3378270 -4.7065614 91 92 93 94 95 96 -1.2160823 -42.5888709 16.9625138 1.2875663 -22.9252427 -63.3657733 97 98 99 100 2.6390912 -23.7008580 1.7237745 -61.8277982 > postscript(file="/var/www/html/rcomp/tmp/6oekc1293220838.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 = 100 Frequency = 1 lag(myerror, k = 1) myerror 0 -209.2702864 NA 1 135.1009848 -209.2702864 2 140.2323221 135.1009848 3 117.9096450 140.2323221 4 86.9756071 117.9096450 5 97.6827075 86.9756071 6 -105.9735603 97.6827075 7 -11.6540456 -105.9735603 8 131.5321439 -11.6540456 9 -1.5072821 131.5321439 10 -103.8558510 -1.5072821 11 -17.8132414 -103.8558510 12 65.5246457 -17.8132414 13 -106.1399366 65.5246457 14 49.0669351 -106.1399366 15 8.3883652 49.0669351 16 -14.7882605 8.3883652 17 0.1267077 -14.7882605 18 84.4209165 0.1267077 19 -9.9502801 84.4209165 20 -1.3975703 -9.9502801 21 6.6487816 -1.3975703 22 -38.1421129 6.6487816 23 -13.2029125 -38.1421129 24 -9.3183571 -13.2029125 25 -72.8147119 -9.3183571 26 42.2132122 -72.8147119 27 -16.5988371 42.2132122 28 -56.8632557 -16.5988371 29 131.3565874 -56.8632557 30 -32.0886728 131.3565874 31 1.5362077 -32.0886728 32 -29.9851004 1.5362077 33 -16.0757660 -29.9851004 34 93.4365889 -16.0757660 35 -52.3667753 93.4365889 36 -24.7600593 -52.3667753 37 -4.6981676 -24.7600593 38 45.8572643 -4.6981676 39 24.7215302 45.8572643 40 106.6451343 24.7215302 41 -59.9342050 106.6451343 42 55.7743657 -59.9342050 43 -7.6228127 55.7743657 44 -17.2492094 -7.6228127 45 -24.2292704 -17.2492094 46 92.1901748 -24.2292704 47 -39.8766515 92.1901748 48 -0.7010143 -39.8766515 49 -21.6983264 -0.7010143 50 -15.7173659 -21.6983264 51 -9.4327646 -15.7173659 52 29.6504458 -9.4327646 53 -15.0622274 29.6504458 54 -9.7811533 -15.0622274 55 15.0043800 -9.7811533 56 -49.4946447 15.0043800 57 -13.7591185 -49.4946447 58 22.7175079 -13.7591185 59 -18.6588476 22.7175079 60 -23.4894413 -18.6588476 61 -20.6643022 -23.4894413 62 -30.4822914 -20.6643022 63 -29.3162611 -30.4822914 64 0.9920482 -29.3162611 65 306.3351088 0.9920482 66 7.5855162 306.3351088 67 -26.5727920 7.5855162 68 19.4472349 -26.5727920 69 -22.3552984 19.4472349 70 -89.8257778 -22.3552984 71 -36.0748980 -89.8257778 72 -2.0480864 -36.0748980 73 -19.5210151 -2.0480864 74 1.3883359 -19.5210151 75 -56.9533963 1.3883359 76 7.6082975 -56.9533963 77 -8.3834912 7.6082975 78 30.4814236 -8.3834912 79 -24.4067230 30.4814236 80 -24.3942933 -24.4067230 81 -28.2904638 -24.3942933 82 18.1793662 -28.2904638 83 -37.9990365 18.1793662 84 -3.2179956 -37.9990365 85 -47.4357058 -3.2179956 86 4.2365826 -47.4357058 87 -3.6727378 4.2365826 88 4.3378270 -3.6727378 89 -4.7065614 4.3378270 90 -1.2160823 -4.7065614 91 -42.5888709 -1.2160823 92 16.9625138 -42.5888709 93 1.2875663 16.9625138 94 -22.9252427 1.2875663 95 -63.3657733 -22.9252427 96 2.6390912 -63.3657733 97 -23.7008580 2.6390912 98 1.7237745 -23.7008580 99 -61.8277982 1.7237745 100 NA -61.8277982 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 135.1009848 -209.2702864 [2,] 140.2323221 135.1009848 [3,] 117.9096450 140.2323221 [4,] 86.9756071 117.9096450 [5,] 97.6827075 86.9756071 [6,] -105.9735603 97.6827075 [7,] -11.6540456 -105.9735603 [8,] 131.5321439 -11.6540456 [9,] -1.5072821 131.5321439 [10,] -103.8558510 -1.5072821 [11,] -17.8132414 -103.8558510 [12,] 65.5246457 -17.8132414 [13,] -106.1399366 65.5246457 [14,] 49.0669351 -106.1399366 [15,] 8.3883652 49.0669351 [16,] -14.7882605 8.3883652 [17,] 0.1267077 -14.7882605 [18,] 84.4209165 0.1267077 [19,] -9.9502801 84.4209165 [20,] -1.3975703 -9.9502801 [21,] 6.6487816 -1.3975703 [22,] -38.1421129 6.6487816 [23,] -13.2029125 -38.1421129 [24,] -9.3183571 -13.2029125 [25,] -72.8147119 -9.3183571 [26,] 42.2132122 -72.8147119 [27,] -16.5988371 42.2132122 [28,] -56.8632557 -16.5988371 [29,] 131.3565874 -56.8632557 [30,] -32.0886728 131.3565874 [31,] 1.5362077 -32.0886728 [32,] -29.9851004 1.5362077 [33,] -16.0757660 -29.9851004 [34,] 93.4365889 -16.0757660 [35,] -52.3667753 93.4365889 [36,] -24.7600593 -52.3667753 [37,] -4.6981676 -24.7600593 [38,] 45.8572643 -4.6981676 [39,] 24.7215302 45.8572643 [40,] 106.6451343 24.7215302 [41,] -59.9342050 106.6451343 [42,] 55.7743657 -59.9342050 [43,] -7.6228127 55.7743657 [44,] -17.2492094 -7.6228127 [45,] -24.2292704 -17.2492094 [46,] 92.1901748 -24.2292704 [47,] -39.8766515 92.1901748 [48,] -0.7010143 -39.8766515 [49,] -21.6983264 -0.7010143 [50,] -15.7173659 -21.6983264 [51,] -9.4327646 -15.7173659 [52,] 29.6504458 -9.4327646 [53,] -15.0622274 29.6504458 [54,] -9.7811533 -15.0622274 [55,] 15.0043800 -9.7811533 [56,] -49.4946447 15.0043800 [57,] -13.7591185 -49.4946447 [58,] 22.7175079 -13.7591185 [59,] -18.6588476 22.7175079 [60,] -23.4894413 -18.6588476 [61,] -20.6643022 -23.4894413 [62,] -30.4822914 -20.6643022 [63,] -29.3162611 -30.4822914 [64,] 0.9920482 -29.3162611 [65,] 306.3351088 0.9920482 [66,] 7.5855162 306.3351088 [67,] -26.5727920 7.5855162 [68,] 19.4472349 -26.5727920 [69,] -22.3552984 19.4472349 [70,] -89.8257778 -22.3552984 [71,] -36.0748980 -89.8257778 [72,] -2.0480864 -36.0748980 [73,] -19.5210151 -2.0480864 [74,] 1.3883359 -19.5210151 [75,] -56.9533963 1.3883359 [76,] 7.6082975 -56.9533963 [77,] -8.3834912 7.6082975 [78,] 30.4814236 -8.3834912 [79,] -24.4067230 30.4814236 [80,] -24.3942933 -24.4067230 [81,] -28.2904638 -24.3942933 [82,] 18.1793662 -28.2904638 [83,] -37.9990365 18.1793662 [84,] -3.2179956 -37.9990365 [85,] -47.4357058 -3.2179956 [86,] 4.2365826 -47.4357058 [87,] -3.6727378 4.2365826 [88,] 4.3378270 -3.6727378 [89,] -4.7065614 4.3378270 [90,] -1.2160823 -4.7065614 [91,] -42.5888709 -1.2160823 [92,] 16.9625138 -42.5888709 [93,] 1.2875663 16.9625138 [94,] -22.9252427 1.2875663 [95,] -63.3657733 -22.9252427 [96,] 2.6390912 -63.3657733 [97,] -23.7008580 2.6390912 [98,] 1.7237745 -23.7008580 [99,] -61.8277982 1.7237745 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 135.1009848 -209.2702864 2 140.2323221 135.1009848 3 117.9096450 140.2323221 4 86.9756071 117.9096450 5 97.6827075 86.9756071 6 -105.9735603 97.6827075 7 -11.6540456 -105.9735603 8 131.5321439 -11.6540456 9 -1.5072821 131.5321439 10 -103.8558510 -1.5072821 11 -17.8132414 -103.8558510 12 65.5246457 -17.8132414 13 -106.1399366 65.5246457 14 49.0669351 -106.1399366 15 8.3883652 49.0669351 16 -14.7882605 8.3883652 17 0.1267077 -14.7882605 18 84.4209165 0.1267077 19 -9.9502801 84.4209165 20 -1.3975703 -9.9502801 21 6.6487816 -1.3975703 22 -38.1421129 6.6487816 23 -13.2029125 -38.1421129 24 -9.3183571 -13.2029125 25 -72.8147119 -9.3183571 26 42.2132122 -72.8147119 27 -16.5988371 42.2132122 28 -56.8632557 -16.5988371 29 131.3565874 -56.8632557 30 -32.0886728 131.3565874 31 1.5362077 -32.0886728 32 -29.9851004 1.5362077 33 -16.0757660 -29.9851004 34 93.4365889 -16.0757660 35 -52.3667753 93.4365889 36 -24.7600593 -52.3667753 37 -4.6981676 -24.7600593 38 45.8572643 -4.6981676 39 24.7215302 45.8572643 40 106.6451343 24.7215302 41 -59.9342050 106.6451343 42 55.7743657 -59.9342050 43 -7.6228127 55.7743657 44 -17.2492094 -7.6228127 45 -24.2292704 -17.2492094 46 92.1901748 -24.2292704 47 -39.8766515 92.1901748 48 -0.7010143 -39.8766515 49 -21.6983264 -0.7010143 50 -15.7173659 -21.6983264 51 -9.4327646 -15.7173659 52 29.6504458 -9.4327646 53 -15.0622274 29.6504458 54 -9.7811533 -15.0622274 55 15.0043800 -9.7811533 56 -49.4946447 15.0043800 57 -13.7591185 -49.4946447 58 22.7175079 -13.7591185 59 -18.6588476 22.7175079 60 -23.4894413 -18.6588476 61 -20.6643022 -23.4894413 62 -30.4822914 -20.6643022 63 -29.3162611 -30.4822914 64 0.9920482 -29.3162611 65 306.3351088 0.9920482 66 7.5855162 306.3351088 67 -26.5727920 7.5855162 68 19.4472349 -26.5727920 69 -22.3552984 19.4472349 70 -89.8257778 -22.3552984 71 -36.0748980 -89.8257778 72 -2.0480864 -36.0748980 73 -19.5210151 -2.0480864 74 1.3883359 -19.5210151 75 -56.9533963 1.3883359 76 7.6082975 -56.9533963 77 -8.3834912 7.6082975 78 30.4814236 -8.3834912 79 -24.4067230 30.4814236 80 -24.3942933 -24.4067230 81 -28.2904638 -24.3942933 82 18.1793662 -28.2904638 83 -37.9990365 18.1793662 84 -3.2179956 -37.9990365 85 -47.4357058 -3.2179956 86 4.2365826 -47.4357058 87 -3.6727378 4.2365826 88 4.3378270 -3.6727378 89 -4.7065614 4.3378270 90 -1.2160823 -4.7065614 91 -42.5888709 -1.2160823 92 16.9625138 -42.5888709 93 1.2875663 16.9625138 94 -22.9252427 1.2875663 95 -63.3657733 -22.9252427 96 2.6390912 -63.3657733 97 -23.7008580 2.6390912 98 1.7237745 -23.7008580 99 -61.8277982 1.7237745 > 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/rcomp/tmp/7oekc1293220838.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/rcomp/tmp/8z51f1293220838.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/rcomp/tmp/9z51f1293220838.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/rcomp/tmp/109eih1293220838.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/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/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/rcomp/tmp/11dfg51293220838.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/rcomp/tmp/12n6g81293220838.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/rcomp/tmp/13u7v21293220838.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/rcomp/tmp/145ycn1293220838.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/rcomp/tmp/158zbb1293220838.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/rcomp/tmp/16mr8k1293220838.tab") + } > > try(system("convert tmp/13v361293220838.ps tmp/13v361293220838.png",intern=TRUE)) character(0) > try(system("convert tmp/23v361293220838.ps tmp/23v361293220838.png",intern=TRUE)) character(0) > try(system("convert tmp/3dmkr1293220838.ps tmp/3dmkr1293220838.png",intern=TRUE)) character(0) > try(system("convert tmp/4dmkr1293220838.ps tmp/4dmkr1293220838.png",intern=TRUE)) character(0) > try(system("convert tmp/5dmkr1293220838.ps tmp/5dmkr1293220838.png",intern=TRUE)) character(0) > try(system("convert tmp/6oekc1293220838.ps tmp/6oekc1293220838.png",intern=TRUE)) character(0) > try(system("convert tmp/7oekc1293220838.ps tmp/7oekc1293220838.png",intern=TRUE)) character(0) > try(system("convert tmp/8z51f1293220838.ps tmp/8z51f1293220838.png",intern=TRUE)) character(0) > try(system("convert tmp/9z51f1293220838.ps tmp/9z51f1293220838.png",intern=TRUE)) character(0) > try(system("convert tmp/109eih1293220838.ps tmp/109eih1293220838.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.199 1.676 7.142