Home » date » 2010 » Dec » 27 »

*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: Mon, 27 Dec 2010 16:54:35 +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/27/t1293468822y02zrshpiwy3n55.htm/, Retrieved Mon, 27 Dec 2010 17:53:54 +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/27/t1293468822y02zrshpiwy3n55.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 «
1567 0 2237 0 2598 0 3729 0 5715 0 5776 0 5852 0 6878 0 5488 0 3583 0 2054 0 2282 0 1552 0 2261 0 2446 0 3519 0 5161 0 5085 0 5711 0 6057 0 5224 0 3363 0 1899 0 2115 0 1491 0 2061 0 2419 0 3430 0 4778 0 4862 0 6176 0 5664 0 5529 0 3418 0 1941 0 2402 0 1579 0 2146 0 2462 0 3695 0 4831 0 5134 0 6250 0 5760 0 6249 0 2917 0 1741 0 2359 0 1511 0 2059 0 2635 0 2867 0 4403 0 5720 0 4502 0 5749 0 5627 0 2846 0 1762 0 2429 0 1169 0 2154 0 2249 0 2687 0 4359 0 5382 0 4459 0 6398 0 4596 0 3024 0 1887 0 2070 0 1351 0 2218 0 2461 0 3028 0 4784 0 4975 0 4607 1 6249 1 4809 1 3157 1 1910 1 2228 1 1594 1 2467 1 2222 1 3607 1 4685 1 4962 1 5770 1 5480 1 5000 1 3228 1 1993 1 2288 1 1588 1 2105 1 2191 1 3591 1 4668 1 4885 1 5822 1 5599 1 5340 1 3082 1 2010 1 2301 1 1507 1 1992 1 2487 1 3490 1 4647 1 5594 1 5611 1 5788 1 6204 1 3013 1 1931 1 2549 1 1504 1 2090 1 2702 1 2939 1 4500 1 6208 1 6415 1 5657 1 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!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time10 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
Huwelijken[t] = + 2280.23397435897 + 13.2797619047618Dummy[t] -807.055402930404M1[t] -114.824633699637M2[t] + 154.713827838829M3[t] + 1029.25228937729M4[t] + 2549.94459706960M5[t] + 3006.25228937728M6[t] + 3171.76923076923M7[t] + 3817.30769230770M8[t] + 3149.46153846154M9[t] + 933.615384615386M10[t] -368.692307692308M11[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)2280.23397435897113.22733320.138500
Dummy13.279761904761862.5939080.21220.8322860.416143
M1-807.055402930404152.944652-5.276800
M2-114.824633699637152.944652-0.75080.4540310.227016
M3154.713827838829152.9446521.01160.3134530.156727
M41029.25228937729152.9446526.729600
M52549.94459706960152.94465216.672300
M63006.25228937728152.94465219.655800
M73171.76923076923152.86884320.748300
M83817.30769230770152.86884324.971100
M93149.46153846154152.86884320.602400
M10933.615384615386152.8688436.107300
M11-368.692307692308152.868843-2.41180.0171410.008571


