Home » date » 2010 » Nov » 22 »

Workshop7, Mini-tutorial, 1

*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, 22 Nov 2010 22:25: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/Nov/22/t1290464628rpt66829n3i8cbw.htm/, Retrieved Mon, 22 Nov 2010 23:23:48 +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/22/t1290464628rpt66829n3i8cbw.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 «
12 12 11 24 11 8 7 25 14 8 17 17 12 8 10 18 21 9 12 18 12 7 12 16 22 4 11 20 11 11 11 16 10 7 12 18 13 7 13 17 10 12 14 23 8 10 16 30 15 10 11 23 14 8 10 18 10 8 11 15 14 4 15 12 14 9 9 21 11 8 11 15 10 7 17 20 13 11 17 31 7 9 11 27 14 11 18 34 12 13 14 21 14 8 10 31 11 8 11 19 9 9 15 16 11 6 15 20 15 9 13 21 14 9 16 22 13 6 13 17 9 6 9 24 15 16 18 25 10 5 18 26 11 7 12 25 13 9 17 17 8 6 9 32 20 6 9 33 12 5 12 13 10 12 18 32 10 7 12 25 9 10 18 29 14 9 14 22 8 8 15 18 14 5 16 17 11 8 10 20 13 8 11 15 9 10 14 20 11 6 9 33 15 8 12 29 11 7 17 23 10 4 5 26 14 8 12 18 18 8 12 20 14 4 6 11 11 20 24 28 12 8 12 26 13 8 12 22 9 6 14 17 10 4 7 12 15 8 13 14 20 9 12 17 12 6 13 21 12 7 14 19 14 9 8 18 13 5 11 10 11 5 9 29 17 8 11 31 12 8 13 19 13 6 10 9 14 8 11 20 13 7 12 28 15 7 9 19 13 9 15 30 10 11 18 29 11 6 15 26 19 8 12 23 13 6 13 13 17 9 14 21 13 8 10 19 9 6 13 28 11 10 13 23 10 8 11 18 9 8 13 21 12 10 16 20 12 5 8 23 13 7 16 21 1 etc...
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
Depression[t] = + 14.1672885277797 -0.0177914965161202ParentalCriticism[t] -0.00187772044554277ParentalExpectations[t] -0.0511333152340301ConcernOverMistakes[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)14.16728852777971.194111.864400
ParentalCriticism-0.01779149651612020.116713-0.15240.879040.43952
ParentalExpectations-0.001877720445542770.092288-0.02030.9837930.491897
ConcernOverMistakes-0.05113331523403010.047063-1.08650.2789490.139474


