Home » date » 2010 » Dec » 22 »

*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: Wed, 22 Dec 2010 20:28:14 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/22/t1293049786xq1916d6sjljtvh.htm/, Retrieved Wed, 22 Dec 2010 21:29:46 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Dec/22/t1293049786xq1916d6sjljtvh.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 «
13 11 23 1 6 12 22 24 2 5 26 23 24 2 20 16 21 21 2 12 18 19 21 2 11 12 12 19 2 12 18 24 12 1 11 20 21 21 1 9 18 21 25 2 13 24 26 27 2 9 17 18 21 1 14 19 21 27 1 12 12 22 20 1 18 25 26 16 2 9 23 20 26 1 15 22 20 24 2 12 23 26 25 2 12 16 27 25 1 12 16 27 27 1 15 15 16 23 2 11 24 26 22 1 13 18 20 10 1 10 23 25 25 2 17 18 16 18 1 13 19 20 21 1 17 17 20 20 1 15 22 24 18 1 13 22 24 25 1 17 8 22 28 1 21 12 18 27 1 12 22 21 20 2 12 16 17 20 1 15 12 15 20 2 8 28 28 27 2 15 15 23 23 1 16 17 19 23 2 9 16 15 22 2 13 24 26 26 1 11 27 20 21 1 9 10 11 17 1 15 20 17 27 2 9 17 16 16 2 15 20 21 26 1 14 16 18 17 1 8 16 17 24 2 11 22 21 23 2 14 19 18 20 1 14 11 16 10 1 12 11 13 21 1 15 28 28 25 1 11 12 25 28 1 11 22 24 25 2 9 15 15 20 2 8 19 21 20 1 13 12 11 27 1 12 18 27 26 1 24 21 23 19 2 11 21 21 26 1 11 15 16 20 2 16 12 20 22 1 12 25 21 19 2 18 12 10 23 2 12 25 18 28 2 14 17 20 22 2 16 26 21 27 2 24 24 24 14 1 13 18 26 25 1 11 20 23 22 1 14 17 22 24 1 16 11 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
E/Introjected[t] = + 7.19886437536333 + 0.537098324370937`I/Accomp.`[t] + 0.139674730633224`E/Ext.Regulation`[t] -0.669211159060354gender[t] + 0.0867952854772109PE[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)7.198864375363332.5887912.78080.0061540.003077
`I/Accomp.`0.5370983243709370.0675897.946500
`E/Ext.Regulation`0.1396747306332240.0830141.68260.0946440.047322
gender-0.6692111590603540.641333-1.04350.2984920.149246
PE0.08679528547721090.0902170.96210.3376360.168818


