Home » date » 2010 » Nov » 30 »

ws 8a

*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: Tue, 30 Nov 2010 10:49:01 +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/Nov/30/t12911140516io1lhh9gbx021h.htm/, Retrieved Tue, 30 Nov 2010 11:47:42 +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/Nov/30/t12911140516io1lhh9gbx021h.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 «
2938 2909 3141 2427 3059 2918 2901 2823 2798 2892 2967 2397 3458 3024 3100 2904 3056 2771 2897 2772 2857 3020 2648 2364 3194 3013 2560 3074 2746 2846 3184 2354 3080 2963 2430 2296 2416 2647 2789 2685 2666 2882 2953 2127 2563 3061 2809 2861 2781 2555 3206 2570 2410 3195 2736 2743 2934 2668 2907 2866 2983 2878 3225 2515 3193 2663 2908 2896 2853 3028 3053 2455 3401 2969 3243 2849 3296 3121 3194 3023 2984 3525 3116 2383 3294 2882 2820 2583 2803 2767 2945 2716 2644 2956 2598 2171 2994 2645 2724 2550 2707 2679 2878 2307 2496 2637 2436 2426 2607 2533 2888 2520 2229 2804 2661 2547 2509 2465 2629 2706 2666 2432 2836 2888 2566 2802 2611 2683 2675 2434 2693 2619 2903 2550 2900 2456 2912 2883 2464 2655 2447 2592 2698 2274 2901 2397 3004 2614 2882 2671 2761 2806 2414 2673 2748 2112 2903 2633 2684 2861 2504 2708 2961 2535 2688 2699 2469 2585 2582 2480 2709 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 time12 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
Echtscheidingen[t] = + 2475.20000000000 + 459.533333333336M1[t] + 227.933333333334M2[t] + 446.733333333334M3[t] + 187.266666666667M4[t] + 272.199999999999M5[t] + 344.466666666666M6[t] + 387.133333333333M7[t] + 152.066666666667M8[t] + 233.6M9[t] + 342.933333333333M10[t] + 240.533333333333M11[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)2475.2000000000061.77589440.067400
M1459.53333333333687.3643075.2600
M2227.93333333333487.3643072.6090.00990.00495
M3446.73333333333487.3643075.11351e-060
M4187.26666666666787.3643072.14350.033510.016755
M5272.19999999999987.3643073.11570.0021590.001079
M6344.46666666666687.3643073.94290.0001185.9e-05
M7387.13333333333387.3643074.43131.7e-058e-06
M8152.06666666666787.3643071.74060.0835840.041792
M9233.687.3643072.67390.0082390.004119
M10342.93333333333387.3643073.92530.0001266.3e-05
M11240.53333333333387.3643072.75320.0065510.003275