Multiple Linear Regression - Regression Statistics
Multiple R0.973352910832983
R-squared0.94741588902704
Adjusted R-squared0.943003236357981
F-TEST (value)214.704387605692
F-TEST (DF numerator)12
F-TEST (DF denominator)143
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation389.740605971138
Sum Squared Residuals21721376.8118132


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
115671473.1785714285693.821428571437
222372165.4093406593471.5906593406562
325982434.94780219779163.052197802205
437293309.48626373625419.513736263746
557154830.17857142857884.821428571427
657765286.48626373627489.513736263732
758525452.0032051282399.996794871796
868786097.54166666665780.458333333354
954885429.6955128205158.304487179488
1035833213.84935897436369.15064102564
1120541911.54166666667142.458333333328
1222822280.233974358981.76602564102120
1315521473.1785714285778.821428571428
1422612165.4093406593495.5906593406597
1524462434.9478021978011.0521978021972
1635193309.48626373626209.513736263735
1751614830.17857142857330.821428571428
1850855286.48626373626-201.486263736263
1957115452.0032051282258.996794871795
2060576097.54166666667-40.5416666666685
2152245429.69551282051-205.695512820513
2233633213.84935897436149.150641025641
2318991911.54166666667-12.5416666666665
2421152280.23397435898-165.233974358975
2514911473.1785714285717.8214285714274
2620612165.40934065934-104.409340659340
2724192434.94780219780-15.9478021978028
2834303309.48626373626120.513736263735
2947784830.17857142857-52.178571428572
3048625286.48626373626-424.486263736263
3161765452.0032051282723.996794871794
3256646097.54166666667-433.541666666669
3355295429.6955128205199.3044871794869
3434183213.84935897436204.150641025641
3519411911.5416666666729.4583333333334
3624022280.23397435898121.766025641025
3715791473.17857142857105.821428571427
3821462165.40934065934-19.4093406593403
3924622434.9478021978027.0521978021972
4036953309.48626373626385.513736263735
4148314830.178571428570.82142857142801
4251345286.48626373626-152.486263736263
4362505452.0032051282797.996794871794
4457606097.54166666667-337.541666666668
4562495429.69551282051819.304487179487
4629173213.84935897436-296.849358974359
4717411911.54166666667-170.541666666667
4823592280.2339743589878.766025641025
4915111473.1785714285737.8214285714274
5020592165.40934065934-106.409340659340
5126352434.94780219780200.052197802197
5228673309.48626373626-442.486263736265
5344034830.17857142857-427.178571428572
5457205286.48626373626433.513736263736
5545025452.0032051282-950.003205128205
5657496097.54166666667-348.541666666668
5756275429.69551282051197.304487179487
5828463213.84935897436-367.849358974359
5917621911.54166666667-149.541666666667
6024292280.23397435898148.766025641025
6111691473.17857142857-304.178571428573
6221542165.40934065934-11.4093406593403
6322492434.94780219780-185.947802197803
6426873309.48626373627-622.486263736265
6543594830.17857142857-471.178571428572
6653825286.4862637362695.5137362637365
6744595452.0032051282-993.003205128205
6863986097.54166666667300.458333333332
6945965429.69551282051-833.695512820513
7030243213.84935897436-189.849358974359
7118871911.54166666667-24.5416666666665
7220702280.23397435898-210.233974358975
7313511473.17857142857-122.178571428573
7422182165.4093406593452.5906593406597
7524612434.9478021978026.0521978021972
7630283309.48626373626-281.486263736265
7747844830.17857142857-46.178571428572
7849755286.48626373626-311.486263736263
7946075465.28296703297-858.282967032967
8062496110.82142857143138.178571428570
8148095442.97527472527-633.975274725274
8231573227.12912087912-70.1291208791209
8319101924.82142857143-14.8214285714279
8422282293.51373626374-65.5137362637364
8515941486.45833333333107.541666666666
8624672178.6891025641288.310897435898
8722222448.22756410256-226.227564102565
8836073322.76602564103284.233974358974
8946854843.45833333333-158.458333333333
9049625299.76602564102-337.766025641025
9157705465.28296703297304.717032967033
9254806110.82142857143-630.82142857143
9350005442.97527472527-442.975274725275
9432283227.129120879120.870879120879065
9519931924.8214285714368.1785714285721
9622882293.51373626374-5.5137362637364
9715881486.45833333333101.541666666666
9821052178.6891025641-73.689102564102
9921912448.22756410256-257.227564102564
10035913322.76602564103268.233974358974
10146684843.45833333333-175.458333333333
10248855299.76602564102-414.766025641025
10358225465.28296703297356.717032967033
10455996110.82142857143-511.82142857143
10553405442.97527472528-102.975274725275
10630823227.12912087912-145.129120879121
10720101924.8214285714385.1785714285721
10823012293.513736263747.4862637362636
10915071486.4583333333320.541666666666
11019922178.6891025641-186.689102564102
11124872448.2275641025638.7724358974355
11234903322.76602564103167.233974358974
11346474843.45833333333-196.458333333333
11455945299.76602564102294.233974358976
11556115465.28296703297145.717032967033
11657886110.82142857143-322.82142857143
11762045442.97527472528761.024725274725
11830133227.12912087912-214.129120879121
11919311924.821428571436.1785714285721
12025492293.51373626374255.486263736263
12115041486.4583333333317.541666666666
12220902178.6891025641-88.689102564102
12327022448.22756410256253.772435897436
12429393322.76602564103-383.766025641026
12545004843.45833333333-343.458333333333
12662085299.76602564102908.233974358975
12764155465.28296703297949.717032967033
12856576110.82142857143-453.82142857143
12959645442.97527472527521.024725274725
13031633227.12912087912-64.1291208791209
13119971924.8214285714372.1785714285721
13224222293.51373626374128.486263736263
13313761486.45833333333-110.458333333334
13422022178.689102564123.3108974358981
13526832448.22756410256234.772435897436
13633033322.76602564103-19.7660256410262
13752024843.45833333333358.541666666667
13852315299.76602564102-68.7660256410247
13948805465.28296703297-585.282967032967
14079986110.821428571431887.17857142857
14149775442.97527472527-465.975274725275
14235313227.12912087912303.870879120879
14320251924.82142857143100.178571428572
14422052293.51373626374-88.5137362637364
14514421486.45833333333-44.458333333334
14622382178.689102564159.3108974358981
14721792448.22756410256-269.227564102564
14832183322.76602564103-104.766025641026
14951394843.45833333333295.541666666667
15049905299.76602564102-309.766025641025
15149145465.28296703297-551.282967032967
15260846110.82142857143-26.8214285714303
15356725442.97527472528229.024725274725
15435483227.12912087912320.870879120879
15517931924.82142857143-131.821428571428
15620862293.51373626374-207.513736263736


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
160.02678614541041220.05357229082082450.973213854589588
170.1305736896746150.2611473793492300.869426310325385
180.2723733239016420.5447466478032850.727626676098358
190.1778229330015940.3556458660031870.822177066998406
200.3479010598553270.6958021197106540.652098940144673
210.2720459841562210.5440919683124430.727954015843779
220.2039302588185690.4078605176371380.79606974118143
230.1428673654389450.2857347308778890.857132634561055
240.09817419163647770.1963483832729550.901825808363522
250.06276271504321280.1255254300864260.937237284956787
260.04268239165192210.08536478330384420.957317608348078
270.02632939370734920.05265878741469840.97367060629265
280.01769438859874100.03538877719748210.982305611401259
290.04023315127444380.08046630254888760.959766848725556
300.05780691817596790.1156138363519360.942193081824032
310.06570848864249160.1314169772849830.934291511357508
320.1413552377501470.2827104755002940.858644762249853
330.1092180555278410.2184361110556820.89078194447216
340.08155151192156450.1631030238431290.918448488078436
350.05799111423148060.1159822284629610.94200888576852
360.04385586327338290.08771172654676590.956144136726617
370.03043032997556160.06086065995112310.969569670024439
380.02041589401454050.0408317880290810.97958410598546
390.0134436092050580.0268872184101160.986556390794942
400.01039120787413130.02078241574826260.989608792125869
410.01015114388230670.02030228776461340.989848856117693
420.006714514417160060.01342902883432010.99328548558284
430.01047622705371920.02095245410743840.98952377294628
440.01145633692037330.02291267384074660.988543663079627
450.05235698305161940.1047139661032390.94764301694838
460.0614918654741150.122983730948230.938508134525885
470.04916385297058150.0983277059411630.950836147029419
480.03726838507411550.0745367701482310.962731614925885
490.02753250120106190.05506500240212390.972467498798938
500.02005755358065890.04011510716131770.97994244641934
510.01602220445850940.03204440891701870.98397779554149
520.03111736602798410.06223473205596820.968882633972016
530.05165391613049140.1033078322609830.948346083869509
540.06526959185992190.1305391837198440.934730408140078
550.3863419970595460.7726839941190930.613658002940454
560.361550180567720.723100361135440.63844981943228
570.3351116233471060.6702232466942120.664888376652894
580.3291859146460860.6583718292921710.670814085353914
590.2864794950317900.5729589900635790.71352050496821
600.2572924824919600.5145849649839190.74270751750804
610.2383041129102710.4766082258205420.761695887089729
620.202089485045040.404178970090080.79791051495496
630.1763092501384650.3526185002769300.823690749861535
640.2297816548473900.4595633096947810.77021834515261
650.2487630171421310.4975260342842630.751236982857869
660.2178168447682140.4356336895364280.782183155231786
670.4549017718970180.9098035437940370.545098228102982
680.4499405241286910.8998810482573830.550059475871309
690.5997287827426280.8005424345147440.400271217257372
700.5568738198026280.8862523603947440.443126180197372
710.5075426463014060.9849147073971880.492457353698594
720.4669747928899460.9339495857798930.533025207110054
730.4198443734907120.8396887469814230.580155626509288
740.3755359336835260.7510718673670510.624464066316474
750.3353055689321400.6706111378642790.66469443106786
760.3030491425066290.6060982850132580.696950857493371
770.2665066365609290.5330132731218570.733493363439071
780.240369864146750.48073972829350.75963013585325
790.2911003358503420.5822006717006840.708899664149658
800.3153926765272350.630785353054470.684607323472765
810.3362316725006030.6724633450012060.663768327499397
820.3083069521152720.6166139042305440.691693047884728
830.2784547851524890.5569095703049780.721545214847511
840.2430104172729140.4860208345458270.756989582727086
850.2178521356233410.4357042712466810.78214786437666
860.2117639167863640.4235278335727270.788236083213636
870.1827727713526590.3655455427053170.817227228647341
880.1734810319309310.3469620638618610.82651896806907
890.1452259546962840.2904519093925680.854774045303716
900.1331079764291990.2662159528583990.8668920235708
910.1261188124459280.2522376248918550.873881187554072
920.1600585721678010.3201171443356010.8399414278322
930.1679977721825920.3359955443651830.832002227817408
940.1395577478101600.2791154956203200.86044225218984
950.1157299252868610.2314598505737220.88427007471314
960.09327641057130060.1865528211426010.9067235894287
970.07611551894971390.1522310378994280.923884481050286
980.0593464116237470.1186928232474940.940653588376253
990.04981819755231480.09963639510462970.950181802447685
1000.04490541173996590.08981082347993180.955094588260034
1010.035175215726630.070350431453260.96482478427337
1020.03722660117888520.07445320235777050.962773398821115
1030.03578085442343540.07156170884687070.964219145576565
1040.04741184947810490.09482369895620970.952588150521895
1050.0400191679347510.0800383358695020.959980832065249
1060.03120527017445130.06241054034890260.968794729825549
1070.02346923856442810.04693847712885620.976530761435572
1080.01701960667227310.03403921334454620.982980393327727
1090.01215712148870140.02431424297740290.987842878511299
1100.008845898887244450.01769179777448890.991154101112756
1110.00614869883238630.01229739766477260.993851301167614
1120.004797811974837750.00959562394967550.995202188025162
1130.003533072919716190.007066145839432380.996466927080284
1140.002771072979415520.005542145958831040.997228927020585
1150.001927062126579240.003854124253158480.99807293787342
1160.002600003094177170.005200006188354340.997399996905823
1170.005351005336776870.01070201067355370.994648994663223
1180.004248388867412150.00849677773482430.995751611132588
1190.002719311297166280.005438622594332560.997280688702834
1200.002053991425769620.004107982851539250.99794600857423
1210.001271359272045650.002542718544091310.998728640727954
1220.0007745419483237650.001549083896647530.999225458051676
1230.0005335861577102590.001067172315420520.99946641384229
1240.0003947376526736950.000789475305347390.999605262347326
1250.0004208397618300710.0008416795236601420.99957916023817
1260.002334502493732110.004669004987464210.997665497506268
1270.03665709011656310.07331418023312610.963342909883437
1280.2008670762155830.4017341524311650.799132923784417
1290.2429670135620780.4859340271241570.757032986437922
1300.2136645396647470.4273290793294940.786335460335253
1310.1603206810730610.3206413621461220.839679318926939
1320.1257275796365620.2514551592731230.874272420363438
1330.08676709846415930.1735341969283190.913232901535841
1340.05644071685369650.1128814337073930.943559283146304
1350.04711351916618030.09422703833236060.95288648083382
1360.02776246584746290.05552493169492590.972237534152537
1370.01592402665057480.03184805330114960.984075973349425
1380.008504561553094120.01700912310618820.991495438446906
1390.004381146388177110.008762292776354220.995618853611823
1400.6362419270526650.727516145894670.363758072947335


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level150.12NOK
5% type I error level330.264NOK
10% type I error level540.432NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293468822y02zrshpiwy3n55/108sx51293468864.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293468822y02zrshpiwy3n55/108sx51293468864.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293468822y02zrshpiwy3n55/19hxg1293468863.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293468822y02zrshpiwy3n55/19hxg1293468863.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293468822y02zrshpiwy3n55/2cjhw1293468864.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293468822y02zrshpiwy3n55/2cjhw1293468864.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293468822y02zrshpiwy3n55/3cjhw1293468864.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293468822y02zrshpiwy3n55/3cjhw1293468864.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293468822y02zrshpiwy3n55/4cjhw1293468864.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293468822y02zrshpiwy3n55/4cjhw1293468864.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293468822y02zrshpiwy3n55/5nayh1293468864.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293468822y02zrshpiwy3n55/5nayh1293468864.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293468822y02zrshpiwy3n55/6nayh1293468864.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293468822y02zrshpiwy3n55/6nayh1293468864.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293468822y02zrshpiwy3n55/7gjg21293468864.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293468822y02zrshpiwy3n55/7gjg21293468864.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293468822y02zrshpiwy3n55/8gjg21293468864.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293468822y02zrshpiwy3n55/8gjg21293468864.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293468822y02zrshpiwy3n55/98sx51293468864.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293468822y02zrshpiwy3n55/98sx51293468864.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

Creative Commons License

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