| paper met seiz zonder 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: Sun, 12 Dec 2010 10:38:23 +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/12/t1292150187id7ki0x8x431mz5.htm/, Retrieved Sun, 12 Dec 2010 11:36:30 +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/12/t1292150187id7ki0x8x431mz5.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 « | 9769 1579
9321 2146
9939 2462
9336 3695
10195 4831
9464 5134
10010 6250
10213 5760
9563 6249
9890 2917
9305 1741
9391 2359
9928 1511
8686 2059
9843 2635
9627 2867
10074 4403
9503 5720
10119 4502
10000 5749
9313 5627
9866 2846
9172 1762
9241 2429
9659 1169
8904 2154
9755 2249
9080 2687
9435 4359
8971 5382
10063 4459
9793 6398
9454 4596
9759 3024
8820 1887
9403 2070
9676 1351
8642 2218
9402 2461
9610 3028
9294 4784
9448 4975
10319 4607
9548 6249
9801 4809
9596 3157
8923 1910
9746 2228
9829 1594
9125 2467
9782 2222
9441 3607
9162 4685
9915 4962
10444 5770
10209 5480
9985 5000
9842 3228
9429 1993
10132 2288
9849 1580
9172 2111
10313 2192
9819 3601
9955 4665
10048 4876
10082 5813
10541 5589
10208 5331
10233 3075
9439 2002
9963 2306
10158 1507
9225 1992
10474 2487
9757 3490
10490 4647
10281 5594
10444 5611
10640 5788
10695 6204
10786 3013
9832 1931
9747 2549
10411 1504
9511 2090
10402 2702
9701 2939
10540 4500
10112 6208
10915 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 | geboortes[t] = + 9408.25091717042 + 0.137954676030061huwelijken[t] + 298.227157357765M1[t] -632.241511011687M2[t] + 245.786550111648M3[t] -308.745601500791M4[t] -150.993507661975M5[t] -429.437894990934M6[t] + 142.379368334902M7[t] + 52.8309915392159M8[t] -237.832881744925M9[t] + 271.340701244311M10[t] -320.011421321119M11[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) | 9408.25091717042 | 307.51014 | 30.5949 | 0 | 0 | huwelijken | 0.137954676030061 | 0.117087 | 1.1782 | 0.242076 | 0.121038 | M1 | 298.227157357765 | 223.972436 | 1.3315 | 0.186658 | 0.093329 | M2 | -632.241511011687 | 201.303379 | -3.1407 | 0.002335 | 0.001168 | M3 | 245.786550111648 | 200.544663 | 1.2256 | 0.223817 | 0.111909 | M4 | -308.745601500791 | 226.703764 | -1.3619 | 0.176918 | 0.088459 | M5 | -150.993507661975 | 333.510398 | -0.4527 | 0.651917 | 0.325959 | M6 | -429.437894990934 | 406.871973 | -1.0555 | 0.294277 | 0.147138 | M7 | 142.379368334902 | 414.231468 | 0.3437 | 0.731927 | 0.365963 | M8 | 52.8309915392159 | 456.358991 | 0.1158 | 0.908117 | 0.454059 | M9 | -237.832881744925 | 418.761669 | -0.5679 | 0.571607 | 0.285803 | M10 | 271.340701244311 | 217.327822 | 1.2485 | 0.215347 | 0.107673 | M11 | -320.011421321119 | 206.426701 | -1.5502 | 0.124888 | 0.062444 |
Multiple Linear Regression - Regression Statistics | Multiple R | 0.683579024069009 | R-squared | 0.467280282147138 | Adjusted R-squared | 0.390260563903351 | F-TEST (value) | 6.06702144336696 | F-TEST (DF numerator) | 12 | F-TEST (DF denominator) | 83 | p-value | 1.65786151251623e-07 | Multiple Linear Regression - Residual Statistics | Residual Standard Deviation | 400.473517651365 | Sum Squared Residuals | 13311460.1822248 |
Multiple Linear Regression - Actuals, Interpolation, and Residuals | Time or Index | Actuals | Interpolation Forecast | Residuals Prediction Error | 1 | 9769 | 9924.30850797962 | -155.308507979622 | 2 | 9321 | 9072.06014091924 | 248.93985908076 | 3 | 9939 | 9993.68187966807 | -54.6818796680747 | 4 | 9336 | 9609.2478436007 | -273.2478436007 | 5 | 10195 | 9923.71644940967 | 271.283550590334 | 6 | 9464 | 9687.07232891781 | -223.072328917815 | 7 | 10010 | 10412.8470106932 | -402.847010693199 | 8 | 10213 | 10255.7008426428 | -42.7008426427831 | 9 | 9563 | 10032.4968059373 | -469.496805937342 | 10 | 9890 | 10082.0054083944 | -192.005408394415 | 11 | 9305 | 9328.41858681763 | -23.418586817634 | 12 | 9391 | 9733.68599792533 | -342.685997925331 | 13 | 9928 | 9914.9275900096 | 13.0724099903958 | 14 | 8686 | 9060.05808410462 | -374.058084104625 | 15 | 9843 | 10017.5480386213 | -174.548038621275 | 16 | 9627 | 9495.02137184781 | 131.97862815219 | 17 | 10074 | 9864.6718480688 | 209.3281519312 | 18 | 9503 | 9767.91376907143 | -264.913769071431 | 19 | 10119 | 10171.7022369927 | -52.7022369926525 | 20 | 10000 | 10254.1833412065 | -254.183341206452 | 21 | 9313 | 9946.68899744664 | -633.688997446645 | 22 | 9866 | 10072.2106263963 | -206.210626396281 | 23 | 9172 | 9331.31563501427 | -159.315635014265 | 24 | 9241 | 9743.34282524744 | -502.342825247435 | 25 | 9659 | 9867.74709080732 | -208.747090807324 | 26 | 8904 | 9073.16377832748 | -169.163778327481 | 27 | 9755 | 9964.29753367367 | -209.297533673672 | 28 | 9080 | 9470.1895301624 | -390.189530162399 | 29 | 9435 | 9858.60184232348 | -423.601842323477 | 30 | 8971 | 9721.28508857327 | -750.28508857327 | 31 | 10063 | 10165.7701859234 | -102.77018592336 | 32 | 9793 | 10343.71592595 | -550.715925949962 | 33 | 9454 | 9804.45772645965 | -350.457726459652 | 34 | 9759 | 10096.7665587296 | -337.766558729632 | 35 | 8820 | 9348.55996951802 | -528.559969518023 | 36 | 9403 | 9693.81709655264 | -290.817096552643 | 37 | 9676 | 9892.8548418448 | -216.854841844795 | 38 | 8642 | 9081.9928775934 | -439.992877593405 | 39 | 9402 | 9993.54392499205 | -591.543924992045 | 40 | 9610 | 9517.23207468865 | 92.7679253113503 | 41 | 9294 | 9917.23257963625 | -623.232579636253 | 42 | 9448 | 9665.13753542904 | -217.137535429035 | 43 | 10319 | 10186.1874779758 | 132.812522024191 | 44 | 9548 | 10323.1606792215 | -775.160679221483 | 45 | 9801 | 9833.84207245405 | -32.8420724540547 | 46 | 9596 | 10115.1145306416 | -519.11453064163 | 47 | 8923 | 9351.73292706671 | -428.732927066714 | 48 | 9746 | 9715.6139353654 | 30.3860646346075 | 49 | 9829 | 9926.3778281201 | -97.3778281200994 | 50 | 9125 | 9116.34359192489 | 8.65640807510965 | 51 | 9782 | 9960.57275742086 | -178.57275742086 | 52 | 9441 | 9597.10783211005 | -156.107832110055 | 53 | 9162 | 9903.57506670928 | -741.575066709277 | 54 | 9915 | 9663.34412464065 | 251.655875359355 | 55 | 10444 | 10346.6287661988 | 97.3712338012304 | 56 | 10209 | 10217.0735333544 | -8.07353335436605 | 57 | 9985 | 9860.1914155758 | 124.808584424204 | 58 | 9842 | 10124.9093126398 | -282.909312639764 | 59 | 9429 | 9363.18316517721 | 65.8168348227907 | 60 | 10132 | 9723.8912159272 | 408.108784072804 | 61 | 9849 | 9924.44646265568 | -75.4464626556785 | 62 | 9172 | 9067.23172725819 | 104.768272741811 | 63 | 10313 | 9956.43411713996 | 356.565882860042 | 64 | 9819 | 9596.28010405387 | 222.719895946126 | 65 | 9955 | 9900.81597318868 | 54.1840268113241 | 66 | 10048 | 9651.48002250206 | 396.51997749794 | 67 | 10082 | 10352.5608172681 | -270.560817268062 | 68 | 10541 | 10232.1105930416 | 308.889406958358 | 69 | 10208 | 9905.85441334175 | 302.145586658254 | 70 | 10233 | 10103.8022472072 | 129.197752792835 | 71 | 9439 | 9364.42475726148 | 74.5752427385203 | 72 | 9963 | 9726.37440009574 | 236.625599904263 | 73 | 10158 | 9914.37577130548 | 243.624228694516 | 74 | 9225 | 9050.81512081061 | 174.184879189389 | 75 | 10474 | 9997.13074656883 | 476.869253431174 | 76 | 9757 | 9580.96713501454 | 176.032864985462 | 77 | 10490 | 9898.33278902013 | 591.667210979865 | 78 | 10281 | 9750.53147989164 | 530.468520108357 | 79 | 10444 | 10324.69397271 | 119.30602729001 | 80 | 10640 | 10259.5635735716 | 380.436426428375 | 81 | 10695 | 10026.288845516 | 668.71115448401 | 82 | 10786 | 10095.2490572933 | 690.750942706699 | 83 | 9832 | 9354.62997526335 | 477.370024736655 | 84 | 9747 | 9759.89738637104 | -12.8973863710421 | 85 | 10411 | 9913.9619072774 | 497.038092722606 | 86 | 9511 | 9064.33467906156 | 446.665320938443 | 87 | 10402 | 10026.7910019153 | 375.208998084711 | 88 | 9701 | 9504.95410852197 | 196.045891478026 | 89 | 10540 | 9878.05345164372 | 661.946548356284 | 90 | 10112 | 9835.2356509741 | 276.7643490259 | 91 | 10915 | 10435.6095322382 | 479.390467761841 | 92 | 11183 | 10241.4915110117 | 941.508488988313 | 93 | 10384 | 9993.17972326877 | 390.820276731225 | 94 | 10834 | 10115.9422586978 | 718.05774130219 | 95 | 9886 | 9363.73498388133 | 522.265016118671 | 96 | 10216 | 9742.37714251522 | 473.622857484775 |
Goldfeld-Quandt test for Heteroskedasticity | p-values | Alternative Hypothesis | breakpoint index | greater | 2-sided | less | 16 | 0.263712923166974 | 0.527425846333948 | 0.736287076833026 | 17 | 0.15601395413573 | 0.312027908271461 | 0.84398604586427 | 18 | 0.080759800132706 | 0.161519600265412 | 0.919240199867294 | 19 | 0.0366445898552199 | 0.0732891797104398 | 0.96335541014478 | 20 | 0.0199034936383619 | 0.0398069872767237 | 0.980096506361638 | 21 | 0.0150799650554628 | 0.0301599301109256 | 0.984920034944537 | 22 | 0.00648889930864635 | 0.0129777986172927 | 0.993511100691354 | 23 | 0.00292606782732871 | 0.00585213565465743 | 0.997073932172671 | 24 | 0.00152879573205383 | 0.00305759146410767 | 0.998471204267946 | 25 | 0.000862793754344284 | 0.00172558750868857 | 0.999137206245656 | 26 | 0.000365051789212431 | 0.000730103578424861 | 0.999634948210788 | 27 | 0.000168794348928304 | 0.000337588697856609 | 0.999831205651072 | 28 | 0.000277127168780342 | 0.000554254337560685 | 0.99972287283122 | 29 | 0.00241577084767281 | 0.00483154169534562 | 0.997584229152327 | 30 | 0.00609810040738427 | 0.0121962008147685 | 0.993901899592616 | 31 | 0.00330556820075728 | 0.00661113640151456 | 0.996694431799243 | 32 | 0.00401711744353077 | 0.00803423488706154 | 0.99598288255647 | 33 | 0.00259954667486133 | 0.00519909334972266 | 0.997400453325139 | 34 | 0.0016711501220786 | 0.0033423002441572 | 0.998328849877921 | 35 | 0.00249236936417633 | 0.00498473872835265 | 0.997507630635824 | 36 | 0.00165964401758915 | 0.0033192880351783 | 0.99834035598241 | 37 | 0.00100884629511926 | 0.00201769259023851 | 0.998991153704881 | 38 | 0.00120677578847555 | 0.0024135515769511 | 0.998793224211524 | 39 | 0.0028206149546975 | 0.005641229909395 | 0.997179385045302 | 40 | 0.00206769469789813 | 0.00413538939579626 | 0.997932305302102 | 41 | 0.0073721991377829 | 0.0147443982755658 | 0.992627800862217 | 42 | 0.00629803374182574 | 0.0125960674836515 | 0.993701966258174 | 43 | 0.00450603344542895 | 0.0090120668908579 | 0.99549396655457 | 44 | 0.0235838817555356 | 0.0471677635110711 | 0.976416118244464 | 45 | 0.0214141738326222 | 0.0428283476652445 | 0.978585826167378 | 46 | 0.035269264747704 | 0.070538529495408 | 0.964730735252296 | 47 | 0.0464468474730128 | 0.0928936949460256 | 0.953553152526987 | 48 | 0.0478840687555949 | 0.0957681375111898 | 0.952115931244405 | 49 | 0.0383685805589685 | 0.076737161117937 | 0.961631419441031 | 50 | 0.0341552253385284 | 0.0683104506770568 | 0.965844774661472 | 51 | 0.0350373990887474 | 0.0700747981774948 | 0.964962600911253 | 52 | 0.0297454987979141 | 0.0594909975958281 | 0.970254501202086 | 53 | 0.259544847679493 | 0.519089695358986 | 0.740455152320507 | 54 | 0.286912491681658 | 0.573824983363317 | 0.713087508318342 | 55 | 0.271038909502387 | 0.542077819004774 | 0.728961090497613 | 56 | 0.323626809387498 | 0.647253618774997 | 0.676373190612502 | 57 | 0.333687742989713 | 0.667375485979427 | 0.666312257010287 | 58 | 0.556865563491841 | 0.886268873016319 | 0.443134436508159 | 59 | 0.57277123249057 | 0.85445753501886 | 0.42722876750943 | 60 | 0.637678867498414 | 0.724642265003173 | 0.362321132501586 | 61 | 0.664429746975718 | 0.671140506048564 | 0.335570253024282 | 62 | 0.628014004830468 | 0.743971990339064 | 0.371985995169532 | 63 | 0.621563591334625 | 0.756872817330751 | 0.378436408665375 | 64 | 0.587762645965311 | 0.824474708069378 | 0.412237354034689 | 65 | 0.704880186451565 | 0.590239627096871 | 0.295119813548435 | 66 | 0.697519445019715 | 0.604961109960569 | 0.302480554980285 | 67 | 0.774205684047622 | 0.451588631904755 | 0.225794315952378 | 68 | 0.80318774851525 | 0.393624502969502 | 0.196812251484751 | 69 | 0.79271105383271 | 0.414577892334581 | 0.20728894616729 | 70 | 0.901426662620949 | 0.197146674758101 | 0.0985733373790507 | 71 | 0.93323539371591 | 0.133529212568181 | 0.0667646062840904 | 72 | 0.901184594887503 | 0.197630810224995 | 0.0988154051124974 | 73 | 0.881874675904575 | 0.23625064819085 | 0.118125324095425 | 74 | 0.856047501275043 | 0.287904997449913 | 0.143952498724957 | 75 | 0.81561956545079 | 0.368760869098419 | 0.18438043454921 | 76 | 0.731819238621745 | 0.53636152275651 | 0.268180761378255 | 77 | 0.670951072764672 | 0.658097854470656 | 0.329048927235328 | 78 | 0.666512549180456 | 0.666974901639087 | 0.333487450819544 | 79 | 0.59474267762053 | 0.81051464475894 | 0.40525732237947 | 80 | 0.698291015417387 | 0.603417969165226 | 0.301708984582613 |
Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity | Description | # significant tests | % significant tests | OK/NOK | 1% type I error level | 18 | 0.276923076923077 | NOK | 5% type I error level | 26 | 0.4 | NOK | 10% type I error level | 34 | 0.523076923076923 | NOK |
| | Charts produced by software: | | http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150187id7ki0x8x431mz5/1015ev1292150293.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150187id7ki0x8x431mz5/1015ev1292150293.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150187id7ki0x8x431mz5/1u4h11292150293.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150187id7ki0x8x431mz5/1u4h11292150293.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150187id7ki0x8x431mz5/2nvy41292150293.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150187id7ki0x8x431mz5/2nvy41292150293.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150187id7ki0x8x431mz5/3nvy41292150293.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150187id7ki0x8x431mz5/3nvy41292150293.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150187id7ki0x8x431mz5/4nvy41292150293.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150187id7ki0x8x431mz5/4nvy41292150293.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150187id7ki0x8x431mz5/5nvy41292150293.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150187id7ki0x8x431mz5/5nvy41292150293.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150187id7ki0x8x431mz5/6gmxp1292150293.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150187id7ki0x8x431mz5/6gmxp1292150293.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150187id7ki0x8x431mz5/7rvfs1292150293.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150187id7ki0x8x431mz5/7rvfs1292150293.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150187id7ki0x8x431mz5/8rvfs1292150293.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150187id7ki0x8x431mz5/8rvfs1292150293.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150187id7ki0x8x431mz5/9rvfs1292150293.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/12/t1292150187id7ki0x8x431mz5/9rvfs1292150293.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
|