Home » date » 2010 » Dec » 14 »

*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, 14 Dec 2010 18:47:29 +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/14/t1292352326767j83gx2o1kg40.htm/, Retrieved Tue, 14 Dec 2010 19:45:36 +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/14/t1292352326767j83gx2o1kg40.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 «
0 69 26 9 15 6 25 25 1 53 20 9 15 6 25 24 1 43 21 9 14 13 19 21 0 60 31 14 10 8 18 23 1 49 21 8 10 7 18 17 1 62 18 8 12 9 22 19 1 45 26 11 18 5 29 18 1 50 22 10 12 8 26 27 1 75 22 9 14 9 25 23 1 82 29 15 18 11 23 23 0 60 15 14 9 8 23 29 1 59 16 11 11 11 23 21 1 21 24 14 11 12 24 26 1 62 17 6 17 8 30 25 0 54 19 20 8 7 19 25 1 47 22 9 16 9 24 23 1 59 31 10 21 12 32 26 0 37 28 8 24 20 30 20 0 43 38 11 21 7 29 29 1 48 26 14 14 8 17 24 0 79 25 11 7 8 25 23 0 62 25 16 18 16 26 24 1 16 29 14 18 10 26 30 0 38 28 11 13 6 25 22 1 58 15 11 11 8 23 22 0 60 18 12 13 9 21 13 0 67 21 9 13 9 19 24 0 55 25 7 18 11 35 17 1 47 23 13 14 12 19 24 0 59 23 10 12 8 20 21 1 49 19 9 9 7 21 23 0 47 18 9 12 8 21 24 1 57 18 13 8 9 24 24 0 39 26 16 5 4 23 24 1 49 18 12 10 8 19 23 1 26 18 6 11 8 17 26 0 53 28 14 11 8 24 24 0 75 17 14 12 6 15 21 1 65 29 10 12 8 25 23 1 49 12 4 15 4 27 28 0 48 25 12 12 7 29 23 0 45 28 12 16 14 27 22 0 31 20 14 14 10 18 24 1 61 17 9 17 9 25 21 1 49 17 9 13 6 22 23 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
Anxiety[t] = + 62.6264784679251 -4.54909193536482Gender[t] -0.361672579691563Mistakes[t] + 0.169699251103092Doubts[t] + 0.788331768369544Expectations[t] -1.10287823451153Critism[t] + 0.108738082842006Pstandards[t] -0.232322040117943Organization[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)62.62647846792519.2413896.776700
Gender-4.549091935364822.197821-2.06980.0402560.020128
Mistakes-0.3616725796915630.241604-1.4970.1365910.068295
Doubts0.1696992511030920.4413710.38450.7011880.350594
Expectations0.7883317683695440.4029881.95620.0523750.026187
Critism-1.102878234511530.505322-2.18250.0306920.015346
Pstandards0.1087380828420060.3098610.35090.7261570.363079
Organization-0.2323220401179430.316958-0.7330.4647660.232383


