Home » date » 2010 » Dec » 11 »

Multiple Regression Anxiety

*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: Sat, 11 Dec 2010 07:26:18 +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/11/t12920522956rqa79m35lnfg76.htm/, Retrieved Sat, 11 Dec 2010 08:24:55 +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/11/t12920522956rqa79m35lnfg76.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 time7 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
Anxiety[t] = + 62.6264784679251 -4.54909193536483Gender[t] -0.361672579691564Mistakes[t] + 0.169699251103092Doubts[t] + 0.788331768369545Expectations[t] -1.10287823451153Critism[t] + 0.108738082842006Pstandards[t] -0.232322040117941Organization[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.549091935364832.197821-2.06980.0402560.020128
Mistakes-0.3616725796915640.241604-1.4970.1365910.068295
Doubts0.1696992511030920.4413710.38450.7011880.350594
Expectations0.7883317683695450.4029881.95620.0523750.026187
Critism-1.102878234511530.505322-2.18250.0306920.015346
Pstandards0.1087380828420060.3098610.35090.7261570.363079
Organization-0.2323220401179410.316958-0.7330.4647660.232383


Multiple Linear Regression - Regression Statistics
Multiple R0.275657312550536
R-squared0.0759869539625838
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.7216584253504-1.72165842535038
34345.8960440590103-2.89604405901032
46049.464588388976610.5354116110234
54950.010837219128-1.010837219128
66250.437070277050911.5629297229491
74558.187779561103-13.1877795611030
85049.00903270542680.990967294573172
97550.133668834181124.8663311658189
108249.350250721729832.6497492782702
116053.61277606917446.38722393082556
125948.319518954956810.6804810450432
132143.7794857184743-22.7794857184743
146254.97985385292397.02014614707609
155453.99316355227250.0068364477275411
164751.6015942880781-4.60159428807814
175949.32220300265259.6777969973475
183749.3353396789259-12.3353396789259
194356.0004969349573-13.0004969349573
204849.5361263025878-1.53612630258779
217949.521697388602129.4783026113979
226250.095233262814411.9047667371856
231648.9833896728386-32.9833896728386
243855.6047487688857-17.6047487688857
255851.7575041980656.24249580193499
266057.73848514306332.26151485693675
276753.371351043697913.6286489563021
285556.6872282018478-1.68722820184783
294746.25740801819730.742591981802723
305953.93795580475575.0620441952443
314949.0478318690631-0.0478318690630564
324754.9883914145986-7.98839141459862
335747.18810542418259.81189457581755
343952.3935722599311-13.3935722599311
354949.3865795702379-0.386579570237895
362648.2422735459511-22.2422735459511
375351.75804435335491.24195564664509
387558.448854342130516.5511456578695
396547.297874725215617.7021252747844
404958.2604872816027-9.26048728160274
414855.1708860474325-7.17088604743247
424549.5338936146892-4.53389361468916
433154.158235329921-23.1582353299210
446154.77167111798346.22832888201661
454954.1361204192779-5.1361204192779
466949.085002488542619.9149975114574
475452.91493259859261.08506740140735
488053.761704552534926.2382954474651
495756.76444522068250.235554779317542
503452.3490862820169-18.3490862820169
516957.142076035721911.8579239642781
524448.7252614958083-4.72526149580833
537052.660750598485317.3392494015147
545155.8650122801255-4.86501228012553
556651.551257005881614.4487429941184
561846.9244344438527-28.9244344438527
577449.739453108464524.2605468915355
585954.69953022794884.30046977205118
594855.9314419418487-7.93144194184867
605549.80456727594545.1954327240546
614450.5696397410586-6.56963974105856
625651.9864795263364.01352047366402
636555.33512806736879.66487193263132
647752.615019016571524.3849809834285
654645.38574364509830.614256354901673
667054.341077968186715.6589220318133
673954.5524444273522-15.5524444273522
685559.3390187494024-4.33901874940245
694453.0384156384161-9.03841563841606
704556.4683324091105-11.4683324091105
714552.8442834771808-7.84428347718081
724958.2605569672453-9.26055696724525
736548.155141899563916.8448581004361
744550.9692730454757-5.9692730454757
757149.315546824775421.6844531752246
764850.9040230802883-2.90402308028826
774146.3865725417958-5.38657254179578
784054.4234088893673-14.4234088893673
796452.999176465186111.0008235348139
805653.67768315734232.32231684265774
815255.1672318876934-3.16723188769338
824147.1669139630747-6.16691396307471
834252.7597642203348-10.7597642203348
845458.1303769171605-4.13037691716053
854047.8255198689898-7.8255198689898
864049.4696513449374-9.46965134493738
875155.4680335780202-4.46803357802024
884855.6558883643725-7.65588836437253
898062.479300142788917.5206998572111
903857.3483504592595-19.3483504592595
915757.0216305591598-0.0216305591597679
922844.8882630066128-16.8882630066128
935153.8701651397952-2.87016513979516
944651.490009762044-5.49000976204398
955853.33394801849284.66605198150715
966750.928778004570716.0712219954293
977248.590667390065123.4093326099349
982648.6181524816782-22.6181524816782
995453.8390817363770.160918263622951
1005353.3967192630048-0.396719263004809
1016446.899587114552317.1004128854477
1024748.5957112245472-1.59571122454718
1034354.7710864290161-11.7710864290161
1046647.429269449162218.5707305508378
1055450.17289908253743.82710091746263
1066256.77388358781575.22611641218431
1075250.89348314445211.10651685554786
1086453.074107079538510.9258929204615
1095549.71864905805385.28135094194622
1105754.95311909940822.04688090059181
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.38931989405-19.3893198940500
1196660.58662011283325.4133798871668
1206554.298205451354410.7017945486456
1214848.4936803092093-0.493680309209307
1224454.7518905242933-10.7518905242933
1236456.79214418336387.2078558166362
1243948.72029818031-9.72029818031
1255053.3495799354858-3.3495799354858
1266651.612218174142614.3877818258574
1274852.0982219457131-4.09822194571311
1287055.447971111754614.5520288882454
1296658.77842563938737.22157436061266
1306149.705696781145211.2943032188548
1313148.732352955723-17.7323529557230
1326154.67603476571226.32396523428777
1335445.06847431812118.93152568187892
1343445.2149963154671-11.2149963154671
1356249.828456610828912.1715433891711
1364753.841147467513-6.84114746751298
1375248.10211385530183.89788614469821
1383759.8945094173258-22.8945094173258
1394646.8097998676881-0.80979986768813
1403853.0809431521072-15.0809431521072
1416351.75750419806511.242495801935
1423454.9949948139028-20.9949948139028
1434647.225674051785-1.22567405178501
1444046.3566514362257-6.3566514362257
1453047.8255198689898-17.8255198689898
1463548.2784881954771-13.2784881954771
1475148.49368030920932.50631969079069
1485655.0899118594180.91008814058204
1496852.945570812043215.0544291879568
1503951.4191899341407-12.4191899341407
1514453.9356715056027-9.93567150560273
1525851.41918993414076.58081006585934


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.9065844855561440.1868310288877130.0934155144438564
120.8330028690910470.3339942618179060.166997130908953
130.9545647853312150.09087042933756940.0454352146687847
140.9205525150931330.1588949698137330.0794474849068667
150.8762307300158280.2475385399683430.123769269984172
160.8716395595046470.2567208809907060.128360440495353
170.8171588755819310.3656822488361380.182841124418069
180.8363833481905640.3272333036188710.163616651809436
190.8724767524956750.2550464950086500.127523247504325
200.8613124758656950.2773750482686100.138687524134305
210.9199597325525250.1600805348949490.0800402674474745
220.9085103192287280.1829793615425430.0914896807712715
230.9649715753119880.0700568493760250.0350284246880125
240.98171621900040.0365675619991990.0182837809995995
250.9729662341214930.05406753175701410.0270337658785071
260.9635855978229030.07282880435419390.0364144021770970
270.955867068528820.08826586294235970.0441329314711799
280.9407422660209650.1185154679580710.0592577339790353
290.9191939710753640.1616120578492720.080806028924636
300.8937710317241570.2124579365516860.106228968275843
310.868725914537390.262548170925220.13127408546261
320.8613933153729310.2772133692541370.138606684627069
330.8330795940738430.3338408118523130.166920405926157
340.8462110978331520.3075778043336950.153788902166848
350.8112878206253660.3774243587492680.188712179374634
360.875941448537430.2481171029251390.124058551462570
370.8435942439492520.3128115121014970.156405756050748
380.844940654072230.3101186918555400.155059345927770
390.8663303477662810.2673393044674380.133669652233719
400.8446731207886210.3106537584227570.155326879211379
410.8228351011756250.3543297976487490.177164898824375
420.7931731588493490.4136536823013020.206826841150651
430.854539401894450.2909211962111010.145460598105551
440.8265657015828410.3468685968343180.173434298417159
450.7960417932463570.4079164135072860.203958206753643
460.8193011342377770.3613977315244450.180698865762223
470.7820885221309190.4358229557381620.217911477869081
480.8711004414008480.2577991171983050.128899558599152
490.842277450490850.3154450990183010.157722549509151
500.8571048754606930.2857902490786150.142895124539307
510.8434975968196830.3130048063606330.156502403180317
520.8347578307325260.3304843385349480.165242169267474
530.845564547152530.308870905694940.15443545284747
540.8215565014190260.3568869971619480.178443498580974
550.8184930128068920.3630139743862170.181506987193108
560.9298149414496450.140370117100710.070185058550355
570.95828579493040.0834284101391990.0417142050695995
580.947056198273650.1058876034526990.0529438017263497
590.9367887139383360.1264225721233270.0632112860616637
600.9219309076359480.1561381847281050.0780690923640524
610.9152523016584450.1694953966831110.0847476983415555
620.8971244254851780.2057511490296440.102875574514822
630.8851625363847250.2296749272305490.114837463615275
640.9331523558866640.1336952882266730.0668476441133364
650.9161587328300820.1676825343398360.0838412671699182
660.9226100867791350.1547798264417310.0773899132208655
670.9310373941807220.1379252116385560.0689626058192779
680.9152357940942060.1695284118115890.0847642059057944
690.908251922630480.1834961547390420.0917480773695208
700.9026531565187950.1946936869624090.0973468434812045
710.8899981543814070.2200036912371860.110001845618593
720.8770559647546270.2458880704907460.122944035245373
730.8894526890041030.2210946219917950.110547310995897
740.8703512843161330.2592974313677340.129648715683867
750.9253906987739260.1492186024521490.0746093012260743
760.9079113865930250.1841772268139500.0920886134069748
770.8902346837392230.2195306325215530.109765316260777
780.8907706651480640.2184586697038710.109229334851936
790.8944862704533120.2110274590933760.105513729546688
800.8727920549191250.254415890161750.127207945080875
810.8469779061485450.3060441877029100.153022093851455
820.8224987411114840.3550025177770320.177501258888516
830.8130625264411530.3738749471176930.186937473558847
840.7814961665401280.4370076669197440.218503833459872
850.7566071614526440.4867856770947120.243392838547356
860.7395850312622440.5208299374755130.260414968737756
870.7101589589828820.5796820820342350.289841041017118
880.6979885639970120.6040228720059760.302011436002988
890.7202187281505620.5595625436988750.279781271849438
900.7688710649109160.4622578701781680.231128935089084
910.7297099103472380.5405801793055230.270290089652762
920.7451877637864660.5096244724270670.254812236213534
930.7074048945367930.5851902109264150.292595105463207
940.6823839385523820.6352321228952350.317616061447618
950.6414162396017270.7171675207965460.358583760398273
960.6428188374763640.7143623250472710.357181162523636
970.723874637713850.55225072457230.27612536228615
980.8068537738362880.3862924523274230.193146226163712
990.7690569512361360.4618860975277280.230943048763864
1000.7271413854841420.5457172290317160.272858614515858
1010.783208090678660.433583818642680.21679190932134
1020.744933807134150.5101323857317010.255066192865850
1030.7549706211040380.4900587577919230.245029378895962
1040.792883569754660.4142328604906790.207116430245339
1050.7607518428976260.4784963142047470.239248157102374
1060.7256215318989790.5487569362020430.274378468101021
1070.6778837079757150.644232584048570.322116292024285
1080.6488656421583950.702268715683210.351134357841605
1090.6126204072141580.7747591855716830.387379592785842
1100.5599738285210830.8800523429578350.440026171478917
1110.6166034793897740.7667930412204520.383396520610226
1120.6437948876664860.7124102246670280.356205112333514
1130.6307872777071960.7384254445856090.369212722292804
1140.6127045382297180.7745909235405630.387295461770282
1150.6283063853979570.7433872292040860.371693614602043
1160.7614406478386660.4771187043226670.238559352161334
1170.753737122324010.4925257553519790.246262877675989
1180.8287332061321940.3425335877356120.171266793867806
1190.7892616446509610.4214767106980770.210738355349038
1200.7631853365371620.4736293269256760.236814663462838
1210.7109103528820270.5781792942359460.289089647117973
1220.680310517120880.6393789657582410.319689482879121
1230.6449104761461180.7101790477077630.355089523853882
1240.6369214941271290.7261570117457420.363078505872871
1250.5694730874525740.8610538250948520.430526912547426
1260.561467312177990.8770653756440190.438532687822010
1270.489012225054620.978024450109240.51098777494538
1280.5428833261236650.914233347752670.457116673876335
1290.5187863195005140.9624273609989710.481213680499486
1300.5955091960145910.8089816079708190.404490803985409
1310.6488630227230520.7022739545538970.351136977276948
1320.6928694865179010.6142610269641990.307130513482099
1330.6156105930019640.7687788139960730.384389406998036
1340.726754801249320.5464903975013610.273245198750680
1350.7466525780047720.5066948439904550.253347421995228
1360.7870805965280950.4258388069438110.212919403471905
1370.714297559027080.5714048819458390.285702440972920
1380.6223876337673180.7552247324653640.377612366232682
1390.4908313760760630.9816627521521260.509168623923937
1400.4763677001163230.9527354002326460.523632299883677
1410.4714366328862890.9428732657725770.528563367113711


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/11/t12920522956rqa79m35lnfg76/10hmtw1292052367.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t12920522956rqa79m35lnfg76/10hmtw1292052367.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t12920522956rqa79m35lnfg76/1itt71292052366.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t12920522956rqa79m35lnfg76/1itt71292052366.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t12920522956rqa79m35lnfg76/2t2as1292052366.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t12920522956rqa79m35lnfg76/2t2as1292052366.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t12920522956rqa79m35lnfg76/3t2as1292052366.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t12920522956rqa79m35lnfg76/3t2as1292052366.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t12920522956rqa79m35lnfg76/4t2as1292052366.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t12920522956rqa79m35lnfg76/4t2as1292052366.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t12920522956rqa79m35lnfg76/53t9d1292052366.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t12920522956rqa79m35lnfg76/53t9d1292052366.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t12920522956rqa79m35lnfg76/63t9d1292052366.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t12920522956rqa79m35lnfg76/63t9d1292052366.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t12920522956rqa79m35lnfg76/7wkqg1292052366.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t12920522956rqa79m35lnfg76/7wkqg1292052366.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t12920522956rqa79m35lnfg76/8wkqg1292052366.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t12920522956rqa79m35lnfg76/8wkqg1292052366.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t12920522956rqa79m35lnfg76/9hmtw1292052367.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t12920522956rqa79m35lnfg76/9hmtw1292052367.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