Multiple Linear Regression - Regression Statistics
Multiple R0.099713460840092
R-squared0.00994277427270855
Adjusted R-squared-0.00921962364459383
F-TEST (value)0.51886900144845
F-TEST (DF numerator)3
F-TEST (DF denominator)155
p-value0.669905215274848
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.15986935243082
Sum Squared Residuals1547.64002028689


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11212.7059360790685-0.705936079068524
21112.7334796316811-1.73347963168115
31413.12376894909800.87623105090204
41213.0857796769827-1.08577967698273
52113.06423273957557.93576726042448
61213.2020823630758-1.20208236307582
72213.05280131213368.9471986878664
81113.1327940974569-2.13279409745689
91013.0998157326078-3.09981573260776
101313.1490713273963-0.149071327396251
111012.7514362329659-2.75143623296593
12812.4253305784689-4.42533057846887
131512.79265238733482.20734761266520
141413.08577967698270.914220323017271
151013.2373019022393-3.23730190223928
161413.45435695222370.545643047776324
171412.91646595521011.08353404478994
181113.2373019022393-2.23730190223928
191012.988160499912-2.98816049991199
201312.35452804627320.645471953726822
21712.6059106229148-5.6059106229148
221412.19925038012551.80074961987446
231212.8359113669179-0.835911366917866
241412.42104657894031.57895342105966
251113.0327686413032-2.03276864130316
26913.1608662087070-4.16086620870696
271113.0097074373192-2.00970743731920
281512.90895507342792.09104492657211
291412.85218859685721.14781140314277
301313.1668628239124-0.166862823912371
31912.8164404990563-3.81644049905633
321512.57049273465122.42950726534879
331012.7150658810945-2.71506588109451
341112.7418825259696-1.74188252596955
351313.1059774525818-0.105977452581839
36812.4073739771841-4.40737397718409
372012.35624066195017.64375933804994
381213.3910653018102-1.39106530181015
391012.2837255140775-2.28372551407748
401012.7418825259696-2.74188252596955
41912.4727084528118-3.47270845281182
421412.85594403774831.14405596225168
43813.0763910747550-5.07639107475501
441413.17902115909190.820978840908137
451112.9835130465147-1.98351304651467
461313.2373019022393-0.237301902239276
47912.9404191717003-3.94041917170026
481112.3562406619501-1.35624066195006
491512.51955776851732.48044223148269
501112.8347605542099-1.8347605542099
511012.7572677434027-2.75726774340268
521413.08202423609160.917975763908357
531812.97975760562365.02024239437642
541413.52238975146760.477610248532409
551112.3346604802114-1.33466048021139
561212.6729577142194-0.672957714219403
571312.87749097515550.122509024844477
58913.1649851034668-4.16498510346683
591013.4693787157880-3.46937871578802
601513.28467977658221.71532022341778
612013.11536605480966.88463394519045
621212.9623295629763-0.96232956297625
631213.0449269764826-1.04492697648265
641413.07174362135770.928256378642306
651313.5463429679578-0.546342967957787
661112.5785654194023-1.5785654194023
671712.41916885849484.58083114150520
681213.0290132004121-1.02901320041207
691313.5815625071212-0.58156250712124
701412.98163532606911.01836467393087
711312.58848258026750.411517419732537
721513.05431557871041.94568442128964
731312.44499979543050.555000204569466
741012.4549169562957-2.45491695629570
751112.7029075459150-1.70290754591501
761912.82635765992156.17364234007851
771313.3713960848485-0.371396084848491
781712.90707735298234.09292264701765
791313.0346463617487-0.0346463617486987
80912.6043963563380-3.60439635633804
811112.7888969464437-1.78889694644371
821013.0839019565372-3.08390195653719
83912.926746569944-3.92674656994401
841212.9366637308092-0.936663730809171
851212.8872430312520-0.887243031252025
861312.93890490512350.0610950948764978
871312.98387650038350.0161234996165435
881213.2410573431304-1.24105734313036
891512.45643122287242.54356877712755
902213.04868241737378.95131758262627
911312.66920227332830.330797726671683
921513.53418463277831.46581536722170
931313.2432985174447-0.243298517444692
941512.90744080685112.09255919314886
951012.9971856482709-2.99718564827092
961112.3292256679749-1.32922566797489
971612.39574420064203.60425579935795
981112.4371254597796-1.43712545977957
991113.0486824173737-2.04868241737373
1001012.8756132547100-2.87561325470998
1011012.7851415055526-2.78514150555262
1021613.27100717482602.72899282517403
1031212.9310305694725-0.931030569472543
1041113.0408080817228-2.04080808172277
1051612.79265238733483.20734761266520
1061912.77934323944736.22065676055266
1071112.9501712277968-1.95017122779676
1081612.73776363120973.26223636879032
1091512.66508337856842.33491662143156
1102413.168740544357910.8312594556421
1111413.35548230877790.644517691222086
1121512.49201421590472.50798578409531
1131112.8808829621778-1.88088296217782
1141512.65945021723182.34054978276818
1151213.4963604654317-1.49636046543172
1161013.2357876356625-3.23578763566252
1171413.02150231862990.9784976813701
1181313.1743737056945-0.174373705694542
119912.7006663716007-3.70066637160068
1201513.05843447347021.94156552652976
1211512.60011235680952.39988764319049
1221413.30434899354390.695651006456116
1231112.8203610447161-1.82036104471608
124813.2822734974992-5.28227349749923
1251113.0561932991559-2.05619329915590
1261112.9703690033959-1.97036900339587
127813.3103456087493-5.3103456087493
1281012.9816353260691-2.98163532606913
1291113.0604772986844-2.06047729868444
1301312.31690222802670.683097771973265
1311112.8222387651616-1.82223876516162
1322013.18429086655976.8157091334403
1331013.1884097613196-3.18840976131958
1341513.26109001396081.73890998603919
1351212.9286242903896-0.928624290389553
1361412.62235295762281.37764704237718
1372313.11760722912399.88239277087612
1381413.06235501913000.93764498087002
1391613.11536605480962.88463394519045
1401112.7885334925749-1.78853349257492
1411212.4562661181038-0.456266118103791
1421012.4272082989144-2.42720829891441
1431412.53919374114751.46080625885249
1441212.9913873821656-0.991387382165628
1451212.8658611986135-0.865861198613479
1461112.5570184819951-1.55701848199510
1471212.3901110393054-0.390111039305418
1481312.99942682258520.00057317741475386
1491113.1664993700436-2.16649937004358
1501912.83815254123226.1618474587678
1511212.963843829553-0.963843829553006
1521712.56318020196924.43681979803083
153912.0602499439173-3.06024994391728
1541212.9093185272967-0.909318527296678
1551912.87577835947866.12422164052136
1561813.16686282391244.83313717608763
1571512.57256880419692.42743119580311
1581412.83627482078671.16372517921335
1591112.2618151228015-1.26181512280149


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
70.9790797939724740.0418404120550520.020920206027526
80.9549296608970360.09014067820592770.0450703391029639
90.972507902335460.0549841953290820.027492097664541
100.9556058344094790.08878833118104230.0443941655905212
110.934182469734330.1316350605313410.0658175302656706
120.931922624844730.136154750310540.06807737515527
130.9246203739528650.1507592520942710.0753796260471354
140.8875531795985430.2248936408029130.112446820401457
150.9008401838960080.1983196322079840.0991598161039921
160.873587738777130.2528245224457410.126412261222870
170.8299210114723960.3401579770552080.170078988527604
180.8037325641118930.3925348717762140.196267435888107
190.783708851659980.4325822966800390.216291148340019
200.7547940742549410.4904118514901170.245205925745058
210.8462878510822580.3074242978354830.153712148917742
220.838372071676330.3232558566473390.161627928323669
230.8022705351523860.3954589296952290.197729464847614
240.7563348431388850.487330313722230.243665156861115
250.721822570302520.5563548593949610.278177429697481
260.7216366933711440.5567266132577110.278363306628856
270.6945003467135880.6109993065728240.305499653286412
280.674751223442890.6504975531142210.325248776557111
290.63418247001630.73163505996740.3658175299837
300.5758272271101970.8483455457796070.424172772889803
310.6287598546424920.7424802907150170.371240145357508
320.6401756987088580.7196486025822840.359824301291142
330.6222366012883080.7555267974233840.377763398711692
340.5764842080728090.8470315838543820.423515791927191
350.5198237343494050.960352531301190.480176265650595
360.5351877378172660.9296245243654690.464812262182734
370.7894362841168340.4211274317663320.210563715883166
380.7522439317670.4955121364660010.247756068233000
390.7249609539604480.5500780920791040.275039046039552
400.7077777801713980.5844444396572030.292222219828602
410.7008396631112830.5983206737774340.299160336888717
420.6650747378302980.6698505243394040.334925262169702
430.7123417749604610.5753164500790780.287658225039539
440.6760398754512440.6479202490975130.323960124548756
450.642675969990560.714648060018880.35732403000944
460.5942967602065860.8114064795868290.405703239793414
470.6028536835838930.7942926328322150.397146316416107
480.5621875626752060.8756248746495890.437812437324794
490.5489186253918130.9021627492163740.451081374608187
500.5099683985565340.9800632028869320.490031601443466
510.4992305665734590.9984611331469180.500769433426541
520.4591564811255820.9183129622511650.540843518874418
530.5494345953503380.9011308092993240.450565404649662
540.501729577390160.996540845219680.49827042260984
550.4593015944379840.9186031888759690.540698405562016
560.412556120347540.825112240695080.58744387965246
570.366991312581750.73398262516350.63300868741825
580.3908100842733740.7816201685467490.609189915726626
590.3949281035774490.7898562071548980.605071896422551
600.3702893592102430.7405787184204870.629710640789757
610.5583037428573910.8833925142852180.441696257142609
620.5148324199877530.9703351600244940.485167580012247
630.4721826375694480.9443652751388970.527817362430552
640.4294117416035450.8588234832070890.570588258396455
650.3855941323795950.771188264759190.614405867620405
660.3500395449415860.7000790898831720.649960455058414
670.4068068703144810.8136137406289620.593193129685519
680.3664353382511570.7328706765023130.633564661748843
690.3258036231041290.6516072462082580.674196376895871
700.2898561924866880.5797123849733760.710143807513312
710.2526415241185030.5052830482370060.747358475881497
720.2303854441146010.4607708882292020.769614555885399
730.1987410461666700.3974820923333390.80125895383333
740.1836282757261930.3672565514523860.816371724273807
750.1626145433461800.3252290866923610.83738545665382
760.259945255557660.519890511115320.74005474444234
770.2263828566146270.4527657132292530.773617143385373
780.2524752556211520.5049505112423040.747524744378848
790.2169577450874080.4339154901748160.783042254912592
800.2258766206325670.4517532412651340.774123379367433
810.2023535453493370.4047070906986730.797646454650663
820.2012606750362490.4025213500724980.798739324963751
830.2200476014490870.4400952028981740.779952398550913
840.1915629408643520.3831258817287050.808437059135648
850.1640089966674900.3280179933349810.83599100333251
860.1398238338524340.2796476677048690.860176166147566
870.1165062452473960.2330124904947920.883493754752604
880.09874643046931050.1974928609386210.90125356953069
890.09345066045574930.1869013209114990.90654933954425
900.2968544443845000.5937088887690010.7031455556155
910.2588106466191200.5176212932382410.74118935338088
920.2283629056910820.4567258113821630.771637094308918
930.1952901294224650.390580258844930.804709870577535
940.1767511059000710.3535022118001410.82324889409993
950.1725664811270020.3451329622540040.827433518872998
960.1513958896989200.3027917793978410.84860411030108
970.1587895486682790.3175790973365570.841210451331721
980.1378848984433160.2757697968866320.862115101556684
990.1250845556404390.2501691112808780.87491544435956
1000.1227963059637440.2455926119274880.877203694036256
1010.1196132786681930.2392265573363860.880386721331807
1020.1101423528731640.2202847057463280.889857647126836
1030.09548332737075280.1909666547415060.904516672629247
1040.08736904737170620.1747380947434120.912630952628294
1050.08818528160754340.1763705632150870.911814718392457
1060.1490544541847150.2981089083694310.850945545815285
1070.1318561074559390.2637122149118780.868143892544061
1080.1322707587567710.2645415175135420.867729241243229
1090.1192703616852830.2385407233705650.880729638314717
1100.5139407762225050.972118447554990.486059223777495
1110.4642786983545440.9285573967090880.535721301645456
1120.4437947814399840.8875895628799680.556205218560016
1130.404540900429550.80908180085910.59545909957045
1140.3748715956841480.7497431913682950.625128404315852
1150.3360237908026830.6720475816053670.663976209197316
1160.3536207385763630.7072414771527260.646379261423637
1170.3085949776269250.617189955253850.691405022373075
1180.2637486616376910.5274973232753820.736251338362309
1190.2843763682722460.5687527365444920.715623631727754
1200.2573712485125240.5147424970250480.742628751487476
1210.2667716032030280.5335432064060570.733228396796972
1220.2245137493859860.4490274987719720.775486250614014
1230.199418323551730.398836647103460.80058167644827
1240.2594399338084290.5188798676168580.740560066191571
1250.2320073062197260.4640146124394510.767992693780274
1260.229780000969640.459560001939280.77021999903036
1270.3947530002144750.789506000428950.605246999785525
1280.4143038100622880.8286076201245760.585696189937712
1290.441287400471380.882574800942760.55871259952862
1300.423680264142780.847360528285560.57631973585722
1310.3960604950995640.7921209901991270.603939504900436
1320.4926840231745750.985368046349150.507315976825425
1330.6162533809583440.7674932380833130.383746619041656
1340.5598302711387230.8803394577225550.440169728861278
1350.5259807650835430.9480384698329140.474019234916457
1360.4618634411700040.9237268823400070.538136558829996
1370.8204965283597260.3590069432805490.179503471640274
1380.7708882878198280.4582234243603430.229111712180172
1390.7233210321181890.5533579357636230.276678967881811
1400.6845019727673110.6309960544653770.315498027232689
1410.6256435471942460.7487129056115090.374356452805754
1420.5737263883997930.8525472232004130.426273611600207
1430.5035022592240980.9929954815518050.496497740775902
1440.4211052317985790.8422104635971580.578894768201421
1450.4179647157980790.8359294315961570.582035284201921
1460.3296221311192620.6592442622385250.670377868880738
1470.2466021719886480.4932043439772960.753397828011352
1480.1819487456442610.3638974912885210.81805125435574
1490.3248130038252400.6496260076504790.67518699617476
1500.3716275951098020.7432551902196050.628372404890198
1510.3991396920203340.7982793840406680.600860307979666
1520.4743046300711680.9486092601423360.525695369928832


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


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464628rpt66829n3i8cbw/1dh0b1290464707.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464628rpt66829n3i8cbw/1dh0b1290464707.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464628rpt66829n3i8cbw/2dh0b1290464707.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464628rpt66829n3i8cbw/2dh0b1290464707.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464628rpt66829n3i8cbw/3dh0b1290464707.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464628rpt66829n3i8cbw/3dh0b1290464707.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464628rpt66829n3i8cbw/4orzw1290464707.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464628rpt66829n3i8cbw/4orzw1290464707.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464628rpt66829n3i8cbw/5orzw1290464707.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464628rpt66829n3i8cbw/5orzw1290464707.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464628rpt66829n3i8cbw/6h0yh1290464707.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464628rpt66829n3i8cbw/6h0yh1290464707.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464628rpt66829n3i8cbw/799x21290464707.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464628rpt66829n3i8cbw/799x21290464707.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464628rpt66829n3i8cbw/899x21290464707.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464628rpt66829n3i8cbw/899x21290464707.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464628rpt66829n3i8cbw/999x21290464707.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290464628rpt66829n3i8cbw/999x21290464707.ps (open in new window)


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