Home » date » 2010 » Nov » 29 »

workshop 8 - 2

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Mon, 29 Nov 2010 18:18:02 +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/29/t1291054628hprbl164yg5n6pb.htm/, Retrieved Mon, 29 Nov 2010 19:17:18 +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/29/t1291054628hprbl164yg5n6pb.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 «
24 14 11 12 24 26 25 11 7 8 25 23 17 6 17 8 30 25 18 12 10 8 19 23 18 8 12 9 22 19 16 10 12 7 22 29 20 10 11 4 25 25 16 11 11 11 23 21 18 16 12 7 17 22 17 11 13 7 21 25 23 13 14 12 19 24 30 12 16 10 19 18 23 8 11 10 15 22 18 12 10 8 16 15 15 11 11 8 23 22 12 4 15 4 27 28 21 9 9 9 22 20 15 8 11 8 14 12 20 8 17 7 22 24 31 14 17 11 23 20 27 15 11 9 23 21 34 16 18 11 21 20 21 9 14 13 19 21 31 14 10 8 18 23 19 11 11 8 20 28 16 8 15 9 23 24 20 9 15 6 25 24 21 9 13 9 19 24 22 9 16 9 24 23 17 9 13 6 22 23 24 10 9 6 25 29 25 16 18 16 26 24 26 11 18 5 29 18 25 8 12 7 32 25 17 9 17 9 25 21 32 16 9 6 29 26 33 11 9 6 28 22 13 16 12 5 17 22 32 12 18 12 28 22 25 12 12 7 29 23 29 14 18 10 26 30 22 9 14 9 25 23 18 10 15 8 14 17 17 9 16 5 25 23 20 10 10 8 26 23 15 12 11 8 20 25 20 14 14 10 18 24 33 14 9 6 32 24 29 10 12 8 25 23 23 14 17 7 25 21 26 16 5 4 23 24 18 9 12 8 21 24 20 10 12 8 20 28 11 6 6 4 15 16 28 8 24 20 30 20 26 13 12 8 24 29 22 10 12 8 26 27 17 8 14 6 24 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
Personal-Standards[t] = + 7.35806857088718 + 0.335229845129777`Concern(Mistakes)`[t] -0.366768472039511`Doubts(actions)`[t] + 0.161870869815985`Parental-Expectations`[t] + 0.0620916339294919`Parental-Criticism`[t] + 0.391606185783133Organization[t] -0.0947915214066301M1[t] + 0.289928443126254M2[t] + 0.669863771372266M3[t] + 0.159286592158596M4[t] + 0.365862044388642M5[t] + 1.01199387597801M6[t] + 0.433806865976564M7[t] + 1.67117605285828M8[t] + 1.41863032292718M9[t] + 0.923487622100795M10[t] -0.528232240887845M11[t] -0.00392377145820462t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)7.358068570887182.6107362.81840.0055210.00276
`Concern(Mistakes)`0.3352298451297770.0598445.601800
`Doubts(actions)`-0.3667684720395110.116654-3.14410.0020320.001016
`Parental-Expectations`0.1618708698159850.1069321.51380.1323230.066161
`Parental-Criticism`0.06209163392949190.1398060.44410.6576310.328815
Organization0.3916061857831330.078574.98422e-061e-06
M1-0.09479152140663011.371116-0.06910.944980.47249
M20.2899284431262541.3729270.21120.8330550.416528
M30.6698637713722661.3653340.49060.6244560.312228
M40.1592865921585961.4076080.11320.9100640.455032
M50.3658620443886421.4025910.26080.7945910.397295
M61.011993875978011.4050640.72020.4725650.236282
M70.4338068659765641.4267620.3040.7615380.380769
M81.671176052858281.4004831.19330.2347620.117381
M91.418630322927181.3851531.02420.3075090.153755
M100.9234876221007951.3746660.67180.5028160.251408
M11-0.5282322408878451.425316-0.37060.7114860.355743
t-0.003923771458204620.006235-0.62930.5301530.265076


