Home » date » 2010 » Nov » 23 »

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Tue, 23 Nov 2010 21:27:31 +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/23/t1290547537itrsvv0lgq81d1u.htm/, Retrieved Tue, 23 Nov 2010 22:25:47 +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/23/t1290547537itrsvv0lgq81d1u.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 «
11 14 11 12 12 11 11 7 8 11 11 6 17 8 14 11 12 10 8 12 11 8 12 9 21 11 10 12 7 12 11 10 11 4 22 11 11 11 11 11 11 16 12 7 10 11 11 13 7 13 11 13 14 12 10 11 12 16 10 8 11 8 11 10 15 11 12 10 8 14 11 11 11 8 10 11 4 15 4 14 11 9 9 9 14 11 8 11 8 11 11 8 17 7 10 11 14 17 11 13 11 15 11 9 7 11 16 18 11 14 11 9 14 13 12 11 14 10 8 14 11 11 11 8 11 11 8 15 9 9 11 9 15 6 11 11 9 13 9 15 11 9 16 9 14 11 9 13 6 13 11 10 9 6 9 11 16 18 16 15 11 11 18 5 10 11 8 12 7 11 11 9 17 9 13 11 16 9 6 8 11 11 9 6 20 11 16 12 5 12 11 12 18 12 10 11 12 12 7 10 11 14 18 10 9 11 9 14 9 14 11 10 15 8 8 11 9 16 5 14 11 10 10 8 11 11 12 11 8 13 11 14 14 10 9 11 14 9 6 11 11 10 12 8 15 11 14 17 7 11 11 16 5 4 10 11 9 12 8 14 11 10 12 8 18 11 6 6 4 14 11 8 24 20 11 11 13 12 8 12 11 10 12 8 13 11 8 14 6 9 11 7 7 4 10 11 15 13 8 15 11 9 12 9 20 11 10 13 6 12 11 12 14 7 12 11 13 8 9 14 11 10 11 5 13 11 11 9 5 11 11 8 11 8 17 11 9 13 8 12 11 13 10 6 13 11 11 11 8 14 11 8 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 time10 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135
R Framework
error message
Warning: there are blank lines in the 'Data X' field.
Please, use NA for missing data - blank lines are simply
 deleted and are NOT treated as missing values.


Multiple Linear Regression - Estimated Regression Equation
Depression[t] = + 18.7294640774005 -0.457083428977557Month[t] -0.0780147047931104Doubts[t] -0.0134474047661470Expectations[t] -0.0478920443475955Criticism[t] + 0.00711727823524966t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)18.72946407740057.0333142.6630.0085580.004279
Month-0.4570834289775570.631823-0.72340.4704950.235248
Doubts-0.07801470479311040.090654-0.86060.3907930.195397
Expectations-0.01344740476614700.08802-0.15280.8787720.439386
Criticism-0.04789204434759550.108905-0.43980.660720.33036
t0.007117278235249660.0054041.31710.1897410.094871