Multiple Linear Regression - Regression Statistics
Multiple R0.570779891253353
R-squared0.325789684259189
Adjusted R-squared0.306930654448258
F-TEST (value)17.2749970452002
F-TEST (DF numerator)4
F-TEST (DF denominator)143
p-value1.39434019885698e-11
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.58298406921987
Sum Squared Residuals1835.80180216053


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11117.2452219505526-6.24522195055256
22216.09179191227735.90820808772271
32324.9130977356286-1.91309773562856
42118.42872801620182.57127198379816
51919.4161293794665-0.416129379466504
61216.0009852574516-4.00098525745165
72418.82826796282785.17173203717216
82120.98594661631430.014053383685691
92120.14841887295380.85158112704618
102623.30317713853702.69682286146296
111819.8086280705876-1.80862807058755
122121.5472825321743-0.547282532174348
132217.33064286000854.66935713999151
142622.30385342594253.69614657405748
152023.8163869554565-3.8163869554565
162022.0703421543271-2.07034215432713
172622.74711520933133.25288479066871
182719.65663809779517.34336190220491
192720.19637341549326.80362658450683
201618.0841838676201-2.08418386762014
212623.62119578634012.37880421365988
222018.46212321608421.53787678391581
232523.18109163671731.81890836328265
241619.8399069175816-3.83990691758161
252021.1432105757611-1.14321057576106
262019.75574862543150.244251374568459
272421.98830021506542.01169978493464
282423.31320447140680.686795528593236
292216.56003326402225.43996673597783
301817.78759426157780.212405738422207
312121.5116432317942-0.511643231794236
321719.2186503010606-2.21865030106060
331515.7934788461760-0.793478846176028
342825.97234214888412.02765785111594
352319.18737145406663.81262854593345
361918.98478994540760.0152100545924071
371518.6551980323123-3.65519803231228
382624.00630413791861.99369586208140
392024.7456348869109-4.74563488691086
401115.5770361629353-4.57703616293531
411721.1547838410533-4.1547838410533
421618.5278385438383-2.52783854383829
432122.1182966968665-1.11829669686648
441818.1920591108205-0.192059110820457
451718.7609569226243-1.76095692262430
462122.1042579946483-1.10425799464833
471820.7431499886962-2.74314998869620
481614.87602551644211.12397448355795
491316.6728334098391-3.67283340983915
502826.01502270476911.98497729523088
512517.84047370673387.1595262932662
522421.94963102852872.05036897147128
531517.4047738192888-2.40477381928884
542120.6563547032190.343645296781008
551117.7875942615778-6.78759426157779
562721.91205290289675.08794709710328
572320.74807489131292.25192510868713
582122.3950091648058-1.39500916480579
591618.0991361031065-2.09913610310652
602017.08922060841172.91077939158833
612123.5040351871371-2.50403518713709
621016.5596841799845-6.55968417998454
631824.4139266209273-6.41392662092726
642019.45268221311480.547317786885155
652125.6793030694371-4.67930306943708
662422.50379794127431.49620205872567
672620.64403946105985.35596053894025
682321.55959777433361.44040222566641
692220.40124283344161.59875716655835
701316.6917970146740-3.69179701467396
712726.34587723517030.654122764829708
722418.24545919641535.75454080358468
731922.7774805230571-3.77748052305712
741719.0812634797169-2.0812634797169
751621.4415236418623-5.44152364186232
762020.5193169659129-0.519316965912912
77816.6970710013282-8.69707100132825
781621.3909321059958-5.39093210599583
791719.8615075157436-2.86150751574357
802323.3207663673506-0.320766367350571
811819.011143889785-1.01114388978498
822423.62383277966730.376167220332733
831717.8188731085718-0.818873108571847
842021.9759849729061-1.97598497290611
852219.57740470826172.42259529173831
862219.25520313470892.74479686529105
872019.34337279620740.656627203792555
881820.9885836096415-2.98858360964145
892119.95322770383741.04677229616256
902319.13185501558343.86814498441661
912822.99730217649205.00269782350803
921921.4076078015411-2.40760780154112
932219.91438696089962.08561303910042
941720.6828802039976-3.68288020399761
952523.40228766617351.59771233382651
962222.0364263140059-0.0364263140059339
972119.32933409398931.67066590601071
981519.1847344607394-4.18473446073941
992020.7308347465370-0.730834746536964
1002518.67679863047426.32320136952576
1012120.44884829194340.551151708056627
1022423.45024220871280.549757791287155
1032320.750711884642.24928811535999
1042223.6740752314961-1.67407523149614
1051420.5748334043961-6.57483340439607
1061122.0993330920317-11.0993330920317
1072216.83147174530725.16852825469281
1082222.0654172517105-0.0654172517104694
109615.4316945528184-9.43169455281842
1101520.8851126286189-5.88511262861895
1112622.22405558717853.77594441282149
1122622.82371160553763.17628839446245
1132017.91094238070332.08905761929666
1142622.72058970855273.27941029144733
1151516.6415545628451-1.64155456284509
1162520.79127608763684.20872391236322
1172223.6261206889568-1.62612068895679
1182021.9157151882075-1.91571518820752
1191817.80254649706420.197453502935824
1202317.61136669729625.38863330270377
1212220.07393882963581.92606117036415
1222320.7092341483752.29076585162499
1231722.3231661148150-5.32316611481496
1242016.77859230015123.22140769984883
1252120.66127960583570.338720394164346
1262324.4186799671427-1.41867996714269
1272523.41196591500561.58803408499441
1282521.09926740257013.90073259742986
1292117.19589303199193.80410696800807
1302219.19968669622582.80031330377421
1311819.2904933510514-1.29049335105143
1321820.2373305113193-2.23733051131932
1331822.3593698644257-4.35936986442568
1342119.58971995042091.41028004957907
1352117.17165544050283.82834455949717
1362521.04902495074133.95097504925873
1372421.18113778543072.81886221456931
1382421.75215195012282.24784804987718
1392824.40865263427303.59134736572703
1402423.1445388030690.855461196930994
1412222.067705161-0.0677051609999881
1422221.55959777433360.440402225666413
1432021.7671041856092-1.76710418560921
1442521.78606779044403.21393220955598
1451318.3004549944596-5.30045499445963
1462119.96726640605561.03273359394441
1472319.67159033328153.32840966671853
1481821.1358202362185-3.13582023621848


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.6252190828711110.7495618342577780.374780917128889
90.5747867824045290.8504264351909420.425213217595471
100.551345908563110.897308182873780.44865409143689
110.5620458728500610.8759082542998790.437954127149939
120.5593554297446740.8812891405106520.440644570255326
130.8059152614956790.3881694770086420.194084738504321
140.739034842942010.5219303141159810.260965157057990
150.6909197571676750.6181604856646510.309080242832325
160.6419311814619520.7161376370760950.358068818538048
170.6175175529036020.7649648941927960.382482447096398
180.8385839970577780.3228320058844430.161416002942222
190.908365168277060.1832696634458790.0916348317229396
200.8953118465679730.2093763068640540.104688153432027
210.8636945473185010.2726109053629970.136305452681499
220.8235042936871360.3529914126257280.176495706312864
230.7798759633754060.4402480732491870.220124036624594
240.8118491904813060.3763016190373880.188150809518694
250.7737479437986870.4525041124026260.226252056201313
260.7210269393109840.5579461213780320.278973060689016
270.6718699353560560.6562601292878880.328130064643944
280.6114456544388890.7771086911222230.388554345561111
290.6305293314934890.7389413370130220.369470668506511
300.5768121682082260.8463756635835490.423187831791774
310.5194479343110110.9611041313779770.480552065688989
320.5034989181897170.9930021636205670.496501081810283
330.4541514035053040.9083028070106080.545848596494696
340.4064148218451020.8128296436902050.593585178154898
350.3876632358674590.7753264717349180.612336764132541
360.3337082213769370.6674164427538740.666291778623063
370.3544888030324110.7089776060648220.645511196967589
380.3091295936956230.6182591873912450.690870406304377
390.3542983659359550.708596731871910.645701634064045
400.4122055415954990.8244110831909990.5877944584045
410.4402023689082270.8804047378164540.559797631091773
420.4108868153289270.8217736306578550.589113184671073
430.3714264774669580.7428529549339160.628573522533042
440.3213646710249550.642729342049910.678635328975045
450.2864410149456630.5728820298913260.713558985054337
460.2465721719297060.4931443438594130.753427828070294
470.2335636490930960.4671272981861910.766436350906904
480.2001094706696900.4002189413393800.79989052933031
490.2116418934515480.4232837869030960.788358106548452
500.1843326043196010.3686652086392020.815667395680399
510.277126110924260.554252221848520.72287388907574
520.2483825036065710.4967650072131420.751617496393429
530.2249461183029090.4498922366058190.77505388169709
540.1884108031575080.3768216063150170.811589196842492
550.3182123606372780.6364247212745570.681787639362721
560.3476054671585890.6952109343171790.652394532841411
570.3220632824304720.6441265648609440.677936717569528
580.2877023362369420.5754046724738830.712297663763058
590.2617821245418730.5235642490837470.738217875458127
600.2449959130034840.4899918260069680.755004086996516
610.2256529322988380.4513058645976770.774347067701162
620.3204899159227630.6409798318455260.679510084077237
630.418150238346180.836300476692360.58184976165382
640.3730557897717980.7461115795435950.626944210228202
650.4072721971877360.8145443943754710.592727802812264
660.3697250542574220.7394501085148440.630274945742578
670.4212275291436080.8424550582872160.578772470856392
680.3813390067523660.7626780135047320.618660993247634
690.3430005701973610.6860011403947220.656999429802639
700.3515021805633480.7030043611266970.648497819436652
710.3100184599692890.6200369199385770.689981540030711
720.3742083574233780.7484167148467570.625791642576622
730.3817866345525410.7635732691050810.61821336544746
740.3544177879995590.7088355759991180.645582212000441
750.414138978594940.828277957189880.58586102140506
760.3690426139149120.7380852278298230.630957386085088
770.6119990763391750.776001847321650.388000923660825
780.6712568959693830.6574862080612340.328743104030617
790.6551204986057130.6897590027885750.344879501394287
800.6132541379977690.7734917240044610.386745862002231
810.569503987777430.860992024445140.43049601222257
820.5222644908974940.9554710182050130.477735509102506
830.4768833111845030.9537666223690060.523116688815497
840.4405509642074130.8811019284148250.559449035792587
850.4108189493814320.8216378987628650.589181050618568
860.3863337234320610.7726674468641220.613666276567939
870.3416532567474040.6833065134948080.658346743252596
880.3259037276410010.6518074552820020.674096272358999
890.2865863050183550.573172610036710.713413694981645
900.2901874083830790.5803748167661580.709812591616921
910.3390911753094990.6781823506189990.660908824690501
920.3120167312308350.6240334624616690.687983268769165
930.2839356499739570.5678712999479140.716064350026043
940.2980864863881450.5961729727762910.701913513611855
950.2624899548602110.5249799097204220.737510045139789
960.2256745310194520.4513490620389040.774325468980548
970.1947570733382840.3895141466765680.805242926661716
980.2044722154420500.4089444308841000.79552778455795
990.1712218059939640.3424436119879290.828778194006036
1000.2182964358018060.4365928716036110.781703564198194
1010.1828718020675670.3657436041351350.817128197932433
1020.1522875623845710.3045751247691420.847712437615429
1030.1307877553574600.2615755107149190.86921224464254
1040.1082366877604950.2164733755209890.891763312239505
1050.1704436390255340.3408872780510670.829556360974467
1060.6040682570770550.7918634858458890.395931742922945
1070.6556512649624810.6886974700750380.344348735037519
1080.6070355073554780.7859289852890450.392964492644523
1090.904168591047930.1916628179041420.0958314089520709
1100.9529450333140.09410993337200120.0470549666860006
1110.9508988688123970.09820226237520610.0491011311876031
1120.9505317350485480.09893652990290440.0494682649514522
1130.934267283238310.1314654335233820.065732716761691
1140.9384646962054390.1230706075891220.0615353037945612
1150.9439389474529440.1121221050941120.0560610525470561
1160.9370172956720970.1259654086558070.0629827043279035
1170.9191889996950080.1616220006099840.0808110003049922
1180.917745360583350.1645092788333000.0822546394166502
1190.898013139675970.2039737206480580.101986860324029
1200.9093117337258580.1813765325482830.0906882662741415
1210.8794958857582440.2410082284835120.120504114241756
1220.8639537511780750.2720924976438490.136046248821925
1230.9197023817252410.1605952365495180.0802976182747589
1240.8996924766275080.2006150467449840.100307523372492
1250.8635994895045530.2728010209908940.136400510495447
1260.8288401324778140.3423197350443710.171159867522186
1270.790222825033780.419554349932440.20977717496622
1280.7959872097862230.4080255804275530.204012790213777
1290.7506290196003890.4987419607992230.249370980399611
1300.6973252308895180.6053495382209630.302674769110482
1310.6283463484253890.7433073031492230.371653651574611
1320.5653527901101020.8692944197797950.434647209889898
1330.7092204812734360.5815590374531270.290779518726564
1340.6179134295844870.7641731408310260.382086570415513
1350.8395274818291450.3209450363417090.160472518170855
1360.8774340166058780.2451319667882440.122565983394122
1370.7992967896262720.4014064207474550.200703210373728
1380.6931078318785690.6137843362428630.306892168121431
1390.579876383529740.840247232940520.42012361647026
1400.4119646250486860.8239292500973720.588035374951314


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 level30.0225563909774436OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293049786xq1916d6sjljtvh/10unnt1293049684.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293049786xq1916d6sjljtvh/10unnt1293049684.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t1293049786xq1916d6sjljtvh/13he91293049684.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293049786xq1916d6sjljtvh/13he91293049684.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t1293049786xq1916d6sjljtvh/23he91293049684.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293049786xq1916d6sjljtvh/23he91293049684.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t1293049786xq1916d6sjljtvh/33he91293049684.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293049786xq1916d6sjljtvh/33he91293049684.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t1293049786xq1916d6sjljtvh/4w8wu1293049684.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293049786xq1916d6sjljtvh/4w8wu1293049684.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t1293049786xq1916d6sjljtvh/5w8wu1293049684.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293049786xq1916d6sjljtvh/5w8wu1293049684.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t1293049786xq1916d6sjljtvh/6w8wu1293049684.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293049786xq1916d6sjljtvh/6w8wu1293049684.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t1293049786xq1916d6sjljtvh/71eoq1293049684.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293049786xq1916d6sjljtvh/71eoq1293049684.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t1293049786xq1916d6sjljtvh/81eoq1293049684.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293049786xq1916d6sjljtvh/81eoq1293049684.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t1293049786xq1916d6sjljtvh/9unnt1293049684.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293049786xq1916d6sjljtvh/9unnt1293049684.ps (open in new window)


 
Parameters (Session):
par1 = 2 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 2 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
R code (references can be found in the software module):
library(lattice)
library(lmtest)
n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
par1 <- as.numeric(par1)
x <- t(y)
k <- length(x[1,])
n <- length(x[,1])
x1 <- cbind(x[,par1], x[,1:k!=par1])
mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
colnames(x1) <- mycolnames #colnames(x)[par1]
x <- x1
if (par3 == 'First Differences'){
x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
for (i in 1:n-1) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
x <- x2
}
if (par2 == 'Include Monthly Dummies'){
x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
for (i in 1:11){
x2[seq(i,n,12),i] <- 1
}
x <- cbind(x, x2)
}
if (par2 == 'Include Quarterly Dummies'){
x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
for (i in 1:3){
x2[seq(i,n,4),i] <- 1
}
x <- cbind(x, x2)
}
k <- length(x[1,])
if (par3 == 'Linear Trend'){
x <- cbind(x, c(1:n))
colnames(x)[k+1] <- 't'
}
x
k <- length(x[1,])
df <- as.data.frame(x)
(mylm <- lm(df))
(mysum <- summary(mylm))
if (n > n25) {
kp3 <- k + 3
nmkm3 <- n - k - 3
gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
numgqtests <- 0
numsignificant1 <- 0
numsignificant5 <- 0
numsignificant10 <- 0
for (mypoint in kp3:nmkm3) {
j <- 0
numgqtests <- numgqtests + 1
for (myalt in c('greater', 'two.sided', 'less')) {
j <- j + 1
gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
}
if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
}
gqarr
}
bitmap(file='test0.png')
plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
points(x[,1]-mysum$resid)
grid()
dev.off()
bitmap(file='test1.png')
plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
grid()
dev.off()
bitmap(file='test2.png')
hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
grid()
dev.off()
bitmap(file='test3.png')
densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
dev.off()
bitmap(file='test4.png')
qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
qqline(mysum$resid)
grid()
dev.off()
(myerror <- as.ts(mysum$resid))
bitmap(file='test5.png')
dum <- cbind(lag(myerror,k=1),myerror)
dum
dum1 <- dum[2:length(myerror),]
dum1
z <- as.data.frame(dum1)
z
plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
lines(lowess(z))
abline(lm(z))
grid()
dev.off()
bitmap(file='test6.png')
acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
grid()
dev.off()
bitmap(file='test7.png')
pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
grid()
dev.off()
bitmap(file='test8.png')
opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
plot(mylm, las = 1, sub='Residual Diagnostics')
par(opar)
dev.off()
if (n > n25) {
bitmap(file='test9.png')
plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
grid()
dev.off()
}
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
a<-table.row.end(a)
myeq <- colnames(x)[1]
myeq <- paste(myeq, '[t] = ', sep='')
for (i in 1:k){
if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
if (rownames(mysum$coefficients)[i] != '(Intercept)') {
myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
}
}
myeq <- paste(myeq, ' + e[t]')
a<-table.row.start(a)
a<-table.element(a, myeq)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Variable',header=TRUE)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'S.D.',header=TRUE)
a<-table.element(a,'T-STAT<br />H0: parameter = 0',header=TRUE)
a<-table.element(a,'2-tail p-value',header=TRUE)
a<-table.element(a,'1-tail p-value',header=TRUE)
a<-table.row.end(a)
for (i in 1:k){
a<-table.row.start(a)
a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
a<-table.element(a,mysum$coefficients[i,1])
a<-table.element(a, round(mysum$coefficients[i,2],6))
a<-table.element(a, round(mysum$coefficients[i,3],4))
a<-table.element(a, round(mysum$coefficients[i,4],6))
a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple R',1,TRUE)
a<-table.element(a, sqrt(mysum$r.squared))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'R-squared',1,TRUE)
a<-table.element(a, mysum$r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-squared',1,TRUE)
a<-table.element(a, mysum$adj.r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (value)',1,TRUE)
a<-table.element(a, mysum$fstatistic[1])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[2])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[3])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'p-value',1,TRUE)
a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
a<-table.element(a, mysum$sigma)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
a<-table.element(a, sum(myerror*myerror))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Time or Index', 1, TRUE)
a<-table.element(a, 'Actuals', 1, TRUE)
a<-table.element(a, 'Interpolation<br />Forecast', 1, TRUE)
a<-table.element(a, 'Residuals<br />Prediction Error', 1, TRUE)
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,i, 1, TRUE)
a<-table.element(a,x[i])
a<-table.element(a,x[i]-mysum$resid[i])
a<-table.element(a,mysum$resid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable4.tab')
if (n > n25) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-values',header=TRUE)
a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'breakpoint index',header=TRUE)
a<-table.element(a,'greater',header=TRUE)
a<-table.element(a,'2-sided',header=TRUE)
a<-table.element(a,'less',header=TRUE)
a<-table.row.end(a)
for (mypoint in kp3:nmkm3) {
a<-table.row.start(a)
a<-table.element(a,mypoint,header=TRUE)
a<-table.element(a,gqarr[mypoint-kp3+1,1])
a<-table.element(a,gqarr[mypoint-kp3+1,2])
a<-table.element(a,gqarr[mypoint-kp3+1,3])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable5.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Description',header=TRUE)
a<-table.element(a,'# significant tests',header=TRUE)
a<-table.element(a,'% significant tests',header=TRUE)
a<-table.element(a,'OK/NOK',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'1% type I error level',header=TRUE)
a<-table.element(a,numsignificant1)
a<-table.element(a,numsignificant1/numgqtests)
if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'5% type I error level',header=TRUE)
a<-table.element(a,numsignificant5)
a<-table.element(a,numsignificant5/numgqtests)
if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'10% type I error level',header=TRUE)
a<-table.element(a,numsignificant10)
a<-table.element(a,numsignificant10/numgqtests)
if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable6.tab')
}
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by