Multiple Linear Regression - Regression Statistics
Multiple R0.275657312550536
R-squared0.0759869539625837
Adjusted R-squared0.0310696531135426
F-TEST (value)1.69170792826493
F-TEST (DF numerator)7
F-TEST (DF denominator)144
p-value0.115413556168906
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation13.2170763953282
Sum Squared Residuals25155.5196153517


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
16956.868392842447912.1316071575521
25354.7216584253503-1.72165842535032
34345.8960440590103-2.89604405901034
46049.464588388976610.5354116110234
54950.010837219128-1.01083721912801
66250.437070277050911.5629297229491
74558.187779561103-13.1877795611030
85049.00903270542680.990967294573178
97550.13366883418124.8663311658190
108249.350250721729832.6497492782702
116053.61277606917446.38722393082557
125948.319518954956810.6804810450432
132143.7794857184743-22.7794857184743
146254.97985385292397.0201461470761
155453.99316355227250.0068364477275441
164751.6015942880781-4.60159428807813
175949.32220300265259.6777969973475
183749.3353396789258-12.3353396789258
194356.0004969349573-13.0004969349573
204849.5361263025878-1.53612630258779
217949.521697388602129.4783026113979
226250.095233262814311.9047667371857
231648.9833896728386-32.9833896728386
243855.6047487688857-17.6047487688857
255851.7575041980656.242495801935
266057.73848514306332.26151485693674
276753.371351043697913.6286489563021
285556.6872282018478-1.68722820184783
294746.25740801819730.742591981802725
305953.93795580475575.06204419524429
314949.047831869063-0.0478318690630597
324754.9883914145986-7.9883914145986
335747.18810542418259.81189457581754
343952.3935722599311-13.3935722599311
354949.3865795702379-0.386579570237898
362648.242273545951-22.2422735459511
375351.75804435335491.24195564664509
387558.448854342130516.5511456578695
396547.297874725215617.7021252747844
404958.2604872816027-9.26048728160273
414855.1708860474325-7.17088604743246
424549.5338936146891-4.53389361468915
433154.1582353299209-23.1582353299209
446154.77167111798346.22832888201662
454954.1361204192779-5.1361204192779
466949.085002488542619.9149975114574
475452.91493259859261.08506740140735
488053.761704552534926.2382954474651
495756.76444522068250.235554779317547
503452.3490862820169-18.3490862820169
516957.142076035721911.8579239642781
524448.7252614958083-4.72526149580835
537052.660750598485317.3392494015147
545155.8650122801255-4.86501228012553
556651.551257005881614.4487429941184
561846.9244344438527-28.9244344438527
577449.739453108464524.2605468915355
585954.69953022794884.30046977205118
594855.9314419418487-7.93144194184865
605549.80456727594545.1954327240546
614450.5696397410586-6.56963974105858
625651.9864795263364.01352047366403
636555.33512806736879.66487193263131
647752.615019016571524.3849809834285
654645.38574364509830.61425635490167
667054.341077968186715.6589220318133
673954.5524444273522-15.5524444273522
685559.3390187494025-4.33901874940246
694453.0384156384161-9.03841563841607
704556.4683324091105-11.4683324091105
714552.8442834771808-7.84428347718081
724958.2605569672452-9.26055696724524
736548.155141899563916.8448581004361
744550.9692730454757-5.9692730454757
757149.315546824775421.6844531752246
764850.9040230802883-2.90402308028825
774146.3865725417958-5.38657254179578
784054.4234088893673-14.4234088893673
796452.999176465186111.0008235348139
805653.67768315734232.32231684265774
815255.1672318876934-3.16723188769337
824147.1669139630747-6.16691396307471
834252.7597642203348-10.7597642203348
845458.1303769171605-4.13037691716054
854047.8255198689898-7.8255198689898
864049.4696513449374-9.46965134493737
875155.4680335780203-4.46803357802025
884855.6558883643725-7.65588836437252
898062.479300142788917.5206998572111
903857.3483504592595-19.3483504592595
915757.0216305591598-0.0216305591597555
922844.8882630066128-16.8882630066128
935153.8701651397952-2.87016513979517
944651.490009762044-5.49000976204398
955853.33394801849284.66605198150716
966750.928778004570716.0712219954293
977248.590667390065123.4093326099349
982648.6181524816782-22.6181524816782
995453.83908173637710.160918263622943
1005353.3967192630048-0.396719263004798
1016446.899587114552317.1004128854477
1024748.5957112245472-1.59571122454718
1034354.7710864290161-11.7710864290161
1046647.429269449162218.5707305508378
1055450.17289908253743.82710091746262
1066256.77388358781575.22611641218431
1075250.89348314445211.10651685554786
1086453.074107079538510.9258929204615
1095549.71864905805385.28135094194622
1105754.95311909940822.04688090059182
1117454.03566494745719.9643350525430
1123249.0143670547102-17.0143670547102
1133852.9323366417668-14.9323366417668
1146652.103118205453313.8968817945467
1153755.5088808818292-18.5088808818292
1162649.5283945733107-23.5283945733107
1176451.348223128804512.6517768711955
1182847.3893198940499-19.3893198940499
1196660.58662011283325.41337988716681
1206554.298205451354410.7017945486456
1214848.4936803092093-0.493680309209308
1224454.7518905242933-10.7518905242933
1236456.79214418336387.2078558166362
1243948.72029818031-9.72029818031
1255053.3495799354858-3.34957993548582
1266651.612218174142614.3877818258574
1274852.0982219457131-4.09822194571310
1287055.447971111754614.5520288882454
1296658.77842563938737.22157436061267
1306149.705696781145211.2943032188548
1313148.732352955723-17.7323529557230
1326154.67603476571226.32396523428777
1335445.06847431812118.93152568187891
1343445.2149963154671-11.2149963154671
1356249.828456610828912.1715433891711
1364753.841147467513-6.84114746751297
1375248.10211385530183.89788614469821
1383759.8945094173258-22.8945094173258
1394646.8097998676881-0.809799867688128
1403853.0809431521072-15.0809431521072
1416351.75750419806511.242495801935
1423454.9949948139028-20.9949948139028
1434647.225674051785-1.22567405178502
1444046.3566514362257-6.35665143622572
1453047.8255198689898-17.8255198689898
1463548.2784881954771-13.2784881954771
1475148.49368030920932.50631969079069
1485655.0899118594180.910088140582046
1496852.945570812043215.0544291879568
1503951.4191899341407-12.4191899341407
1514453.9356715056027-9.93567150560273
1525851.41918993414076.58081006585932


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.9065844855561440.1868310288877120.0934155144438562
120.8330028690910470.3339942618179060.166997130908953
130.9545647853312150.09087042933756940.0454352146687847
140.9205525150931330.1588949698137330.0794474849068666
150.8762307300158290.2475385399683430.123769269984171
160.8716395595046470.2567208809907060.128360440495353
170.8171588755819310.3656822488361380.182841124418069
180.8363833481905640.3272333036188720.163616651809436
190.8724767524956750.2550464950086500.127523247504325
200.8613124758656950.2773750482686100.138687524134305
210.9199597325525260.1600805348949480.0800402674474739
220.9085103192287280.1829793615425430.0914896807712715
230.9649715753119870.07005684937602550.0350284246880127
240.98171621900040.03656756199919910.0182837809995995
250.9729662341214930.05406753175701410.0270337658785071
260.9635855978229030.07282880435419370.0364144021770969
270.955867068528820.088265862942360.04413293147118
280.9407422660209640.1185154679580710.0592577339790355
290.9191939710753650.1616120578492710.0808060289246353
300.8937710317241570.2124579365516860.106228968275843
310.868725914537390.2625481709252210.131274085462610
320.8613933153729320.2772133692541360.138606684627068
330.8330795940738440.3338408118523130.166920405926156
340.8462110978331520.3075778043336970.153788902166848
350.8112878206253660.3774243587492680.188712179374634
360.875941448537430.2481171029251390.124058551462569
370.8435942439492530.3128115121014950.156405756050747
380.8449406540722310.3101186918555390.155059345927769
390.8663303477662810.2673393044674380.133669652233719
400.8446731207886210.3106537584227570.155326879211379
410.8228351011756250.3543297976487500.177164898824375
420.7931731588493490.4136536823013030.206826841150651
430.8545394018944490.2909211962111020.145460598105551
440.8265657015828420.3468685968343160.173434298417158
450.7960417932463570.4079164135072860.203958206753643
460.8193011342377780.3613977315244450.180698865762222
470.7820885221309190.4358229557381630.217911477869082
480.8711004414008480.2577991171983050.128899558599153
490.842277450490850.3154450990183010.157722549509150
500.8571048754606930.2857902490786130.142895124539307
510.8434975968196830.3130048063606330.156502403180317
520.8347578307325260.3304843385349480.165242169267474
530.845564547152530.3088709056949400.154435452847470
540.8215565014190260.3568869971619480.178443498580974
550.8184930128068940.3630139743862130.181506987193106
560.9298149414496450.140370117100710.070185058550355
570.95828579493040.0834284101391990.0417142050695995
580.947056198273650.1058876034527000.0529438017263501
590.9367887139383350.1264225721233290.0632112860616647
600.9219309076359480.1561381847281040.078069092364052
610.9152523016584440.1694953966831120.0847476983415558
620.8971244254851780.2057511490296430.102875574514822
630.8851625363847240.2296749272305510.114837463615276
640.9331523558866630.1336952882266730.0668476441133366
650.9161587328300820.1676825343398370.0838412671699184
660.9226100867791350.1547798264417310.0773899132208654
670.9310373941807220.1379252116385560.068962605819278
680.9152357940942060.1695284118115880.0847642059057941
690.908251922630480.1834961547390420.0917480773695209
700.9026531565187950.1946936869624100.0973468434812049
710.8899981543814070.2200036912371870.110001845618593
720.8770559647546270.2458880704907460.122944035245373
730.8894526890041020.2210946219917950.110547310995898
740.8703512843161330.2592974313677340.129648715683867
750.9253906987739260.1492186024521480.074609301226074
760.9079113865930240.1841772268139520.092088613406976
770.8902346837392220.2195306325215550.109765316260778
780.8907706651480640.2184586697038720.109229334851936
790.8944862704533130.2110274590933750.105513729546687
800.8727920549191250.2544158901617490.127207945080875
810.8469779061485450.3060441877029090.153022093851455
820.8224987411114840.3550025177770320.177501258888516
830.8130625264411530.3738749471176950.186937473558847
840.7814961665401260.4370076669197480.218503833459874
850.7566071614526420.4867856770947160.243392838547358
860.7395850312622440.5208299374755120.260414968737756
870.7101589589828830.5796820820342350.289841041017118
880.6979885639970130.6040228720059730.302011436002987
890.7202187281505620.5595625436988770.279781271849438
900.7688710649109160.4622578701781680.231128935089084
910.7297099103472380.5405801793055240.270290089652762
920.7451877637864660.5096244724270670.254812236213534
930.7074048945367940.5851902109264120.292595105463206
940.6823839385523820.6352321228952350.317616061447618
950.6414162396017280.7171675207965450.358583760398272
960.6428188374763660.7143623250472680.357181162523634
970.723874637713850.5522507245723010.276125362286150
980.8068537738362890.3862924523274230.193146226163711
990.7690569512361360.4618860975277280.230943048763864
1000.7271413854841420.5457172290317160.272858614515858
1010.783208090678660.4335838186426790.216791909321339
1020.744933807134150.5101323857317000.255066192865850
1030.7549706211040380.4900587577919240.245029378895962
1040.792883569754660.4142328604906790.207116430245340
1050.7607518428976270.4784963142047460.239248157102373
1060.7256215318989770.5487569362020450.274378468101023
1070.6778837079757140.6442325840485710.322116292024286
1080.6488656421583950.702268715683210.351134357841605
1090.6126204072141580.7747591855716830.387379592785842
1100.5599738285210810.8800523429578380.440026171478919
1110.6166034793897730.7667930412204540.383396520610227
1120.6437948876664870.7124102246670260.356205112333513
1130.6307872777071960.7384254445856080.369212722292804
1140.6127045382297190.7745909235405620.387295461770281
1150.6283063853979560.7433872292040880.371693614602044
1160.7614406478386670.4771187043226660.238559352161333
1170.753737122324010.492525755351980.24626287767599
1180.8287332061321940.3425335877356120.171266793867806
1190.7892616446509620.4214767106980760.210738355349038
1200.7631853365371620.4736293269256760.236814663462838
1210.7109103528820270.5781792942359460.289089647117973
1220.680310517120880.639378965758240.31968948287912
1230.6449104761461180.7101790477077640.355089523853882
1240.6369214941271290.7261570117457420.363078505872871
1250.5694730874525750.861053825094850.430526912547425
1260.561467312177990.877065375644020.43853268782201
1270.489012225054620.978024450109240.51098777494538
1280.5428833261236640.9142333477526720.457116673876336
1290.5187863195005130.9624273609989730.481213680499487
1300.5955091960145900.8089816079708210.404490803985410
1310.6488630227230510.7022739545538980.351136977276949
1320.6928694865179020.6142610269641960.307130513482098
1330.6156105930019640.7687788139960720.384389406998036
1340.7267548012493190.5464903975013620.273245198750681
1350.7466525780047730.5066948439904540.253347421995227
1360.7870805965280940.4258388069438120.212919403471906
1370.714297559027080.5714048819458380.285702440972919
1380.6223876337673180.7552247324653640.377612366232682
1390.4908313760760630.9816627521521270.509168623923937
1400.4763677001163240.9527354002326480.523632299883676
1410.4714366328862880.9428732657725760.528563367113712


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level10.00763358778625954OK
10% type I error level70.0534351145038168OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292352326767j83gx2o1kg40/10r5571292352438.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292352326767j83gx2o1kg40/10r5571292352438.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292352326767j83gx2o1kg40/12mqv1292352438.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292352326767j83gx2o1kg40/12mqv1292352438.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292352326767j83gx2o1kg40/22mqv1292352438.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292352326767j83gx2o1kg40/22mqv1292352438.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292352326767j83gx2o1kg40/3vvpg1292352438.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292352326767j83gx2o1kg40/3vvpg1292352438.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292352326767j83gx2o1kg40/4vvpg1292352438.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292352326767j83gx2o1kg40/4vvpg1292352438.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292352326767j83gx2o1kg40/5vvpg1292352438.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292352326767j83gx2o1kg40/5vvpg1292352438.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292352326767j83gx2o1kg40/664611292352438.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292352326767j83gx2o1kg40/664611292352438.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292352326767j83gx2o1kg40/7gw6m1292352438.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292352326767j83gx2o1kg40/7gw6m1292352438.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292352326767j83gx2o1kg40/8gw6m1292352438.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292352326767j83gx2o1kg40/8gw6m1292352438.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292352326767j83gx2o1kg40/9gw6m1292352438.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292352326767j83gx2o1kg40/9gw6m1292352438.ps (open in new window)


 
Parameters (Session):
par1 = 2 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 2 ; par2 = Do not include Seasonal 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