Home » date » 2010 » Nov » 24 »

*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, 24 Nov 2010 15:09:48 +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/24/t1290611289guc3peb0batgqy2.htm/, Retrieved Wed, 24 Nov 2010 16:08:09 +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/24/t1290611289guc3peb0batgqy2.htm/},
    year = {2010},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2010},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
0 25 0 11 0 7 0 8 0 25 23 0 0 17 0 6 0 17 0 8 0 30 25 0 0 18 0 8 0 12 0 9 0 22 19 0 0 16 0 10 0 12 0 7 0 22 29 0 0 20 0 10 0 11 0 4 0 25 25 0 0 16 0 11 0 11 0 11 0 23 21 0 0 18 0 16 0 12 0 7 0 17 22 0 0 17 0 11 0 13 0 7 0 21 25 0 0 30 0 12 0 16 0 10 0 19 18 0 0 23 0 8 0 11 0 10 0 15 22 0 0 18 0 12 0 10 0 8 0 16 15 0 0 21 0 9 0 9 0 9 0 22 20 0 0 31 0 14 0 17 0 11 0 23 20 0 0 27 0 15 0 11 0 9 0 23 21 0 0 21 0 9 0 14 0 13 0 19 21 0 0 16 0 8 0 15 0 9 0 23 24 0 0 20 0 9 0 15 0 6 0 25 24 0 0 17 0 9 0 13 0 6 0 22 23 0 0 25 0 16 0 18 0 16 0 26 24 0 0 26 0 11 0 18 0 5 0 29 18 0 0 25 0 8 0 12 0 7 0 32 25 0 0 17 0 9 0 17 0 9 0 25 21 0 0 32 0 12 0 18 0 12 0 28 22 0 0 22 0 9 0 14 0 9 0 25 23 0 0 17 0 9 0 16 0 5 0 25 23 0 0 20 0 14 0 14 0 10 0 18 24 0 0 29 0 10 0 12 0 8 0 25 23 0 0 23 0 14 0 17 0 7 0 25 21 0 0 20 0 10 0 12 0 8 0 20 28 0 0 11 0 6 0 6 0 4 0 15 16 0 0 26 0 13 0 12 0 8 0 24 29 0 0 22 0 10 0 12 0 8 0 26 27 0 0 14 0 15 0 13 0 8 0 14 16 0 0 19 0 12 0 14 0 7 0 24 28 0 0 20 0 11 0 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 time8 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
PS[t] = + 7.64946770635602 -1.23162104238459Gender[t] + 0.297238099093969CM[t] + 0.0447956145838136CM_G[t] -0.313989175464361D[t] -0.130645172512864D_G[t] + 0.288558688674496PE[t] -0.284652770114991PE_G[t] -0.0339643857512098PC[t] + 0.110306020586238PC_G[t] + 0.369893399977349O[t] + 0.161964789752108O_G[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.649467706356022.7744852.75710.0065720.003286
Gender-1.231621042384594.877395-0.25250.8009950.400497
CM0.2972380990939690.0766863.87610.000168e-05
CM_G0.04479561458381360.1138970.39330.6946670.347334
D-0.3139891754643610.151023-2.07910.0393470.019674
D_G-0.1306451725128640.226144-0.57770.5643450.282172
PE0.2885586886744960.1329212.17090.0315430.015772
PE_G-0.2846527701149910.21516-1.3230.1878960.093948
PC-0.03396438575120980.160025-0.21220.832210.416105
PC_G0.1103060205862380.2775170.39750.6915940.345797
O0.3698933999773490.0911094.05998e-054e-05
O_G0.1619647897521080.1595381.01520.3116730.155837


Multiple Linear Regression - Regression Statistics
Multiple R0.6216762962826
R-squared0.386481417359652
Adjusted R-squared0.340571863556632
F-TEST (value)8.41832223022465
F-TEST (DF numerator)11
F-TEST (DF denominator)147
p-value2.19315676730503e-11
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.42438888696967
Sum Squared Residuals1723.78656963260


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12521.88228318778813.11771681221192
23024.69969795905785.30030204094217
32220.67283947823531.32716052176471
42223.2172477003945-1.21724770039454
52522.73996096544022.26003903455985
62319.51969509343203.48030490656795
71719.3385350459549-2.33853504595486
82122.0094817127892-1.00948171278925
91923.7341169344749-4.7341169344749
101522.9461870992115-7.94618709921147
111617.3941561848707-1.39415618487066
122220.75478193400671.24521806599331
132324.3977577855181-1.39775778551813
142321.60128625311071.39871374688932
151922.4316112343517-3.43161123435168
162322.79350634595760.206493654042417
172523.77036272412271.22963727587727
182221.93163764951450.0683623504855215
192623.58466119985342.41533880014656
202923.60609301966845.39390698033157
213225.04079534325966.95920465674041
222522.24419244700412.75580755299586
232826.31735533841881.68264466158119
242523.60449367640521.39550632359481
252522.83127810128922.16872189871082
261821.7760006151216-3.77600061512159
272524.82801820300080.171981796999167
282522.52560393574862.47439606425143
292024.0023423110419-4.00234231104186
301516.5489407322832-1.54894073228325
312425.2136967791899-1.21369677918994
322624.22692510925241.77307489074756
331416.4988057281025-2.49880572810254
342423.68820762411940.311792375880633
352522.29011424697102.70988575302905
362024.8228294406094-4.82282944060945
372121.3379147072532-0.337914707253222
382727.3806373577635-0.380637357763492
392324.8875313004724-1.88753130047238
402525.9236847186639-0.923684718663894
412022.3048028084823-2.30480280848232
422222.7351814508955-0.735181450895489
432524.20338498864210.79661501135793
442523.48883642366101.51116357633895
451723.6354773260822-6.63547732608217
462524.23705304525670.762946954743253
472622.63334127880563.36665872119444
482724.48335679319152.51664320680848
491920.034027614319-1.03402761431901
502222.5712761469369-0.571276146936908
513228.99334525618653.00665474381355
522124.7417584656952-3.74175846569519
531821.5563365981081-3.55633659810815
542323.1025501030034-0.102550103003389
552021.8295927359971-1.82959273599708
562122.6142313584396-1.61423135843961
571719.2372963735278-2.23729637352785
581820.3155783697159-2.31557836971592
591920.9172996003486-1.91729960034863
602222.4071052135827-0.407105213582673
611419.2545777542679-5.25457775426786
621826.5470290665061-8.54702906650608
633523.991131907947311.0088680920527
642918.883085011027310.1169149889727
652122.3522465116134-1.35224651161343
662521.22534675749493.77465324250508
672622.83719972719153.16280027280852
681717.5001681270367-0.500168127036698
692520.48704542767164.51295457232843
702020.3710266060241-0.371026606024125
712221.22329673224720.776703267752819
722422.66000764694831.3399923530517
732123.211232304497-2.211232304497
742625.21224200879950.787757991200532
752420.77056086541283.22943913458719
761620.5381252902889-4.5381252902889
771820.8620827426893-2.86208274268930
781919.5746801581445-0.57468015814446
792117.48608106518823.51391893481176
802218.67641485437513.32358514562488
812319.64061854866653.35938145133348
822924.92513184570984.0748681542902
832120.33238844104740.667611558952558
842322.47915276999750.520847230002501
852723.09334663301993.90665336698006
862525.665739034365-0.665739034365009
872121.1025899837641-0.102589983764136
881017.5450137047189-7.5450137047189
892022.7748382661863-2.77483826618630
902622.40242636314513.59757363685486
912424.1709732057960-0.170973205796031
922932.039524903068-3.03952490306797
931919.637559433908-0.63755943390798
942422.86785351639861.13214648360138
951921.1918508495598-2.19185084955978
962222.2332378774937-0.233237877493685
971724.1770748831824-7.17707488318235
982423.18915257569790.810847424302147
991920.1213719624976-1.12137196249761
1001922.2397545862169-3.23975458621690
1012319.01195289827153.98804710172846
1022723.99969846635343.00030153364658
1031415.0272740449086-1.02727404490865
1042223.0668347665730-1.06683476657305
1052122.480071673226-1.480071673226
1061823.6785415443543-5.67854154435434
1072023.5712368913594-3.57123689135941
1081923.1012937277056-4.10129372770564
1092422.92318700733251.07681299266752
1102526.0974028906659-1.09740289066594
1112924.57029194303654.42970805696352
1122825.00806463768262.99193536231744
1131715.87959474508431.12040525491573
1142922.44707816052616.55292183947392
1152626.9014120632511-0.901412063251076
1161417.8390211128729-3.83902111287285
1172621.69470808580764.30529191419237
1182020.1628931194827-0.162893119482684
1193224.73787797320987.2621220267902
1202321.28606633760281.71393366239721
1212121.9949450332778-0.994945033277758
1223024.69545439984945.3045456001506
1232420.88895785556723.11104214443276
1242222.6345480739457-0.634548073945696
1252422.26111114416451.73888885583554
1262422.42763447522331.57236552477667
1272420.27712560196593.72287439803414
1281918.04925196308420.95074803691578
1293127.81845366597213.18154633402794
1302226.8821117405067-4.88211174050666
1312720.74531009632676.25468990367332
1321917.50946730120921.4905326987908
1332118.44468556362162.55531443637838
1342323.6545548145521-0.654554814552138
1351920.6273326694800-1.62733266948002
1361922.8328678522258-3.83286785222581
1372022.0710595177597-2.07105951775965
1382321.39324534532701.60675465467295
1391720.2204281949549-3.22042819495492
1401722.5158548399329-5.51585483993291
1411719.6490080600547-2.64900806005468
1422124.0813306672545-3.08133066725446
1432123.9449545369319-2.94495453693186
1441820.6650625429321-2.66506254293214
1451920.1098547493404-1.10985474934043
1462024.2900101615384-4.29001016153838
1471517.6814817408554-2.68148174085542
1482421.55555491219712.44444508780293
1492017.93995064964972.06004935035033
1502222.2540686796497-0.254068679649658
1511315.6183134640767-2.61831346407671
1521917.88589379986251.11410620013753
1532121.2774151677469-0.277415167746945
1542322.48369687599430.516303124005703
1551622.0445536366044-6.04455363660443
1562622.07289158947833.92710841052169
1572122.1738873024122-1.17388730241223
1582120.10468558914510.895314410854858
1592423.18820451161000.811795488390044


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
150.9910899284354470.01782014312910540.00891007156455272
160.9789930761537670.04201384769246580.0210069238462329
170.9582323405019660.08353531899606840.0417676594980342
180.9284799737602770.1430400524794470.0715200262397233
190.9219148945979640.1561702108040720.0780851054020359
200.9408727456067950.1182545087864100.0591272543932048
210.9676516166485740.06469676670285130.0323483833514256
220.9541071228191720.09178575436165660.0458928771808283
230.9315329853877780.1369340292244440.0684670146122219
240.9008286886933320.1983426226133360.0991713113066681
250.8666276132730070.2667447734539860.133372386726993
260.8645066872324540.2709866255350920.135493312767546
270.8216655475927460.3566689048145070.178334452407254
280.7817841672645940.4364316654708120.218215832735406
290.8069567644268960.3860864711462090.193043235573104
300.7645940335754450.4708119328491110.235405966424555
310.7150036960600860.5699926078798280.284996303939914
320.6652233594444310.6695532811111380.334776640555569
330.6142927271582530.7714145456834950.385707272841747
340.5506093870421420.8987812259157170.449390612957858
350.5283169689455010.9433660621089990.471683031054499
360.6254470780098260.7491058439803480.374552921990174
370.5643906437476040.8712187125047910.435609356252396
380.5088395570037470.9823208859925060.491160442996253
390.4669482941092780.9338965882185550.533051705890722
400.4274238804641970.8548477609283940.572576119535803
410.3908752351400160.7817504702800320.609124764859984
420.3369580030707020.6739160061414030.663041996929298
430.2865077861800010.5730155723600010.713492213819999
440.2519517143830350.503903428766070.748048285616965
450.3904741840758630.7809483681517270.609525815924137
460.3386030675866070.6772061351732140.661396932413393
470.3304018060441880.6608036120883760.669598193955812
480.3202807385788850.640561477157770.679719261421115
490.2742916240703520.5485832481407050.725708375929648
500.2369299778134990.4738599556269980.763070022186501
510.2178286772160250.4356573544320500.782171322783975
520.2285800481113150.4571600962226310.771419951888685
530.2257612863858140.4515225727716270.774238713614187
540.1873304454767870.3746608909535740.812669554523213
550.1618906902962480.3237813805924960.838109309703752
560.1358184491857760.2716368983715530.864181550814224
570.1156895631441220.2313791262882440.884310436855878
580.0995442952146910.1990885904293820.900455704785309
590.0845276793080290.1690553586160580.915472320691971
600.06613968610465860.1322793722093170.933860313895341
610.08447735044225220.1689547008845040.915522649557748
620.2537801870533560.5075603741067120.746219812946644
630.7021292261384270.5957415477231470.297870773861573
640.9239344970264530.1521310059470940.0760655029735472
650.9082029578965510.1835940842068980.091797042103449
660.9192124399007940.1615751201984110.0807875600992057
670.91842337462680.1631532507463980.0815766253731991
680.8982855573165620.2034288853668760.101714442683438
690.9100067007883210.1799865984233580.089993299211679
700.8890990090561770.2218019818876470.110900990943823
710.8686567982317480.2626864035365050.131343201768252
720.8458434157318270.3083131685363450.154156584268173
730.8242693374969320.3514613250061360.175730662503068
740.7967575977333030.4064848045333930.203242402266697
750.7898334112383270.4203331775233470.210166588761673
760.8024100468248450.3951799063503110.197589953175155
770.7883846211675230.4232307576649540.211615378832477
780.7533839317895220.4932321364209560.246616068210478
790.7539014819782030.4921970360435950.246098518021797
800.7380617471950060.5238765056099890.261938252804994
810.7244221802043560.5511556395912880.275577819795644
820.744869339141940.5102613217161190.255130660858060
830.7724884214963870.4550231570072260.227511578503613
840.7388523751805490.5222952496389020.261147624819451
850.7477066064162840.5045867871674320.252293393583716
860.723671336633690.5526573267326190.276328663366309
870.6817299099743540.6365401800512920.318270090025646
880.784955498359490.430089003281020.21504450164051
890.7694338389856890.4611323220286230.230566161014311
900.7990465460492160.4019069079015680.200953453950784
910.77723358578850.4455328284229990.222766414211500
920.753196435829290.4936071283414190.246803564170709
930.7123258569190110.5753482861619790.287674143080989
940.6687766693251210.6624466613497570.331223330674879
950.6277918602212210.7444162795575590.372208139778779
960.5794361222898430.8411277554203140.420563877710157
970.6108031917211420.7783936165577150.389196808278858
980.5630598825216890.8738802349566210.436940117478311
990.5154197262827140.9691605474345720.484580273717286
1000.4933080760481130.9866161520962250.506691923951887
1010.4831562049535240.9663124099070480.516843795046476
1020.4679533483025180.9359066966050360.532046651697482
1030.4209042247794360.8418084495588730.579095775220564
1040.3894791192913420.7789582385826830.610520880708658
1050.3625253520151430.7250507040302870.637474647984857
1060.433324250141310.866648500282620.56667574985869
1070.4288956741352230.8577913482704450.571104325864777
1080.4314114293317380.8628228586634770.568588570668262
1090.3903700711076510.7807401422153020.609629928892349
1100.3527407320545510.7054814641091030.647259267945449
1110.3681909266559830.7363818533119670.631809073344017
1120.3663249384925120.7326498769850240.633675061507488
1130.3257038791256790.6514077582513580.674296120874321
1140.4485440383779670.8970880767559330.551455961622033
1150.3947966711196650.7895933422393290.605203328880335
1160.4061951530916280.8123903061832560.593804846908372
1170.4285637707958340.8571275415916680.571436229204166
1180.3721167197848510.7442334395697020.627883280215149
1190.6212112166464730.7575775667070540.378788783353527
1200.6405588630339350.718882273932130.359441136966065
1210.5871040629162230.8257918741675530.412895937083777
1220.6251051064369660.7497897871260680.374894893563034
1230.6174444495788510.7651111008422970.382555550421149
1240.5554869265145080.8890261469709830.444513073485492
1250.5042777688602290.9914444622795420.495722231139771
1260.4705499176530220.9410998353060430.529450082346979
1270.4800325126798730.9600650253597450.519967487320127
1280.4126649224145960.8253298448291930.587335077585404
1290.635141235341140.7297175293177190.364858764658859
1300.594301002917110.811397994165780.40569899708289
1310.7994014648230380.4011970703539240.200598535176962
1320.7382036274549230.5235927450901530.261796372545077
1330.6886521006771160.6226957986457670.311347899322884
1340.6193247815858820.7613504368282360.380675218414118
1350.5429985982799510.9140028034400980.457001401720049
1360.468036793584560.936073587169120.53196320641544
1370.3822355398996550.764471079799310.617764460100345
1380.3261071844389640.6522143688779270.673892815561036
1390.2722577657705680.5445155315411370.727742234229432
1400.308337983616510.616675967233020.69166201638349
1410.2251189626066450.4502379252132910.774881037393355
1420.1589199816885000.3178399633769990.8410800183115
1430.1161922857274140.2323845714548280.883807714272586
1440.06795274302209460.1359054860441890.932047256977905


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


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290611289guc3peb0batgqy2/1vs3k1290611376.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290611289guc3peb0batgqy2/1vs3k1290611376.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290611289guc3peb0batgqy2/2o1251290611376.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290611289guc3peb0batgqy2/2o1251290611376.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290611289guc3peb0batgqy2/3o1251290611376.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290611289guc3peb0batgqy2/3o1251290611376.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290611289guc3peb0batgqy2/4o1251290611376.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290611289guc3peb0batgqy2/4o1251290611376.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290611289guc3peb0batgqy2/5ysjq1290611376.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290611289guc3peb0batgqy2/5ysjq1290611376.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290611289guc3peb0batgqy2/6ysjq1290611376.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290611289guc3peb0batgqy2/6ysjq1290611376.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290611289guc3peb0batgqy2/7r2jb1290611376.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290611289guc3peb0batgqy2/7r2jb1290611376.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290611289guc3peb0batgqy2/8r2jb1290611376.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290611289guc3peb0batgqy2/8r2jb1290611376.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290611289guc3peb0batgqy2/9kt0e1290611376.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290611289guc3peb0batgqy2/9kt0e1290611376.ps (open in new window)


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