Multiple Linear Regression - Regression Statistics
Multiple R0.477266199425903
R-squared0.227783025114446
Adjusted R-squared0.177221199377891
F-TEST (value)4.50503955892098
F-TEST (DF numerator)11
F-TEST (DF denominator)168
p-value5.80406379246945e-06
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation239.257009650014
Sum Squared Residuals9616978


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
129382934.733333333293.26666666670734
229092703.13333333333205.866666666666
331412921.93333333334219.066666666664
424272662.46666666667-235.466666666668
530592747.4311.599999999998
629182819.6666666666798.3333333333348
729012862.3333333333338.6666666666681
828232627.26666666667195.733333333335
927982708.889.1999999999996
1028922818.1333333333373.8666666666662
1129672715.73333333333251.266666666668
1223972475.2-78.2000000000002
1334582934.73333333334523.266666666664
1430242703.13333333333320.866666666667
1531002921.93333333333178.066666666667
1629042662.46666666667241.533333333333
1730562747.4308.6
1827712819.66666666667-48.6666666666667
1928972862.3333333333334.6666666666666
2027722627.26666666667144.733333333333
2128572708.8148.2
2230202818.13333333333201.866666666667
2326482715.73333333333-67.7333333333333
2423642475.2-111.2
2531942934.73333333334259.266666666664
2630132703.13333333333309.866666666667
2725602921.93333333333-361.933333333333
2830742662.46666666667411.533333333333
2927462747.4-1.39999999999999
3028462819.6666666666726.3333333333332
3131842862.33333333333321.666666666667
3223542627.26666666667-273.266666666667
3330802708.8371.2
3429632818.13333333333144.866666666667
3524302715.73333333333-285.733333333333
3622962475.2-179.2
3724162934.73333333334-518.733333333336
3826472703.13333333333-56.1333333333333
3927892921.93333333333-132.933333333333
4026852662.4666666666722.5333333333335
4126662747.4-81.4
4228822819.6666666666762.3333333333332
4329532862.3333333333390.6666666666666
4421272627.26666666667-500.266666666667
4525632708.8-145.8
4630612818.13333333333242.866666666667
4728092715.7333333333393.2666666666667
4828612475.2385.8
4927812934.73333333334-153.733333333336
5025552703.13333333333-148.133333333333
5132062921.93333333333284.066666666667
5225702662.46666666667-92.4666666666665
5324102747.4-337.4
5431952819.66666666667375.333333333333
5527362862.33333333333-126.333333333333
5627432627.26666666667115.733333333333
5729342708.8225.2
5826682818.13333333333-150.133333333333
5929072715.73333333333191.266666666667
6028662475.2390.8
6129832934.7333333333448.2666666666638
6228782703.13333333333174.866666666667
6332252921.93333333333303.066666666667
6425152662.46666666667-147.466666666666
6531932747.4445.6
6626632819.66666666667-156.666666666667
6729082862.3333333333345.6666666666666
6828962627.26666666667268.733333333333
6928532708.8144.2
7030282818.13333333333209.866666666667
7130532715.73333333333337.266666666667
7224552475.2-20.2000000000000
7334012934.73333333334466.266666666664
7429692703.13333333333265.866666666667
7532432921.93333333333321.066666666667
7628492662.46666666667186.533333333333
7732962747.4548.6
7831212819.66666666667301.333333333333
7931942862.33333333333331.666666666667
8030232627.26666666667395.733333333333
8129842708.8275.2
8235252818.13333333333706.866666666667
8331162715.73333333333400.266666666667
8423832475.2-92.2
8532942934.73333333334359.266666666664
8628822703.13333333333178.866666666667
8728202921.93333333333-101.933333333333
8825832662.46666666667-79.4666666666665
8928032747.455.6
9027672819.66666666667-52.6666666666667
9129452862.3333333333382.6666666666666
9227162627.2666666666788.7333333333333
9326442708.8-64.8
9429562818.13333333333137.866666666667
9525982715.73333333333-117.733333333333
9621712475.2-304.2
9729942934.7333333333459.2666666666638
9826452703.13333333333-58.1333333333333
9927242921.93333333333-197.933333333333
10025502662.46666666667-112.466666666666
10127072747.4-40.4
10226792819.66666666667-140.666666666667
10328782862.3333333333315.6666666666666
10423072627.26666666667-320.266666666667
10524962708.8-212.8
10626372818.13333333333-181.133333333333
10724362715.73333333333-279.733333333333
10824262475.2-49.2
10926072934.73333333334-327.733333333336
11025332703.13333333333-170.133333333333
11128882921.93333333333-33.9333333333332
11225202662.46666666667-142.466666666666
11322292747.4-518.4
11428042819.66666666667-15.6666666666668
11526612862.33333333333-201.333333333333
11625472627.26666666667-80.2666666666667
11725092708.8-199.8
11824652818.13333333333-353.133333333333
11926292715.73333333333-86.7333333333333
12027062475.2230.8
12126662934.73333333334-268.733333333336
12224322703.13333333333-271.133333333333
12328362921.93333333333-85.9333333333332
12428882662.46666666667225.533333333333
12525662747.4-181.4
12628022819.66666666667-17.6666666666668
12726112862.33333333333-251.333333333333
12826832627.2666666666755.7333333333333
12926752708.8-33.8000000000000
13024342818.13333333333-384.133333333333
13126932715.73333333333-22.7333333333333
13226192475.2143.8
13329032934.73333333334-31.7333333333362
13425502703.13333333333-153.133333333333
13529002921.93333333333-21.9333333333332
13624562662.46666666667-206.466666666667
13729122747.4164.6
13828832819.6666666666763.3333333333332
13924642862.33333333333-398.333333333333
14026552627.2666666666727.7333333333332
14124472708.8-261.8
14225922818.13333333333-226.133333333333
14326982715.73333333333-17.7333333333333
14422742475.2-201.2
14529012934.73333333334-33.7333333333362
14623972703.13333333333-306.133333333333
14730042921.9333333333382.0666666666668
14826142662.46666666667-48.4666666666665
14928822747.4134.6
15026712819.66666666667-148.666666666667
15127612862.33333333333-101.333333333333
15228062627.26666666667178.733333333333
15324142708.8-294.8
15426732818.13333333333-145.133333333333
15527482715.7333333333332.2666666666667
15621122475.2-363.2
15729032934.73333333334-31.7333333333362
15826332703.13333333333-70.1333333333333
15926842921.93333333333-237.933333333333
16028612662.46666666667198.533333333333
16125042747.4-243.4
16227082819.66666666667-111.666666666667
16329612862.3333333333398.6666666666666
16425352627.26666666667-92.2666666666667
16526882708.8-20.7999999999999
16626992818.13333333333-119.133333333333
16724692715.73333333333-246.733333333333
16825852475.2109.8
16925822934.73333333334-352.733333333336
17024802703.13333333333-223.133333333333
17127092921.93333333333-212.933333333333
17224412662.46666666667-221.466666666667
17321822747.4-565.4
17425852819.66666666667-234.666666666667
17528812862.3333333333318.6666666666666
17624222627.26666666667-205.266666666667
17726902708.8-18.7999999999999
17826592818.13333333333-159.133333333333
17925352715.73333333333-180.733333333333
18026132475.2137.8


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
150.5210819291590690.9578361416818620.478918070840931
160.6505307366515690.6989385266968630.349469263348431
170.5184352917617470.9631294164765070.481564708238253
180.4117946291362190.8235892582724380.588205370863781
190.2967650010676540.5935300021353090.703234998932346
200.2073816094260690.4147632188521380.79261839057393
210.1398578819366910.2797157638733810.86014211806331
220.09860581917907220.1972116383581440.901394180820928
230.1070181088235920.2140362176471830.892981891176408
240.06926296469447540.1385259293889510.930737035305525
250.04486134173262090.08972268346524180.95513865826738
260.02951354376010230.05902708752020460.970486456239898
270.1504640425342420.3009280850684840.849535957465758
280.2291103439383090.4582206878766170.770889656061691
290.2415910538031850.483182107606370.758408946196815
300.1863935650567690.3727871301135370.813606434943231
310.197645370005380.395290740010760.80235462999462
320.2801141921535740.5602283843071490.719885807846426
330.2850445544026440.5700891088052870.714955445597356
340.2332848174284250.466569634856850.766715182571575
350.2789049130415090.5578098260830180.721095086958491
360.2354397101648980.4708794203297960.764560289835102
370.6386728888897980.7226542222204040.361327111110202
380.6490362668123020.7019274663753960.350963733187698
390.6076914380011710.7846171239976570.392308561998829
400.5584524082453950.883095183509210.441547591754605
410.5512719918495590.8974560163008820.448728008150441
420.4949876790055920.9899753580111830.505012320994408
430.4417119237586440.8834238475172870.558288076241356
440.5995569709022190.8008860581955620.400443029097781
450.6135603169187440.7728793661625130.386439683081256
460.5830743709168690.8338512581662630.416925629083131
470.539527647194170.920944705611660.46047235280583
480.6502343137023550.699531372595290.349765686297645
490.6290086314863650.741982737027270.370991368513635
500.6399921585959780.7200156828080440.360007841404022
510.655434961389560.6891300772208790.344565038610439
520.6271310666732880.7457378666534240.372868933326712
530.7011071735966260.5977856528067480.298892826403374
540.7395779495721980.5208441008556040.260422050427802
550.7231479396669180.5537041206661630.276852060333082
560.7014836244758740.5970327510482530.298516375524126
570.680170156064480.6396596878710380.319829843935519
580.6785770115786580.6428459768426850.321422988421342
590.6585604378859730.6828791242280540.341439562114027
600.7141990585296480.5716018829407050.285800941470352
610.6725344632763060.6549310734473880.327465536723694
620.6449518069201910.7100963861596180.355048193079809
630.6599481377588940.6801037244822130.340051862241106
640.6385837013343080.7228325973313830.361416298665692
650.7237811825309740.5524376349380530.276218817469026
660.7110250727743240.5779498544513520.288974927225676
670.671469147387720.6570617052245610.328530852612281
680.6879764131638660.6240471736722680.312023586836134
690.6597546104143650.680490779171270.340245389585635
700.643014397835870.713971204328260.35698560216413
710.676300094725090.647399810549820.32369990527491
720.6374122326357970.7251755347284050.362587767364203
730.7452890432394780.5094219135210430.254710956760522
740.7543984099998670.4912031800002660.245601590000133
750.78146809491730.4370638101653990.218531905082699
760.7678299479684440.4643401040631110.232170052031556
770.8928089891104340.2143820217791320.107191010889566
780.9071562606200270.1856874787599450.0928437393799725
790.9268771228346880.1462457543306230.0731228771653115
800.954335556950950.09132888609809890.0456644430490494
810.9621697976479370.07566040470412630.0378302023520632
820.9982699803516440.003460039296711030.00173001964835551
830.999458644461150.001082711077698880.000541355538849439
840.9992591136107950.001481772778410150.000740886389205077
850.9997702404784080.0004595190431836190.000229759521591810
860.999838462112780.0003230757744397020.000161537887219851
870.9997835699722760.0004328600554480960.000216430027724048
880.9996878372142530.0006243255714935940.000312162785746797
890.9996722811071890.0006554377856226290.000327718892811314
900.9995356908417980.0009286183164036940.000464309158201847
910.9994505479128150.001098904174370770.000549452087185384
920.9992853257836160.001429348432767310.000714674216383657
930.9991075680915930.001784863816813370.000892431908406687
940.9994058932884830.001188213423034840.00059410671151742
950.9992453297556980.001509340488604510.000754670244302255
960.9995440781109980.0009118437780042810.000455921889002140
970.9995217596712490.0009564806575027040.000478240328751352
980.9994367700901510.001126459819697780.00056322990984889
990.9993657268115560.001268546376888450.000634273188444226
1000.9991367590232070.001726481953586130.000863240976793065
1010.9990061461396520.001987707720695410.000993853860347704
1020.9987121281900280.002575743619943040.00128787180997152
1030.9983921973839750.003215605232049370.00160780261602469
1040.9990285447236880.001942910552624930.000971455276312466
1050.9989243284136140.002151343172772430.00107567158638621
1060.9988388701707260.002322259658548020.00116112982927401
1070.9989953494763320.002009301047335580.00100465052366779
1080.9985391913392340.002921617321531610.00146080866076581
1090.9988192549746230.002361490050753120.00118074502537656
1100.9985360376009970.002927924798006620.00146396239900331
1110.9979112946981770.004177410603645450.00208870530182272
1120.9973690224985880.005261955002824490.00263097750141224
1130.9992925743483470.001414851303306670.000707425651653333
1140.998964052725210.002071894549578050.00103594727478903
1150.9986971336109820.002605732778036330.00130286638901816
1160.9981314456718850.003737108656229120.00186855432811456
1170.9976543670841710.004691265831657610.00234563291582880
1180.997960913294340.004078173411319230.00203908670565962
1190.9970506322167280.00589873556654460.0029493677832723
1200.9974063531642350.00518729367153020.0025936468357651
1210.9971855548814320.005628890237135780.00281444511856789
1220.9966937022627120.0066125954745750.0033062977372875
1230.9952239088402640.009552182319472480.00477609115973624
1240.9960533323060330.00789333538793430.00394666769396715
1250.9947029038631750.01059419227365060.00529709613682528
1260.9926292772244570.01474144555108530.00737072277554267
1270.9916961782887870.01660764342242600.00830382171121302
1280.9884420594128850.02311588117423000.0115579405871150
1290.9847822688088460.03043546238230830.0152177311911541
1300.9869954787972250.02600904240554990.0130045212027749
1310.9821372118670780.03572557626584340.0178627881329217
1320.9807445125847370.03851097483052560.0192554874152628
1330.9744550715889180.05108985682216310.0255449284110815
1340.9663218959252590.06735620814948280.0336781040747414
1350.9558497986831540.0883004026336930.0441502013168465
1360.949964208901570.1000715821968610.0500357910984306
1370.9654589496044650.06908210079106980.0345410503955349
1380.9624760890555820.07504782188883640.0375239109444182
1390.9808265015576180.03834699688476490.0191734984423824
1400.9727847995424210.05443040091515760.0272152004575788
1410.967956363917440.06408727216512060.0320436360825603
1420.9584699786470030.08306004270599380.0415300213529969
1430.9452642880358820.1094714239282360.0547357119641178
1440.9350848318558880.1298303362882230.0649151681441115
1450.9194028073067640.1611943853864720.0805971926932361
1460.907219856490240.185560287019520.09278014350976
1470.9134441659847060.1731116680305880.0865558340152942
1480.8821767245446730.2356465509106530.117823275455327
1490.9595034661288220.0809930677423560.040496533871178
1500.9409671845831540.1180656308336920.0590328154168461
1510.9251895543928340.1496208912143330.0748104456071664
1520.9412721404717110.1174557190565770.0587278595282887
1530.947871384787970.1042572304240590.0521286152120293
1540.9213273697623520.1573452604752960.0786726302376478
1550.9184964509638170.1630070980723660.0815035490361832
1560.9851821105469820.02963577890603610.0148178894530180
1570.9904442593429440.01911148131411200.00955574065705602
1580.985246817720570.0295063645588620.014753182279431
1590.9714770462937470.05704590741250650.0285229537062533
1600.9958980400493620.008203919901276780.00410195995063839
1610.9998168810589390.0003662378821227980.000183118941061399
1620.999776188495220.0004476230095611370.000223811504780569
1630.9993921518986650.001215696202670170.000607848101335087
1640.9995684619565840.0008630760868325630.000431538043416282
1650.9962085559426180.00758288811476440.0037914440573822


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level490.324503311258278NOK
5% type I error level610.403973509933775NOK
10% type I error level750.496688741721854NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911140516io1lhh9gbx021h/107nmd1291114127.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911140516io1lhh9gbx021h/107nmd1291114127.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911140516io1lhh9gbx021h/1imp11291114127.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911140516io1lhh9gbx021h/1imp11291114127.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911140516io1lhh9gbx021h/2tdp41291114127.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911140516io1lhh9gbx021h/2tdp41291114127.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911140516io1lhh9gbx021h/3tdp41291114127.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911140516io1lhh9gbx021h/3tdp41291114127.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911140516io1lhh9gbx021h/4mno71291114127.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911140516io1lhh9gbx021h/4mno71291114127.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911140516io1lhh9gbx021h/5mno71291114127.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911140516io1lhh9gbx021h/5mno71291114127.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911140516io1lhh9gbx021h/6mno71291114127.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911140516io1lhh9gbx021h/6mno71291114127.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911140516io1lhh9gbx021h/7ew5a1291114127.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911140516io1lhh9gbx021h/7ew5a1291114127.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911140516io1lhh9gbx021h/87nmd1291114127.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911140516io1lhh9gbx021h/87nmd1291114127.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911140516io1lhh9gbx021h/97nmd1291114127.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911140516io1lhh9gbx021h/97nmd1291114127.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