Multiple Linear Regression - Regression Statistics
Multiple R0.140873739807703
R-squared0.0198454105674083
Adjusted R-squared-0.0115698006323544
F-TEST (value)0.631713421922126
F-TEST (DF numerator)5
F-TEST (DF denominator)156
p-value0.675807663433844
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.16183684598457
Sum Squared Residuals1559.56510953760


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11211.89383178518060.106168214819405
21112.3803509742498-1.38035097424985
31412.64306772878921.35693227121082
41212.2762286116288-0.276228611628794
52112.52061785515668.4793821448434
61212.4674898125008-0.467489812500814
72212.6317306285459.368269371455
81112.2255888915540-1.22558889155397
91012.0207534184479-2.02075341844790
101312.40449681588260.595503184117442
111012.0026770580275-2.00267705802746
12812.1566983202187-4.15669832021872
131512.54311144145712.45688855854285
141412.34740139398131.65259860601871
151012.4190859722435-2.41908597224350
161413.11008474235630.88991525764368
171412.56835270348491.43164729651508
181112.6744819213286-1.67448192132858
191012.6488068153145-2.64880681531455
201311.99626768740081.00373231259925
21712.1018387781350-5.10183877813497
221411.84102542951892.15897457048111
231212.3522511716753-0.352251171675305
241412.26254476674761.73745523325243
251112.490258754596-1.490258754596
26912.6297384837984-3.6297384837984
271112.7025171902833-1.70251719028332
281512.59285314500812.40714685499192
291412.55962820894491.44037179105511
301312.75076383452140.249236165478633
31912.7336560270281-3.73365602702810
321511.67273799013343.32726200986659
331012.5967412801578-2.59674128015776
341112.8228030126740-1.82280301267403
351312.58888447359020.411115526409759
36812.3011541894457-4.30115418944568
372012.69834499164657.30165500835352
381212.3229385759653-0.322938575965334
391012.2261859343430-2.22618593434298
401012.5534478629131-2.55344786291308
41912.1801751699224-3.18017516992245
421412.67904763553541.32095236446457
43812.6425948485590-4.64259484855902
441412.85795555986401.14204444013598
451112.7240664288603-1.72406642886025
461312.56170689274310.438293107256866
47912.2766684583985-3.27666845839853
481112.5425909378549-1.54259093785490
491512.72564073226902.27435926773104
501112.4013542118486-1.40135421184862
511012.5574870707342-2.55748707073420
521412.82500727176781.17499272823218
531812.75410984521005.24589015479004
541413.34553854860490.65446145139509
551112.1883004219018-1.18830042190177
561212.5414175655364-0.541417565536373
571312.78257895815100.217421041849046
58913.0146149251353-4.01461492513532
591013.2896628302219-3.2896628302219
601512.4004098641252.59959013587500
612012.84117073153757.15882926846253
621212.9005020332562-0.900502033256246
631212.6902504527915-0.690250452791532
641412.60425336613541.39574663386464
651312.99664072184190.00335927815811590
661112.9526381048163-1.95263810481632
671713.02322855485583.97677144514418
681212.9254363187657-0.925436318765663
691312.75662108082210.243378919177897
701412.81053627518221.18946372481776
711313.0861423073783-0.086142307378265
721513.05558709511881.94441290488115
731312.88623585606200.113764143937978
741012.2891386025450-2.28913860254498
751113.0441465455753-2.04414654557531
761912.91780724462076.0821927553793
771312.69520238761250.304797612387451
781712.70122553762514.29877446237491
791312.81002447927250.189975520727480
80912.9505983366976-3.95059833669763
811112.5321033231632-1.53210332316317
821013.2860171379708-3.28601713797078
83912.7981513779151-3.79815137791508
841212.9812011723291-0.981201172329137
851212.8672696816729-0.867269681672877
861312.90506774746310.0949322525369093
871313.1532208430174-0.153220843017377
881212.7314979785697-0.731497978569693
891512.51316056694262.48683943305744
902213.06534118426188.93465881573822
911312.68561278944470.314387210555293
921513.57133092811001.42866907188998
931313.1448046171681-0.144804617168058
941513.10136012725191.89863987274806
951013.0487135519545-3.04871355195451
961112.74755798904-1.74755798903999
971612.52439500492243.47560499507761
981112.5680906454296-1.56809064542960
991113.2074113931721-2.20741139317215
1001013.0751745175005-3.07517451750054
1011012.9596128975083-2.95961289750831
1021613.43268468181172.56731531818829
1031212.9980725397073-0.998072539707328
1041113.1369941418003-2.13699414180028
1051612.72981281034153.27018718965855
1061912.97639031031476.02360968968532
1071113.3692591333795-2.36925913337955
1081613.11434335948052.88565664051954
1091512.65660025987032.34339974012973
1102412.943519974141911.0564800258581
1111413.37083343678830.629166563211748
1121513.08470087422091.91529912577906
1131113.2338420301668-2.23384203016681
1141513.19794737029981.80205262970015
1151213.4175534009897-1.41755340098968
1161013.4887565118935-3.48875651189354
1171413.45443744760760.54556255239236
1181313.2748445287017-0.274844528701705
119912.8235571309180-3.82355713091795
1201513.39831057863351.60168942136646
1211513.41887526163491.58112473836506
1221413.21507938299670.784920617003333
1231112.7696895599299-1.76968955992991
124813.5919345267910-5.59193452679098
1251112.5880884936290-1.58808849362901
1261113.1284194277593-2.12841942775934
127813.6552808311273-5.65528083112733
1281013.2233384128267-3.22333841282672
1291113.2202361372090-2.22023613720904
1301313.0035288549179-0.00352885491788466
1311113.0741193049574-2.07411930495739
1322013.39438953058786.60561046941221
1331013.5586303466320-3.55863034663197
1341513.71854918354021.28145081645978
1351213.3377266605004-1.33772666050043
1361412.90743649753201.09256350246802
1372313.21370119128689.78629880871321
1381413.14170963650620.858290363493787
1391613.47433313868012.52566686131995
1401112.8998087155594-1.89980871555937
1411213.0608216806903-1.06082168069033
1421013.0953918955673-3.09539189556732
1431412.34653267784511.65346732215493
1441213.2226217975256-1.22262179752564
1451212.9639421716001-0.963942171600072
1461113.0571599857908-2.05715998579085
1471213.3860196359382-1.38601963593820
1481313.5696054314655-0.569605431465526
1491113.4674912162394-2.46749121623944
1501913.47783634538795.52216365461209
1511213.6512025870623-1.65120258706230
1521712.93684254267644.06315745732358
153913.3146883653941-4.31468836539408
1541213.6198589309262-1.61985893092618
1551913.05501806054525.94498193945484
1561813.64754089216284.35245910783718
1571513.19569536726961.80430463273037
1581413.13125364253820.868746357461793
1591112.5631849212440-1.56318492124396
1601113.1282002824650-2.12820028246497
1611210.98877310236091.01122689763906
162813.0561344881952-5.05613448819524


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.9796180517685860.04076389646282770.0203819482314139
100.9597360075932380.0805279848135240.040263992406762
110.9251342795906120.1497314408187760.0748657204093882
120.9047867744896680.1904264510206640.0952132255103322
130.852811923770760.2943761524584810.147188076229240
140.7890738649190710.4218522701618570.210926135080929
150.7848701033529790.4302597932940420.215129896647021
160.7959586236357950.4080827527284090.204041376364205
170.7319142422465950.536171515506810.268085757753405
180.690406119188470.6191877616230610.309593880811531
190.6239146209998890.7521707580002220.376085379000111
200.7498173974954270.5003652050091460.250182602504573
210.7302502715381450.539499456923710.269749728461855
220.820573071305430.3588538573891390.179426928694569
230.7750123023463770.4499753953072460.224987697653623
240.7635381003244180.4729237993511630.236461899675582
250.7121711918244910.5756576163510190.287828808175509
260.7017084793335350.596583041332930.298291520666465
270.6483928491561160.7032143016877680.351607150843884
280.655032778034860.689934443930280.34496722196514
290.6233988103097570.7532023793804860.376601189690243
300.562506768902130.874986462195740.43749323109787
310.5589228437457850.882154312508430.441077156254215
320.6411656612554480.7176686774891050.358834338744552
330.600595872418880.7988082551622390.399404127581120
340.5472396178997250.905520764200550.452760382100275
350.4943393213279670.9886786426559350.505660678672033
360.4651961024446590.9303922048893170.534803897555341
370.7721115057128960.4557769885742080.227888494287104
380.7334340955192530.5331318089614930.266565904480747
390.6976595959799570.6046808080400860.302340404020043
400.6645744063515080.6708511872969850.335425593648492
410.636839015678860.726321968642280.36316098432114
420.6010826810040670.7978346379918660.398917318995933
430.626646467461160.7467070650776810.373353532538840
440.5955969712649380.8088060574701240.404403028735062
450.5503585477610680.8992829044778630.449641452238932
460.5092280455585060.9815439088829870.490771954441494
470.4856695457587080.9713390915174160.514330454241292
480.4404645553682760.8809291107365510.559535444631724
490.4332048119895410.8664096239790820.566795188010459
500.3923027008246370.7846054016492740.607697299175363
510.3627957725563030.7255915451126060.637204227443697
520.3276488837457660.6552977674915330.672351116254234
530.4251238376497540.8502476752995080.574876162350246
540.379114037193020.758228074386040.62088596280698
550.3382963099418790.6765926198837590.661703690058121
560.2970116380819850.594023276163970.702988361918015
570.2564510382162120.5129020764324230.743548961783788
580.2772976569548370.5545953139096750.722702343045163
590.282074310426730.564148620853460.71792568957327
600.2984629641912410.5969259283824820.701537035808759
610.4891278169979310.9782556339958620.510872183002069
620.4443937054786660.8887874109573310.555606294521334
630.4006629724196560.8013259448393120.599337027580344
640.3635222704784710.7270445409569420.636477729521529
650.3201863387117090.6403726774234180.679813661288291
660.2935463484130340.5870926968260680.706453651586966
670.3093473787110260.6186947574220530.690652621288974
680.2729874529662280.5459749059324560.727012547033772
690.2370657586805560.4741315173611110.762934241319444
700.206323514466950.41264702893390.79367648553305
710.1747314070369780.3494628140739550.825268592963022
720.1541643945492930.3083287890985860.845835605450707
730.1279224962315610.2558449924631210.87207750376844
740.1158333498781970.2316666997563940.884166650121803
750.1027541437204270.2055082874408540.897245856279573
760.1675008039672430.3350016079344860.832499196032757
770.1431829627450360.2863659254900720.856817037254964
780.1650303584724740.3300607169449490.834969641527526
790.1381337101488410.2762674202976830.861866289851159
800.1543435133869040.3086870267738090.845656486613096
810.1353725745850850.270745149170170.864627425414915
820.1474734944251640.2949469888503270.852526505574836
830.1620049261731850.324009852346370.837995073826815
840.1385430408113290.2770860816226580.861456959188671
850.1182333701237410.2364667402474820.881766629876259
860.09961350368275630.1992270073655130.900386496317244
870.08161615427738820.1632323085547760.918383845722612
880.06763421110551450.1352684222110290.932365788894485
890.06000984695179510.1200196939035900.939990153048205
900.2126655922162780.4253311844325550.787334407783722
910.1825001264510250.3650002529020500.817499873548975
920.1633104873596450.3266209747192910.836689512640355
930.1364079664633370.2728159329266740.863592033536663
940.1196264327106370.2392528654212740.880373567289363
950.1220410895430750.2440821790861500.877958910456925
960.1086795623889280.2173591247778550.891320437611072
970.1092805987212790.2185611974425580.890719401278721
980.09706496351910590.1941299270382120.902935036480894
990.08882426008020650.1776485201604130.911175739919794
1000.09138830413828130.1827766082765630.908611695861719
1010.0944777864810050.188955572962010.905522213518995
1020.08511858617005310.1702371723401060.914881413829947
1030.07340355030198810.1468071006039760.926596449698012
1040.06835269155097080.1367053831019420.93164730844903
1050.06389609915854230.1277921983170850.936103900841458
1060.0979952020729460.1959904041458920.902004797927054
1070.09033555458465310.1806711091693060.909664445415347
1080.08304520845998320.1660904169199660.916954791540017
1090.07111102999853580.1422220599970720.928888970001464
1100.4310864628047720.8621729256095440.568913537195228
1110.3886234284742170.7772468569484350.611376571525783
1120.3636278601117200.7272557202234410.63637213988828
1130.3348293040594730.6696586081189460.665170695940527
1140.3095575119872990.6191150239745980.690442488012701
1150.2748522704796180.5497045409592360.725147729520382
1160.2711566241913950.5423132483827910.728843375808605
1170.2327199770431400.4654399540862810.76728002295686
1180.1979547689745820.3959095379491640.802045231025418
1190.2047375003525220.4094750007050430.795262499647478
1200.1869788397397890.3739576794795770.813021160260211
1210.1764152022617780.3528304045235570.823584797738222
1220.1520868600020840.3041737200041680.847913139997916
1230.1263478909533890.2526957819067780.873652109046611
1240.1509945459800060.3019890919600120.849005454019994
1250.1237786390337330.2475572780674660.876221360966267
1260.107641229559210.215282459118420.89235877044079
1270.1574478911218890.3148957822437780.842552108878111
1280.157248607787310.314497215574620.84275139221269
1290.1491171145089390.2982342290178770.850882885491061
1300.1183635921380610.2367271842761210.88163640786194
1310.1108972705408740.2217945410817470.889102729459126
1320.1846056365090680.3692112730181360.815394363490932
1330.2082599610844480.4165199221688950.791740038915552
1340.1674185848724250.334837169744850.832581415127575
1350.1457794926255840.2915589852511680.854220507374416
1360.1161289494537630.2322578989075270.883871050546237
1370.4889962634580120.9779925269160250.511003736541988
1380.4269651880819260.8539303761638520.573034811918074
1390.4198725730699950.839745146139990.580127426930005
1400.3566118826380640.7132237652761290.643388117361936
1410.2903149460272150.580629892054430.709685053972785
1420.2742004403538560.5484008807077130.725799559646144
1430.2142616269964050.428523253992810.785738373003595
1440.1603918578646040.3207837157292070.839608142135396
1450.1239564360279970.2479128720559950.876043563972003
1460.1090217338489220.2180434676978440.890978266151078
1470.09351071715337670.1870214343067530.906489282846623
1480.06770458151664470.1354091630332890.932295418483355
1490.1031453161318720.2062906322637440.896854683868128
1500.09407979963065360.1881595992613070.905920200369346
1510.1053930721135140.2107861442270280.894606927886486
1520.06170719927984390.1234143985596880.938292800720156
1530.2079946076506060.4159892153012120.792005392349394


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


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547537itrsvv0lgq81d1u/18urb1290547640.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547537itrsvv0lgq81d1u/18urb1290547640.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547537itrsvv0lgq81d1u/28urb1290547640.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547537itrsvv0lgq81d1u/28urb1290547640.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547537itrsvv0lgq81d1u/30mqe1290547640.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547537itrsvv0lgq81d1u/30mqe1290547640.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547537itrsvv0lgq81d1u/40mqe1290547640.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547537itrsvv0lgq81d1u/40mqe1290547640.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547537itrsvv0lgq81d1u/50mqe1290547640.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547537itrsvv0lgq81d1u/50mqe1290547640.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547537itrsvv0lgq81d1u/6tdpz1290547640.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547537itrsvv0lgq81d1u/6tdpz1290547640.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547537itrsvv0lgq81d1u/7m4pk1290547640.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547537itrsvv0lgq81d1u/7m4pk1290547640.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547537itrsvv0lgq81d1u/8m4pk1290547640.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547537itrsvv0lgq81d1u/8m4pk1290547640.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547537itrsvv0lgq81d1u/9m4pk1290547640.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290547537itrsvv0lgq81d1u/9m4pk1290547640.ps (open in new window)


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