Multiple Linear Regression - Regression Statistics
Multiple R0.624037149557158
R-squared0.389422364027423
Adjusted R-squared0.315806620683212
F-TEST (value)5.2899331900592
F-TEST (DF numerator)17
F-TEST (DF denominator)141
p-value6.3415130924227e-09
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.48809878442326
Sum Squared Residuals1715.5234713152


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12422.87755095807491.12244904192510
22522.62321384006672.37678615993331
33024.55315006574005.44684993426003
41920.2569596676826-1.25695966768263
52220.74609386704151.25390613295854
62223.7761838828064-1.7761838828064
72522.62042196712882.37957803287115
82321.01439622436771.98560377563234
91719.8996545729215-2.89965457292149
102122.2358900428701-1.23589004287007
111922.1388113888032-3.13881138880317
121923.2264186032549-4.22641860325494
131523.0052386766923-8.00523867669233
141617.2155143178032-1.21551431780318
152319.85571898153913.14428101846091
162723.65166185799923.34833814200076
172221.2439232492280.756076750772009
181417.3703213300574-3.37032133005742
192224.0727675886107-2.07276758861067
202325.4750722608101-2.47507226081009
212322.80711260589040.192887394109601
222125.1535597482625-4.15355974826248
231921.7756134057833-2.7756134057833
241823.643648688968-5.64364868896801
252022.7423824693960-2.74238246939605
262322.36094491326080.639055086739163
272523.52483247673981.47516752326024
281923.2080945333542-4.20809453335417
292423.83998248292060.160017517079393
302222.1341538061665-0.134153806166453
312525.2340371040106-0.234037104010590
322624.72182477104991.27817522895007
332923.60178238706475.39821761293526
343225.76199283521396.23800716478608
352520.62485484149574.37514515850427
362924.08702075219474.91297924780526
372824.59095292152473.40904707847529
381716.85683082732480.143169172675234
392826.47514998613871.52485001386127
402922.72396291679826.27603708320182
412627.4327404551764-1.43274045517642
422524.11136354592130.888636454078658
431419.5717070330908-5.57170703309077
442523.16192415815031.83807584184967
452622.75942540300343.2405745969966
462020.7957560023732-0.795756002373161
471820.50091434102-2.50091434101998
483224.32548991233887.67451008766118
492524.57111881863670.428881181363266
502521.43751239635893.56248760364113
512321.13176976222611.86823023777391
522121.8842719792225-0.88427197922245
532023.9570396213469-3.95703962134687
541517.1303869794566-2.13038697945661
553026.98721316381633.01278683618373
562426.5532621558852-2.55326215588515
572625.2729663185290.727033681470997
582422.07281510753191.92718489246812
592220.40014847760361.59985152239642
601415.1810863861930-1.18108638619296
612421.71334789711622.28665210288377
622422.65228478091491.34771521908512
632423.41468695024210.585313049757879
642419.78472098823154.2152790117685
651918.25147921203050.748520787969483
663127.31378741843793.68621258156212
672226.6628212700780-4.66282127007797
682722.65566325418724.34433674581277
691918.53645027916770.463549720832304
702522.74450318506462.25549681493536
712023.9959644063116-3.99596440631164
722121.0424293738690-0.042429373868957
732726.90146942153600.0985305784640425
742324.1814022572013-1.18140225720133
752525.7394767033077-0.739476703307729
762021.9246636604855-1.92466366048551
772118.91205534689112.08794465310893
782222.9261786979608-0.926178697960797
792322.92206404196380.0779359580361682
802525.1595325767019-0.159532576701885
812524.33300589817880.66699410182121
821724.2524067832873-7.25240678328733
831920.3591588484922-1.35915884849218
842523.40831960982331.59168039017671
851921.6840764492848-2.68407644928478
862022.7390500372559-2.73905003725591
872622.54829244914433.45170755085569
882320.37590263060792.62409736939209
892724.43448183395282.56551816604722
901721.3194271294415-4.31942712944146
911723.1775033066431-6.17750330664306
921921.2527789615909-2.25277896159087
931720.5152507488465-3.5152507488465
942222.2528301148561-0.252830114856086
952122.5003917739954-1.50039177399538
963228.03197569317853.96802430682147
972124.0216723917931-3.02167239179312
982124.0996479486467-3.09964794864667
991821.3087515537514-3.30875155375139
1001820.8739217986085-2.87392179860854
1012322.64294070356740.357059296432621
1021920.9696362736129-1.96963627361294
1032020.7535694692373-0.75356946923735
1042123.3854773018757-2.38547730187568
1052024.6983060151162-4.69830601511618
1061719.0767544624798-2.07675446247982
1071819.2263270493602-1.22632704936020
1081920.2782317218098-1.27823172180982
1092221.41637440213750.583625597862532
1101518.3192610550785-3.31926105507852
1111418.8338433259475-4.83384332594752
1121826.2637626300494-8.26376263004936
1132421.35819292913882.64180707086116
1143523.990108112823111.0098918871769
1152919.14201669786559.85798330213452
1162122.8169448164045-1.81694481640451
1172521.21739831770463.78260168229537
1182018.75291049749171.24708950250826
1192221.99433125756460.00566874243537843
1201316.1915736154901-3.19157361549010
1212622.47251173102553.52748826897454
1221716.47085238332310.529147616676901
1232520.17532411772994.82467588227008
1242020.2590370699101-0.259037069910140
1251917.78721984028841.21278015971159
1262122.8012910846120-1.80129108461204
1272220.65348005497531.34651994502468
1282423.65621905702940.343780942970601
1292123.6437625807975-2.64376258079749
1302625.76675946814090.233240531859075
1312419.49266629432364.50733370567641
1321619.5658054227985-3.56580542279853
1332321.41220513237471.58779486762532
1341820.2638880214482-2.26388802144823
1351622.3164910049718-6.31649100497182
1362623.40537790443402.59462209556598
1371918.59964495835550.400355041644462
1382117.21552396164873.78447603835126
1392121.9110543970158-0.911054397015845
1402219.71071754156052.28928245843955
1412320.64373299822082.35626700177922
1422925.04436980910573.95563019089431
1432118.22229009804232.77770990195765
1442119.17344786519291.82655213480712
1452321.01631564657761.98368435342239
1462722.48017416759494.51982583240513
1472525.2934939106875-0.293493910687525
1482120.38766236261640.612337637383651
1491016.7942055000621-6.79420550006212
1502022.9416377770548-2.94163777705485
1512622.2913439055643.70865609443602
1522424.4361869203868-0.436186920386799
1532932.0711518745589-3.07115187455891
1541919.0894519433223-0.08945194332227
1552420.76852781720433.23147218279573
1561919.8445523548884-0.844552354888397
1572422.57478308383001.42521691617004
1582221.29942305372220.700576946277849
1591723.8290187118340-6.82901871183404


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
210.794858074182490.410283851635020.20514192581751
220.6790191086969120.6419617826061760.320980891303088
230.5540982593479530.8918034813040940.445901740652047
240.4565187827483680.9130375654967370.543481217251632
250.3710548760121690.7421097520243380.628945123987831
260.2678750811298910.5357501622597830.732124918870109
270.1882079251919810.3764158503839620.811792074808019
280.1710847831518000.3421695663035990.8289152168482
290.1166580493083680.2333160986167370.883341950691632
300.1147456002329550.229491200465910.885254399767045
310.07548555302067530.1509711060413510.924514446979325
320.0568678185187680.1137356370375360.943132181481232
330.1872345298757250.3744690597514510.812765470124275
340.319743628832250.63948725766450.68025637116775
350.4032385557273620.8064771114547240.596761444272638
360.5251442499172830.9497115001654340.474855750082717
370.4917707023664900.9835414047329790.508229297633510
380.4401375172165260.8802750344330520.559862482783474
390.3779306578979960.7558613157959920.622069342102004
400.4834040587904780.9668081175809570.516595941209522
410.4492798264143090.8985596528286180.550720173585691
420.3999958851906720.7999917703813440.600004114809328
430.3951303028915570.7902606057831150.604869697108443
440.4089417944546620.8178835889093240.591058205545338
450.3595062955676790.7190125911353590.640493704432321
460.3095752416434810.6191504832869610.690424758356519
470.290151500938850.58030300187770.70984849906115
480.4054758437747960.8109516875495920.594524156225204
490.3485481234663190.6970962469326390.651451876533681
500.3367096610080170.6734193220160350.663290338991983
510.3748020660568170.7496041321136330.625197933943183
520.3340350458961820.6680700917923650.665964954103818
530.3977050359576630.7954100719153260.602294964042337
540.3681722047056120.7363444094112240.631827795294388
550.476647609014740.953295218029480.52335239098526
560.52500191413730.94999617172540.4749980858627
570.4938816414226530.9877632828453060.506118358577347
580.4484634700517610.8969269401035220.551536529948239
590.4012764242249260.8025528484498520.598723575775074
600.3579818322088010.7159636644176020.642018167791199
610.3334965306474620.6669930612949250.666503469352538
620.3075711562526910.6151423125053820.69242884374731
630.2855385651867490.5710771303734980.714461434813251
640.3095446922436200.6190893844872410.69045530775638
650.2696785662831260.5393571325662510.730321433716874
660.2653986787700290.5307973575400570.734601321229971
670.3321162202472550.664232440494510.667883779752745
680.3404933111946920.6809866223893840.659506688805308
690.3005355889859910.6010711779719810.69946441101401
700.2743629150291950.5487258300583890.725637084970805
710.3090528863304560.6181057726609120.690947113669544
720.2718506654013510.5437013308027020.728149334598649
730.2326598070201760.4653196140403520.767340192979824
740.2051187535493640.4102375070987270.794881246450636
750.2104995243367180.4209990486734350.789500475663282
760.1895391246072520.3790782492145050.810460875392748
770.1827814670490270.3655629340980540.817218532950973
780.1509984958662490.3019969917324980.849001504133751
790.1234732022252980.2469464044505970.876526797774702
800.1050352799540740.2100705599081470.894964720045926
810.08860353159689840.1772070631937970.911396468403102
820.18551062218060.37102124436120.8144893778194
830.1539351850672220.3078703701344450.846064814932778
840.1336877372254020.2673754744508040.866312262774598
850.1190255991808530.2380511983617050.880974400819147
860.1099530734110560.2199061468221110.890046926588944
870.1499151984165280.2998303968330560.850084801583472
880.1608152040967920.3216304081935850.839184795903208
890.1565827345072910.3131654690145820.843417265492709
900.1602069074435640.3204138148871290.839793092556436
910.2225021053918990.4450042107837970.777497894608101
920.1985221588907170.3970443177814330.801477841109284
930.1874227480915650.3748454961831290.812577251908435
940.1556082685484720.3112165370969430.844391731451528
950.1313789619746250.262757923949250.868621038025375
960.1776206038280380.3552412076560770.822379396171962
970.1674065838209280.3348131676418560.832593416179072
980.1519295144687090.3038590289374180.848070485531291
990.1383610816966340.2767221633932680.861638918303366
1000.1173742959131930.2347485918263860.882625704086807
1010.09953958407241730.1990791681448350.900460415927583
1020.08641270538411760.1728254107682350.913587294615882
1030.08283893062308480.1656778612461700.917161069376915
1040.06792131329496030.1358426265899210.93207868670504
1050.08203834092068790.1640766818413760.917961659079312
1060.07842285629242960.1568457125848590.92157714370757
1070.0747880545629210.1495761091258420.925211945437079
1080.05833687289785550.1166737457957110.941663127102145
1090.05517557745233470.1103511549046690.944824422547665
1100.06575833463747080.1315166692749420.93424166536253
1110.06417703724606620.1283540744921320.935822962753934
1120.3159032389311300.6318064778622610.68409676106887
1130.2910678702393670.5821357404787340.708932129760633
1140.6953091468777930.6093817062444140.304690853122207
1150.9038176118620670.1923647762758650.0961823881379325
1160.8759917005756820.2480165988486360.124008299424318
1170.9100799763454760.1798400473090480.0899200236545238
1180.8827844336556230.2344311326887540.117215566344377
1190.904802403813640.1903951923727210.0951975961863604
1200.9372603762116330.1254792475767330.0627396237883666
1210.9221078705792050.155784258841590.077892129420795
1220.9046507156641490.1906985686717030.0953492843358513
1230.9669436525150630.0661126949698730.0330563474849365
1240.949625863767380.1007482724652410.0503741362326204
1250.929254328787970.1414913424240610.0707456712120305
1260.9075619627374540.1848760745250920.0924380372625458
1270.8855476112346310.2289047775307380.114452388765369
1280.843240457422420.313519085155160.15675954257758
1290.816560579658590.3668788406828210.183439420341410
1300.8051379213459370.3897241573081260.194862078654063
1310.7567058004652420.4865883990695160.243294199534758
1320.7299653953326640.5400692093346720.270034604667336
1330.6385644268538210.7228711462923590.361435573146179
1340.6497418493426050.700516301314790.350258150657395
1350.7379475682646060.5241048634707880.262052431735394
1360.6260367297529650.747926540494070.373963270247035
1370.5953945699748600.8092108600502810.404605430025141
1380.692544113023190.6149117739536190.307455886976809


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level00OK
10% type I error level10.00847457627118644OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291054628hprbl164yg5n6pb/1018ax1291054671.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291054628hprbl164yg5n6pb/1018ax1291054671.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/29/t1291054628hprbl164yg5n6pb/1c7cm1291054671.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291054628hprbl164yg5n6pb/1c7cm1291054671.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/29/t1291054628hprbl164yg5n6pb/25zup1291054671.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291054628hprbl164yg5n6pb/25zup1291054671.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/29/t1291054628hprbl164yg5n6pb/35zup1291054671.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291054628hprbl164yg5n6pb/35zup1291054671.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/29/t1291054628hprbl164yg5n6pb/45zup1291054671.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291054628hprbl164yg5n6pb/45zup1291054671.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/29/t1291054628hprbl164yg5n6pb/55zup1291054671.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291054628hprbl164yg5n6pb/55zup1291054671.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/29/t1291054628hprbl164yg5n6pb/6y8ts1291054671.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291054628hprbl164yg5n6pb/6y8ts1291054671.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/29/t1291054628hprbl164yg5n6pb/7qzsc1291054671.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291054628hprbl164yg5n6pb/7qzsc1291054671.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/29/t1291054628hprbl164yg5n6pb/8qzsc1291054671.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291054628hprbl164yg5n6pb/8qzsc1291054671.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/29/t1291054628hprbl164yg5n6pb/9qzsc1291054671.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291054628hprbl164yg5n6pb/9qzsc1291054671.ps (open in new window)


 
Parameters (Session):
par1 = 5 ; par2 = Include Monthly Dummies ; par3 = Linear Trend ;
 
Parameters (R input):
par1 = 5 ; par2 = Include Monthly Dummies ; par3 = 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