| Multiple Regression Model 4 zonder lineaire trend | *The author of this computation has been verified* | R Software Module: /rwasp_multipleregression.wasp (opens new window with default values) | Title produced by software: Multiple Regression | Date of computation: Fri, 31 Dec 2010 09:55:50 +0000 | | Cite this page as follows: | Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/31/t1293789357amdpmz7u1yulzm4.htm/, Retrieved Fri, 31 Dec 2010 10:56:07 +0100 | | BibTeX entries for LaTeX users: | @Manual{KEY,
author = {{YOUR NAME}},
publisher = {Office for Research Development and Education},
title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Dec/31/t1293789357amdpmz7u1yulzm4.htm/},
year = {2010},
}
@Manual{R,
title = {R: A Language and Environment for Statistical Computing},
author = {{R Development Core Team}},
organization = {R Foundation for Statistical Computing},
address = {Vienna, Austria},
year = {2010},
note = {{ISBN} 3-900051-07-0},
url = {http://www.R-project.org},
}
| | Original text written by user: | | | IsPrivate? | No (this computation is public) | | User-defined keywords: | | | Dataseries X: | » Textbox « » Textfile « » CSV « | 4831 0 3695 2462 2146 1579
5134 0 4831 3695 2462 2146
6250 0 5134 4831 3695 2462
5760 0 6250 5134 4831 3695
6249 0 5760 6250 5134 4831
2917 0 6249 5760 6250 5134
1741 0 2917 6249 5760 6250
2359 0 1741 2917 6249 5760
1511 1 2359 1741 2917 6249
2059 0 1511 2359 1741 2917
2635 0 2059 1511 2359 1741
2867 0 2635 2059 1511 2359
4403 0 2867 2635 2059 1511
5720 0 4403 2867 2635 2059
4502 0 5720 4403 2867 2635
5749 0 4502 5720 4403 2867
5627 0 5749 4502 5720 4403
2846 0 5627 5749 4502 5720
1762 0 2846 5627 5749 4502
2429 0 1762 2846 5627 5749
1169 0 2429 1762 2846 5627
2154 1 1169 2429 1762 2846
2249 0 2154 1169 2429 1762
2687 0 2249 2154 1169 2429
4359 0 2687 2249 2154 1169
5382 0 4359 2687 2249 2154
4459 0 5382 4359 2687 2249
6398 0 4459 5382 4359 2687
4596 0 6398 4459 5382 4359
3024 0 4596 6398 4459 5382
1887 0 3024 4596 6398 4459
2070 0 1887 3024 4596 6398
1351 0 2070 1887 3024 4596
2218 0 1351 2070 1887 3024
2461 1 2218 1351 2070 1887
3028 0 2461 2218 1351 2070
4784 0 3028 2461 etc... | | Output produced by software: | Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!
Multiple Linear Regression - Estimated Regression Equation | Y[t] = + 2811.22887588795 + 536.65294179354X[t] -0.270735639007487Y1[t] + 0.146972260964833Y2[t] + 0.38234645812074Y3[t] + 0.0456948838664329Y4[t] + 1482.41945217729M1[t] + 2216.79549815919M2[t] + 1849.07312409255M3[t] + 1917.71663306403M4[t] + 1195.64039723629M5[t] -1357.72571856797M6[t] -3420.23672889271M7[t] -2823.19225751594M8[t] -2512.03180419436M9[t] -1523.91827487921M10[t] -1046.44162180443M11[t] + e[t] |
Multiple Linear Regression - Ordinary Least Squares | Variable | Parameter | S.D. | T-STAT H0: parameter = 0 | 2-tail p-value | 1-tail p-value | (Intercept) | 2811.22887588795 | 391.292489 | 7.1845 | 0 | 0 | X | 536.65294179354 | 124.386049 | 4.3144 | 3.8e-05 | 1.9e-05 | Y1 | -0.270735639007487 | 0.091772 | -2.9501 | 0.003965 | 0.001983 | Y2 | 0.146972260964833 | 0.088892 | 1.6534 | 0.101423 | 0.050711 | Y3 | 0.38234645812074 | 0.089338 | 4.2798 | 4.3e-05 | 2.2e-05 | Y4 | 0.0456948838664329 | 0.092882 | 0.492 | 0.623833 | 0.311916 | M1 | 1482.41945217729 | 211.375743 | 7.0132 | 0 | 0 | M2 | 2216.79549815919 | 311.199938 | 7.1234 | 0 | 0 | M3 | 1849.07312409255 | 449.310673 | 4.1154 | 8e-05 | 4e-05 | M4 | 1917.71663306403 | 547.120738 | 3.5051 | 0.000687 | 0.000344 | M5 | 1195.64039723629 | 631.957718 | 1.892 | 0.061418 | 0.030709 | M6 | -1357.72571856797 | 668.486055 | -2.031 | 0.044931 | 0.022465 | M7 | -3420.23672889271 | 653.961571 | -5.23 | 1e-06 | 0 | M8 | -2823.19225751594 | 604.44105 | -4.6707 | 9e-06 | 5e-06 | M9 | -2512.03180419436 | 397.395117 | -6.3212 | 0 | 0 | M10 | -1523.91827487921 | 221.860113 | -6.8688 | 0 | 0 | M11 | -1046.44162180443 | 190.099113 | -5.5047 | 0 | 0 |
Multiple Linear Regression - Regression Statistics | Multiple R | 0.979897654723466 | R-squared | 0.96019941373255 | Adjusted R-squared | 0.953766995749931 | F-TEST (value) | 149.275034104935 | F-TEST (DF numerator) | 16 | F-TEST (DF denominator) | 99 | p-value | 0 | Multiple Linear Regression - Residual Statistics | Residual Standard Deviation | 350.48446385522 | Sum Squared Residuals | 12161096.5809843 |
Multiple Linear Regression - Actuals, Interpolation, and Residuals | Time or Index | Actuals | Interpolation Forecast | Residuals Prediction Error | 1 | 4831 | 4547.79356918019 | 283.206430819806 | 2 | 5134 | 5302.56120693764 | -168.561206937636 | 3 | 6250 | 5505.63918887246 | 744.360811127543 | 4 | 5760 | 5807.3616880164 | -47.3616880164031 | 5 | 6249 | 5549.72732342193 | 699.272676578067 | 6 | 2917 | 3232.49926934452 | -315.49926934452 | 7 | 1741 | 2007.5945697203 | -266.594569720301 | 8 | 2359 | 2597.88950396155 | -238.889503961549 | 9 | 1511 | 1853.91529502778 | -342.915295027784 | 10 | 2059 | 2023.89377391106 | 35.106226088936 | 11 | 2635 | 2410.92774720325 | 224.072252796752 | 12 | 2867 | 3085.97608169117 | -218.976081691165 | 13 | 4403 | 4761.01748546589 | -358.017485465894 | 14 | 5720 | 5358.91351071248 | 361.08648928752 | 15 | 4502 | 4975.40632430604 | -473.406324306041 | 16 | 5749 | 6165.2536820098 | -416.253682009801 | 17 | 5627 | 5500.29551744841 | 126.704482551588 | 18 | 2846 | 2757.71573508724 | 88.2842649127623 | 19 | 1762 | 1851.31958573186 | -89.3195857318558 | 20 | 2429 | 2343.44688434026 | 85.5531156597398 | 21 | 1169 | 1245.82845969249 | -76.828459692487 | 22 | 2154 | 2668.21130137873 | -514.211301378728 | 23 | 2249 | 2362.66719287721 | -113.667192877213 | 24 | 2687 | 3076.87855633307 | -389.878556333072 | 25 | 4359 | 4773.71387099397 | -414.713870993968 | 26 | 5382 | 5201.12615298785 | 180.873847012154 | 27 | 4459 | 4973.98760317394 | -514.987603173944 | 28 | 6398 | 6102.17036702774 | 295.82963297226 | 29 | 4596 | 5187.02460277613 | -591.024602776131 | 30 | 3024 | 3100.34340782409 | -76.343407824087 | 31 | 1887 | 1897.77821224789 | -10.7782122478856 | 32 | 2070 | 1971.2227732229 | 98.7772267771035 | 33 | 1351 | 1382.34033099598 | -31.3403309959778 | 34 | 2218 | 2085.44842819276 | 132.551571807237 | 35 | 2461 | 2777.19148728784 | -316.191487287836 | 36 | 3028 | 3082.07141763516 | -54.0714176351594 | 37 | 4784 | 4745.33777960038 | 38.6622203996229 | 38 | 4975 | 5220.16296908772 | -245.16296908772 | 39 | 4607 | 5286.7076767589 | -679.707676758901 | 40 | 6249 | 6180.36298234171 | 68.6370176582872 | 41 | 4809 | 5112.92142479913 | -303.921424799135 | 42 | 3157 | 3058.76730789996 | 98.2326921000364 | 43 | 1910 | 1842.86868439764 | 67.1313156023588 | 44 | 2228 | 2059.17442211767 | 168.825577882334 | 45 | 1594 | 1403.52955122859 | 190.470448771405 | 46 | 2467 | 2057.7526732374 | 409.2473267626 | 47 | 2222 | 2270.30135350789 | -48.3013535078871 | 48 | 3607 | 3820.15625110597 | -213.156251105973 | 49 | 4685 | 4659.76359909605 | 25.2364009039458 | 50 | 4962 | 5252.05995903998 | -290.059959039985 | 51 | 5770 | 5486.13450823831 | 283.865491761689 | 52 | 5480 | 5852.19183318817 | -372.191833188173 | 53 | 5000 | 5482.55157323965 | -482.551573239646 | 54 | 3228 | 3338.11002947173 | -110.110029471735 | 55 | 1993 | 1610.8368795142 | 382.163120485796 | 56 | 2288 | 2085.02720241632 | 202.972797583678 | 57 | 1580 | 1435.35843189329 | 144.641568106712 | 58 | 2111 | 2105.34040061993 | 5.65959938006733 | 59 | 2192 | 2391.3590921892 | -199.359092189204 | 60 | 3601 | 3236.69209619747 | 364.307903802532 | 61 | 4665 | 5056.87671942958 | -391.876719429584 | 62 | 4876 | 5228.85506585427 | -352.855065854273 | 63 | 5813 | 5502.81340270894 | 310.186597291058 | 64 | 5589 | 5819.98948780226 | -230.989487802262 | 65 | 5331 | 5425.56550273361 | -94.5655027336064 | 66 | 3075 | 3277.0276470921 | -202.027647092102 | 67 | 2002 | 1744.54789460313 | 257.452105396873 | 68 | 2306 | 2191.64124571704 | 114.358754282959 | 69 | 1507 | 1388.43393920715 | 118.566060792847 | 70 | 1992 | 2124.19940385637 | -132.199403856369 | 71 | 2487 | 2420.14114838163 | 66.8588516183671 | 72 | 3490 | 3112.24660010223 | 377.753399897774 | 73 | 4647 | 4544.79729551188 | 102.20270448812 | 74 | 5594 | 5861.42184214837 | -267.421842148368 | 75 | 5611 | 5276.81924709339 | 334.180752906606 | 76 | 5788 | 5968.24980189918 | -180.249801899177 | 77 | 6204 | 5615.70296287732 | 588.297037122684 | 78 | 3013 | 3025.49785624628 | -12.4978562462758 | 79 | 1931 | 1956.4968666689 | -25.4968666688975 | 80 | 2549 | 2544.63293573558 | 4.36706426442032 | 81 | 1504 | 1328.39630161174 | 175.60369838826 | 82 | 2090 | 2130.74618886155 | -40.7461888615537 | 83 | 2702 | 2482.83399154483 | 219.166008455172 | 84 | 2939 | 3078.39853669535 | -139.398536695351 | 85 | 4500 | 4762.90453695668 | -262.904536956678 | 86 | 6208 | 5370.26791061217 | 837.732089387828 | 87 | 6415 | 5424.78708578126 | 990.212914218735 | 88 | 5657 | 5759.43650601541 | -102.436506015411 | 89 | 5964 | 5997.37860676079 | -33.3786067607902 | 90 | 3163 | 3406.68425444474 | -243.684254444744 | 91 | 1997 | 1867.26447880101 | 129.735521198991 | 92 | 2422 | 2451.06104297033 | -29.0610429703297 | 93 | 1376 | 1418.86509357954 | -42.8650935795374 | 94 | 2202 | 2178.82397232791 | 23.1760276720877 | 95 | 2683 | 2388.15701272634 | 294.842987273659 | 96 | 3303 | 3045.25981017406 | 257.740189825938 | 97 | 5202 | 4698.53814957424 | 503.461850425761 | 98 | 5231 | 5231.56263930886 | -0.562639308860696 | 99 | 4880 | 5394.12329845784 | -514.123298457836 | 100 | 7998 | 6853.11690605095 | 1144.88309394905 | 101 | 4977 | 4796.50937415352 | 180.490625846483 | 102 | 3531 | 3386.41667831097 | 144.583321689033 | 103 | 2025 | 2447.50355379964 | -422.503553799642 | 104 | 2205 | 2227.16200607933 | -22.1620060793274 | 105 | 1442 | 1577.33259676344 | -135.33259676344 | 106 | 2238 | 2156.58385761428 | 81.4161423857224 | 107 | 2179 | 2306.42097428181 | -127.42097428181 | 108 | 3218 | 3202.32065006552 | 15.679349934477 | 109 | 5139 | 4664.25699419113 | 474.743005808868 | 110 | 4990 | 5045.06874331066 | -55.0687433106602 | 111 | 4914 | 5394.58166460891 | -480.581664608911 | 112 | 6084 | 6243.86674564837 | -159.866745648371 | 113 | 5672 | 5761.32311178951 | -89.3231117895135 | 114 | 3548 | 2918.93781427837 | 629.062185721631 | 115 | 1793 | 1814.78927451544 | -21.7892745154363 | 116 | 2086 | 2470.74198343903 | -384.741983439028 |
Goldfeld-Quandt test for Heteroskedasticity | p-values | Alternative Hypothesis | breakpoint index | greater | 2-sided | less | 20 | 0.987985023966643 | 0.0240299520667149 | 0.0120149760333574 | 21 | 0.972295001770015 | 0.0554099964599699 | 0.027704998229985 | 22 | 0.956027057389628 | 0.0879458852207434 | 0.0439729426103717 | 23 | 0.929822211666415 | 0.14035557666717 | 0.0701777883335852 | 24 | 0.896304814721268 | 0.207390370557463 | 0.103695185278732 | 25 | 0.869024307147714 | 0.261951385704572 | 0.130975692852286 | 26 | 0.821527543984295 | 0.35694491203141 | 0.178472456015705 | 27 | 0.842762776983308 | 0.314474446033384 | 0.157237223016692 | 28 | 0.860552024595202 | 0.278895950809597 | 0.139447975404798 | 29 | 0.902515517219313 | 0.194968965561374 | 0.097484482780687 | 30 | 0.868199709298383 | 0.263600581403235 | 0.131800290701617 | 31 | 0.85421693575372 | 0.29156612849256 | 0.14578306424628 | 32 | 0.829257708942057 | 0.341484582115886 | 0.170742291057943 | 33 | 0.776583092006754 | 0.446833815986491 | 0.223416907993246 | 34 | 0.718640652016718 | 0.562718695966565 | 0.281359347983282 | 35 | 0.689345211592509 | 0.621309576814982 | 0.310654788407491 | 36 | 0.642426469060872 | 0.715147061878256 | 0.357573530939128 | 37 | 0.581826360802714 | 0.836347278394572 | 0.418173639197286 | 38 | 0.549658315236131 | 0.900683369527739 | 0.450341684763869 | 39 | 0.70194363263884 | 0.596112734722321 | 0.298056367361161 | 40 | 0.64157120237687 | 0.716857595246261 | 0.358428797623131 | 41 | 0.619296509772204 | 0.761406980455591 | 0.380703490227796 | 42 | 0.56122885289851 | 0.87754229420298 | 0.43877114710149 | 43 | 0.523222750966583 | 0.953554498066834 | 0.476777249033417 | 44 | 0.472896530337585 | 0.94579306067517 | 0.527103469662415 | 45 | 0.414798097245385 | 0.82959619449077 | 0.585201902754615 | 46 | 0.409587517994187 | 0.819175035988374 | 0.590412482005813 | 47 | 0.353263750268682 | 0.706527500537365 | 0.646736249731318 | 48 | 0.355294566868076 | 0.710589133736152 | 0.644705433131924 | 49 | 0.304405116932971 | 0.608810233865943 | 0.695594883067029 | 50 | 0.289803475557418 | 0.579606951114837 | 0.710196524442582 | 51 | 0.271939810672559 | 0.543879621345119 | 0.72806018932744 | 52 | 0.259704452128625 | 0.51940890425725 | 0.740295547871375 | 53 | 0.337815002621244 | 0.675630005242488 | 0.662184997378756 | 54 | 0.30444478066265 | 0.6088895613253 | 0.69555521933735 | 55 | 0.320728413404149 | 0.641456826808298 | 0.679271586595851 | 56 | 0.281142457183776 | 0.562284914367552 | 0.718857542816224 | 57 | 0.232654042035619 | 0.465308084071238 | 0.767345957964381 | 58 | 0.18947842650787 | 0.378956853015741 | 0.81052157349213 | 59 | 0.169172826830327 | 0.338345653660653 | 0.830827173169673 | 60 | 0.164534389964771 | 0.329068779929543 | 0.835465610035229 | 61 | 0.230755873857442 | 0.461511747714885 | 0.769244126142558 | 62 | 0.223344652933362 | 0.446689305866723 | 0.776655347066638 | 63 | 0.211322510248585 | 0.422645020497169 | 0.788677489751415 | 64 | 0.193684356021953 | 0.387368712043906 | 0.806315643978047 | 65 | 0.162635457371259 | 0.325270914742518 | 0.837364542628741 | 66 | 0.158808095270116 | 0.317616190540232 | 0.841191904729884 | 67 | 0.130774659183078 | 0.261549318366156 | 0.869225340816922 | 68 | 0.100578794166731 | 0.201157588333462 | 0.899421205833269 | 69 | 0.0755135718215402 | 0.15102714364308 | 0.92448642817846 | 70 | 0.060307834758814 | 0.120615669517628 | 0.939692165241186 | 71 | 0.0435676775731899 | 0.0871353551463798 | 0.95643232242681 | 72 | 0.0417045683497369 | 0.0834091366994737 | 0.958295431650263 | 73 | 0.0318403205189363 | 0.0636806410378725 | 0.968159679481064 | 74 | 0.0741523286245456 | 0.148304657249091 | 0.925847671375454 | 75 | 0.0968950938483093 | 0.193790187696619 | 0.90310490615169 | 76 | 0.076815511781309 | 0.153631023562618 | 0.92318448821869 | 77 | 0.185825271467603 | 0.371650542935206 | 0.814174728532397 | 78 | 0.152615108547283 | 0.305230217094566 | 0.847384891452717 | 79 | 0.117651077105772 | 0.235302154211544 | 0.882348922894228 | 80 | 0.093880773964123 | 0.187761547928246 | 0.906119226035877 | 81 | 0.0725724078822413 | 0.145144815764483 | 0.927427592117759 | 82 | 0.0521056478366521 | 0.104211295673304 | 0.947894352163348 | 83 | 0.037640494197202 | 0.075280988394404 | 0.962359505802798 | 84 | 0.0285376831966281 | 0.0570753663932561 | 0.971462316803372 | 85 | 0.0490613213125147 | 0.0981226426250295 | 0.950938678687485 | 86 | 0.247377146783711 | 0.494754293567422 | 0.752622853216289 | 87 | 0.490904291087423 | 0.981808582174846 | 0.509095708912577 | 88 | 0.692394469489413 | 0.615211061021175 | 0.307605530510587 | 89 | 0.952160233091696 | 0.0956795338166077 | 0.0478397669083038 | 90 | 0.972931755617546 | 0.054136488764909 | 0.0270682443824545 | 91 | 0.986925010288077 | 0.0261499794238451 | 0.0130749897119226 | 92 | 0.9762356822122 | 0.0475286355755975 | 0.0237643177877988 | 93 | 0.952630988715474 | 0.0947380225690513 | 0.0473690112845257 | 94 | 0.90025286798438 | 0.19949426403124 | 0.09974713201562 | 95 | 0.976855812304509 | 0.046288375390983 | 0.0231441876954915 | 96 | 0.957585232908644 | 0.0848295341827115 | 0.0424147670913558 |
Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity | Description | # significant tests | % significant tests | OK/NOK | 1% type I error level | 0 | 0 | OK | 5% type I error level | 4 | 0.051948051948052 | NOK | 10% type I error level | 16 | 0.207792207792208 | NOK |
| | Charts produced by software: | | http://www.freestatistics.org/blog/date/2010/Dec/31/t1293789357amdpmz7u1yulzm4/10igpx1293789345.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/31/t1293789357amdpmz7u1yulzm4/10igpx1293789345.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/31/t1293789357amdpmz7u1yulzm4/1pj5o1293789345.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/31/t1293789357amdpmz7u1yulzm4/1pj5o1293789345.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/31/t1293789357amdpmz7u1yulzm4/2dfhy1293789345.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/31/t1293789357amdpmz7u1yulzm4/2dfhy1293789345.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/31/t1293789357amdpmz7u1yulzm4/330da1293789345.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/31/t1293789357amdpmz7u1yulzm4/330da1293789345.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/31/t1293789357amdpmz7u1yulzm4/4c9kz1293789345.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/31/t1293789357amdpmz7u1yulzm4/4c9kz1293789345.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/31/t1293789357amdpmz7u1yulzm4/565tu1293789345.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/31/t1293789357amdpmz7u1yulzm4/565tu1293789345.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/31/t1293789357amdpmz7u1yulzm4/67ydo1293789345.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/31/t1293789357amdpmz7u1yulzm4/67ydo1293789345.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/31/t1293789357amdpmz7u1yulzm4/7pwco1293789345.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/31/t1293789357amdpmz7u1yulzm4/7pwco1293789345.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/31/t1293789357amdpmz7u1yulzm4/8pspo1293789345.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/31/t1293789357amdpmz7u1yulzm4/8pspo1293789345.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/31/t1293789357amdpmz7u1yulzm4/9keh91293789345.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/31/t1293789357amdpmz7u1yulzm4/9keh91293789345.ps (open in new window) |
| | Parameters (Session): | par1 = 1 ; par2 = Include Monthly Dummies ; par3 = No Linear Trend ; | | Parameters (R input): | par1 = 1 ; par2 = Include Monthly Dummies ; par3 = No Linear Trend ; | | R code (references can be found in the software module): | library(lattice)
library(lmtest)
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
k <- length(x[1,])
df <- as.data.frame(x)
(mylm <- lm(df))
(mysum <- summary(mylm))
if (n > n25) {
kp3 <- k + 3
nmkm3 <- n - k - 3
gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
numgqtests <- 0
numsignificant1 <- 0
numsignificant5 <- 0
numsignificant10 <- 0
for (mypoint in kp3:nmkm3) {
j <- 0
numgqtests <- numgqtests + 1
for (myalt in c('greater', 'two.sided', 'less')) {
j <- j + 1
gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
}
if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
}
gqarr
}
bitmap(file='test0.png')
plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
points(x[,1]-mysum$resid)
grid()
dev.off()
bitmap(file='test1.png')
plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
grid()
dev.off()
bitmap(file='test2.png')
hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
grid()
dev.off()
bitmap(file='test3.png')
densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
dev.off()
bitmap(file='test4.png')
qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
qqline(mysum$resid)
grid()
dev.off()
(myerror <- as.ts(mysum$resid))
bitmap(file='test5.png')
dum <- cbind(lag(myerror,k=1),myerror)
dum
dum1 <- dum[2:length(myerror),]
dum1
z <- as.data.frame(dum1)
z
plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
lines(lowess(z))
abline(lm(z))
grid()
dev.off()
bitmap(file='test6.png')
acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
grid()
dev.off()
bitmap(file='test7.png')
pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
grid()
dev.off()
bitmap(file='test8.png')
opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
plot(mylm, las = 1, sub='Residual Diagnostics')
par(opar)
dev.off()
if (n > n25) {
bitmap(file='test9.png')
plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
grid()
dev.off()
}
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
a<-table.row.end(a)
myeq <- colnames(x)[1]
myeq <- paste(myeq, '[t] = ', sep='')
for (i in 1:k){
if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
myeq <- paste(myeq, 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='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Variable',header=TRUE)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'S.D.',header=TRUE)
a<-table.element(a,'T-STAT<br />H0: parameter = 0',header=TRUE)
a<-table.element(a,'2-tail p-value',header=TRUE)
a<-table.element(a,'1-tail p-value',header=TRUE)
a<-table.row.end(a)
for (i in 1:k){
a<-table.row.start(a)
a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
a<-table.element(a,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='mytable2.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple R',1,TRUE)
a<-table.element(a, 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='mytable3.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<br />Forecast', 1, TRUE)
a<-table.element(a, 'Residuals<br />Prediction Error', 1, TRUE)
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,i, 1, TRUE)
a<-table.element(a,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='mytable4.tab')
if (n > n25) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-values',header=TRUE)
a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'breakpoint index',header=TRUE)
a<-table.element(a,'greater',header=TRUE)
a<-table.element(a,'2-sided',header=TRUE)
a<-table.element(a,'less',header=TRUE)
a<-table.row.end(a)
for (mypoint in kp3:nmkm3) {
a<-table.row.start(a)
a<-table.element(a,mypoint,header=TRUE)
a<-table.element(a,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='mytable5.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Description',header=TRUE)
a<-table.element(a,'# significant tests',header=TRUE)
a<-table.element(a,'% significant tests',header=TRUE)
a<-table.element(a,'OK/NOK',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'1% type I error level',header=TRUE)
a<-table.element(a,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='mytable6.tab')
}
| |
Copyright
This work is licensed under a
Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.
Software written by Ed van Stee & Patrick Wessa
Disclaimer
Information provided on this web site is provided
"AS IS" without warranty of any kind, either express or implied,
including, without limitation, warranties of merchantability, fitness
for a particular purpose, and noninfringement. We use reasonable
efforts to include accurate and timely information and periodically
update the information, and software without notice. However, we make
no warranties or representations as to the accuracy or
completeness of such information (or software), and we assume no
liability or responsibility for errors or omissions in the content of
this web site, or any software bugs in online applications. Your use of
this web site is AT YOUR OWN RISK. Under no circumstances and under no
legal theory shall we be liable to you or any other person
for any direct, indirect, special, incidental, exemplary, or
consequential damages arising from your access to, or use of, this web
site.
Privacy Policy
We may request personal information to be submitted to our servers in order to be able to:
- personalize online software applications according to your needs
- enforce strict security rules with respect to the data that you upload (e.g. statistical data)
- manage user sessions of online applications
- alert you about important changes or upgrades in resources or applications
We NEVER allow other companies to directly offer registered users
information about their products and services. Banner references and
hyperlinks of third parties NEVER contain any personal data of the
visitor.
We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.
We carefully protect your data from loss, misuse, alteration,
and destruction. However, at any time, and under any circumstance you
are solely responsible for managing your passwords, and keeping them
secret.
We store a unique ANONYMOUS USER ID in the form of a small
'Cookie' on your computer. This allows us to track your progress when
using this website which is necessary to create state-dependent
features. The cookie is used for NO OTHER PURPOSE. At any time you may
opt to disallow cookies from this website - this will not affect other
features of this website.
We examine cookies that are used by third-parties (banner and
online ads) very closely: abuse from third-parties automatically
results in termination of the advertising contract without refund. We
have very good reason to believe that the cookies that are produced by
third parties (banner ads) do NOT cause any privacy or security risk.
FreeStatistics.org is safe. There is no need to download any
software to use the applications and services contained in this
website. Hence, your system's security is not compromised by their use,
and your personal data - other than data you submit in the account
application form, and the user-agent information that is transmitted by
your browser - is never transmitted to our servers.
As a general rule, we do not log on-line behavior of
individuals (other than normal logging of webserver 'hits'). However,
in cases of abuse, hacking, unauthorized access, Denial of Service
attacks, illegal copying, hotlinking, non-compliance with international
webstandards (such as robots.txt), or any other harmful behavior, our
system engineers are empowered to log, track, identify, publish, and
ban misbehaving individuals - even if this leads to ban entire blocks
of IP addresses, or disclosing user's identity.
FreeStatistics.org is powered by
|