Home » date » 2010 » Nov » 23 »

Mini-Tutorial FMPS - Gender

*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 01:09:50 +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/t12904746075gq8bwgk9g7uqg4.htm/, Retrieved Tue, 23 Nov 2010 02:10:17 +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/t12904746075gq8bwgk9g7uqg4.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 25 11 11 7 7 8 8 25 23 23 0 17 17 6 6 17 17 8 8 30 25 25 0 18 18 8 8 12 12 9 9 22 19 19 0 16 16 10 10 12 12 7 7 22 29 29 0 20 20 10 10 11 11 4 4 25 25 25 0 16 16 11 11 11 11 11 11 23 21 21 0 18 18 16 16 12 12 7 7 17 22 22 0 17 17 11 11 13 13 7 7 21 25 25 0 30 30 12 12 16 16 10 10 19 18 18 0 23 23 8 8 11 11 10 10 15 22 22 0 18 18 12 12 10 10 8 8 16 15 15 0 21 21 9 9 9 9 9 9 22 20 20 0 31 31 14 14 17 17 11 11 23 20 20 0 27 27 15 15 11 11 9 9 23 21 21 0 21 21 9 9 14 14 13 13 19 21 21 0 16 16 8 8 15 15 9 9 23 24 24 0 20 20 9 9 15 15 6 6 25 24 24 0 17 17 9 9 13 13 6 6 22 23 23 0 25 25 16 16 18 18 16 16 26 24 24 0 26 26 11 11 18 18 5 5 29 18 18 0 25 25 8 8 12 12 7 7 32 25 25 0 17 17 9 9 17 17 9 9 25 21 21 0 32 32 12 12 18 18 12 12 28 22 22 0 22 22 9 9 14 14 9 9 25 23 23 0 17 17 9 9 16 16 5 5 25 23 23 0 20 20 14 14 14 14 10 10 18 24 24 0 29 29 10 10 12 12 8 8 25 23 23 0 23 23 14 14 17 17 7 7 25 21 21 0 20 20 10 10 12 12 8 8 20 28 28 0 11 11 6 6 6 6 4 4 15 16 16 0 26 26 13 13 12 12 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 time14 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
PS[t] = + 7.649467706356 -1.23162104238454Gender[t] + 0.252442484510156CM[t] + 0.0447956145838135CM_G[t] -0.183344002951500D[t] -0.130645172512862D_G[t] + 0.573211458789485PE[t] -0.284652770114989PE_G[t] -0.144270406337441PC[t] + 0.110306020586233PC_G[t] + 0.207928610225245O[t] + 0.161964789752105O_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.6494677063562.7744852.75710.0065720.003286
Gender-1.231621042384544.877395-0.25250.8009950.400497
CM0.2524424845101560.174971.44280.1512110.075605
CM_G0.04479561458381350.1138970.39330.6946670.347334
D-0.1833440029515000.345782-0.53020.5967520.298376
D_G-0.1306451725128620.226144-0.57770.5643450.282172
PE0.5732114587894850.3151161.81910.0709390.035469
PE_G-0.2846527701149890.21516-1.3230.1878960.093948
PC-0.1442704063374410.392223-0.36780.7135310.356766
PC_G0.1103060205862330.2775170.39750.6915940.345797
O0.2079286102252450.2243990.92660.3556520.177826
O_G0.1619647897521050.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.11771681221186
23024.69969795905785.3003020409422
32220.67283947823531.32716052176471
42223.2172477003945-1.21724770039454
52522.73996096544012.26003903455985
62319.51969509343203.48030490656795
71719.3385350459549-2.33853504595487
82122.0094817127892-1.00948171278924
91923.7341169344749-4.7341169344749
101522.9461870992115-7.94618709921148
111617.3941561848706-1.39415618487064
122220.75478193400671.24521806599330
132324.3977577855181-1.39775778551813
142321.60128625311071.39871374688932
151922.4316112343517-3.4316112343517
162322.79350634595760.206493654042413
172523.77036272412271.22963727587728
182221.93163764951450.0683623504855256
192623.58466119985342.41533880014655
202923.60609301966845.39390698033159
213225.04079534325966.95920465674041
222522.24419244700412.75580755299586
232826.31735533841881.68264466158119
242523.60449367640521.39550632359480
252522.83127810128922.16872189871083
261821.7760006151216-3.77600061512159
272524.82801820300080.171981796999165
282522.52560393574862.47439606425144
292024.0023423110419-4.00234231104186
301516.5489407322832-1.54894073228324
312425.2136967791899-1.21369677918994
322624.22692510925241.77307489074755
331416.4988057281025-2.49880572810253
342423.68820762411940.311792375880633
352522.29011424697102.70988575302905
362024.8228294406094-4.82282944060945
372121.3379147072532-0.337914707253223
382727.3806373577635-0.380637357763498
392324.8875313004724-1.88753130047238
402525.9236847186639-0.923684718663891
412022.3048028084823-2.30480280848232
422222.7351814508955-0.73518145089549
432524.20338498864210.796615011357936
442523.48883642366111.51116357633895
451723.6354773260822-6.63547732608218
462524.23705304525680.762946954743247
472622.63334127880563.36665872119444
482724.48335679319152.51664320680847
491920.034027614319-1.03402761431901
502222.5712761469369-0.5712761469369
513228.99334525618653.00665474381354
522124.7417584656952-3.74175846569519
531821.5563365981081-3.55633659810815
542323.1025501030034-0.102550103003391
552021.8295927359971-1.82959273599708
562122.6142313584396-1.61423135843962
571719.2372963735278-2.23729637352783
581820.3155783697159-2.31557836971592
591920.9172996003486-1.91729960034863
602222.4071052135827-0.407105213582674
611419.2545777542679-5.25457775426785
621826.5470290665061-8.5470290665061
633523.991131907947311.0088680920527
642918.883085011027310.1169149889727
652122.3522465116134-1.35224651161343
662521.22534675749493.77465324250508
672622.83719972719153.16280027280853
681717.5001681270367-0.500168127036687
692520.48704542767164.51295457232843
702020.3710266060241-0.371026606024127
712221.22329673224720.776703267752824
722422.66000764694831.33999235305170
732123.211232304497-2.21123230449701
742625.21224200879950.787757991200531
752420.77056086541283.22943913458719
761620.5381252902889-4.53812529028889
771820.8620827426893-2.8620827426893
781919.5746801581444-0.574680158144449
792117.48608106518823.51391893481177
802218.67641485437513.32358514562488
812319.64061854866653.35938145133349
822924.92513184570984.0748681542902
832120.33238844104740.667611558952551
842322.47915276999750.520847230002499
852723.09334663301993.90665336698007
862525.665739034365-0.665739034365007
872121.1025899837641-0.102589983764134
881017.5450137047189-7.54501370471889
892022.7748382661863-2.7748382661863
902622.40242636314513.59757363685485
912424.1709732057960-0.170973205796027
922932.039524903068-3.03952490306797
931919.6375594339080-0.637559433907965
942422.86785351639861.13214648360137
951921.1918508495598-2.19185084955978
962222.2332378774937-0.233237877493686
971724.1770748831824-7.17707488318236
982423.18915257569780.810847424302161
991920.1213719624976-1.12137196249761
1001922.2397545862169-3.23975458621689
1012319.01195289827153.98804710172846
1022723.99969846635343.00030153364658
1031415.0272740449087-1.02727404490866
1042223.0668347665731-1.06683476657306
1052122.480071673226-1.48007167322601
1061823.6785415443543-5.67854154435434
1072023.5712368913594-3.57123689135940
1081923.1012937277056-4.10129372770564
1092422.92318700733251.07681299266751
1102526.0974028906659-1.09740289066593
1112924.57029194303654.42970805696352
1122825.00806463768262.99193536231743
1131715.87959474508431.12040525491572
1142922.44707816052616.55292183947392
1152626.9014120632511-0.901412063251071
1161417.8390211128729-3.83902111287286
1172621.69470808580764.30529191419237
1182020.1628931194827-0.162893119482682
1193224.73787797320987.2621220267902
1202321.28606633760281.71393366239721
1212121.9949450332778-0.994945033277756
1223024.69545439984945.30454560015062
1232420.88895785556723.11104214443275
1242222.6345480739457-0.634548073945691
1252422.26111114416451.73888885583555
1262422.42763447522331.57236552477667
1272420.27712560196593.72287439803415
1281918.04925196308420.950748036915772
1293127.81845366597213.18154633402795
1302226.8821117405066-4.88211174050665
1312720.74531009632676.25468990367332
1321917.50946730120921.49053269879080
1332118.44468556362162.55531443637837
1342323.6545548145521-0.654554814552129
1351920.6273326694800-1.62733266948003
1361922.8328678522258-3.83286785222581
1372022.0710595177597-2.07105951775966
1382321.39324534532701.60675465467296
1391720.2204281949549-3.22042819495492
1401722.5158548399329-5.51585483993291
1411719.6490080600547-2.64900806005469
1422124.0813306672545-3.08133066725445
1432123.9449545369319-2.94495453693186
1441820.6650625429321-2.66506254293215
1451920.1098547493404-1.10985474934044
1462024.2900101615384-4.29001016153837
1471517.6814817408554-2.68148174085543
1482421.55555491219712.44444508780294
1492017.93995064964972.06004935035033
1502222.2540686796497-0.25406867964966
1511315.6183134640767-2.61831346407673
1521917.88589379986251.11410620013753
1532121.2774151677470-0.277415167746951
1542322.48369687599430.516303124005700
1551622.0445536366044-6.04455363660442
1562622.07289158947833.92710841052168
1572122.1738873024122-1.17388730241222
1582120.10468558914510.895314410854857
1592423.18820451161000.811795488390046


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
150.9910899284354470.01782014312910540.00891007156455268
160.9789930761537670.04201384769246580.0210069238462329
170.9582323405019660.08353531899606850.0417676594980342
180.9284799737602770.1430400524794460.071520026239723
190.9219148945979650.1561702108040700.0780851054020352
200.9408727456067960.1182545087864090.0591272543932044
210.9676516166485740.06469676670285130.0323483833514256
220.9541071228191710.09178575436165740.0458928771808287
230.9315329853877780.1369340292244450.0684670146122223
240.9008286886933320.1983426226133360.099171311306668
250.8666276132730070.2667447734539850.133372386726993
260.8645066872324540.2709866255350920.135493312767546
270.8216655475927470.3566689048145070.178334452407253
280.7817841672645930.4364316654708140.218215832735407
290.8069567644268970.3860864711462070.193043235573103
300.7645940335754450.470811932849110.235405966424555
310.7150036960600880.5699926078798250.284996303939912
320.665223359444430.6695532811111390.334776640555569
330.6142927271582520.7714145456834960.385707272841748
340.5506093870421390.8987812259157220.449390612957861
350.5283169689454990.9433660621090020.471683031054501
360.6254470780098280.7491058439803430.374552921990172
370.5643906437476080.8712187125047850.435609356252392
380.5088395570037480.9823208859925040.491160442996252
390.466948294109280.933896588218560.53305170589072
400.4274238804641960.8548477609283920.572576119535804
410.3908752351400140.781750470280030.609124764859986
420.3369580030707020.6739160061414030.663041996929298
430.2865077861800030.5730155723600070.713492213819997
440.2519517143830360.5039034287660730.748048285616964
450.3904741840758610.7809483681517230.609525815924139
460.3386030675866090.6772061351732180.661396932413391
470.3304018060441870.6608036120883740.669598193955813
480.3202807385788830.6405614771577670.679719261421117
490.2742916240703540.5485832481407080.725708375929646
500.2369299778135010.4738599556270010.763070022186499
510.2178286772160260.4356573544320510.782171322783974
520.2285800481113170.4571600962226340.771419951888683
530.2257612863858160.4515225727716320.774238713614184
540.1873304454767870.3746608909535740.812669554523213
550.1618906902962470.3237813805924950.838109309703753
560.1358184491857770.2716368983715550.864181550814223
570.1156895631441200.2313791262882410.88431043685588
580.09954429521469060.1990885904293810.90045570478531
590.08452767930802940.1690553586160590.91547232069197
600.06613968610465810.1322793722093160.933860313895342
610.0844773504422510.1689547008845020.915522649557749
620.2537801870533540.5075603741067070.746219812946646
630.7021292261384210.5957415477231580.297870773861579
640.9239344970264530.1521310059470940.076065502973547
650.9082029578965510.1835940842068980.091797042103449
660.9192124399007950.1615751201984110.0807875600992054
670.9184233746268010.1631532507463980.081576625373199
680.8982855573165610.2034288853668780.101714442683439
690.910006700788320.1799865984233590.0899932992116797
700.8890990090561770.2218019818876470.110900990943823
710.8686567982317460.2626864035365070.131343201768254
720.8458434157318280.3083131685363450.154156584268172
730.824269337496930.3514613250061390.175730662503070
740.7967575977333030.4064848045333930.203242402266697
750.7898334112383260.4203331775233470.210166588761674
760.8024100468248460.3951799063503080.197589953175154
770.7883846211675230.4232307576649540.211615378832477
780.7533839317895210.4932321364209580.246616068210479
790.7539014819782020.4921970360435950.246098518021798
800.7380617471950040.5238765056099920.261938252804996
810.7244221802043560.5511556395912870.275577819795644
820.744869339141940.510261321716120.25513066085806
830.7724884214963880.4550231570072250.227511578503612
840.738852375180550.5222952496388990.261147624819450
850.7477066064162850.504586787167430.252293393583715
860.7236713366336890.5526573267326220.276328663366311
870.6817299099743560.6365401800512870.318270090025644
880.784955498359490.4300890032810210.215044501640510
890.7694338389856870.4611323220286270.230566161014313
900.7990465460492170.4019069079015670.200953453950783
910.7772335857884980.4455328284230030.222766414211502
920.753196435829290.4936071283414210.246803564170711
930.712325856919010.575348286161980.28767414308099
940.6687766693251210.6624466613497580.331223330674879
950.627791860221220.744416279557560.37220813977878
960.5794361222898430.8411277554203130.420563877710157
970.6108031917211430.7783936165577140.389196808278857
980.563059882521690.8738802349566210.436940117478311
990.5154197262827150.969160547434570.484580273717285
1000.4933080760481140.9866161520962280.506691923951886
1010.4831562049535270.9663124099070540.516843795046473
1020.4679533483025170.9359066966050330.532046651697484
1030.4209042247794340.8418084495588680.579095775220566
1040.3894791192913440.7789582385826870.610520880708656
1050.3625253520151460.7250507040302930.637474647984854
1060.433324250141310.866648500282620.56667574985869
1070.428895674135220.857791348270440.57110432586478
1080.4314114293317370.8628228586634750.568588570668263
1090.3903700711076530.7807401422153060.609629928892347
1100.3527407320545490.7054814641090970.647259267945451
1110.3681909266559840.7363818533119670.631809073344016
1120.3663249384925140.7326498769850280.633675061507486
1130.3257038791256820.6514077582513640.674296120874318
1140.4485440383779660.8970880767559320.551455961622034
1150.3947966711196650.789593342239330.605203328880335
1160.4061951530916270.8123903061832540.593804846908373
1170.4285637707958360.8571275415916720.571436229204164
1180.3721167197848500.7442334395696990.62788328021515
1190.6212112166464730.7575775667070550.378788783353527
1200.6405588630339350.7188822739321290.359441136966065
1210.5871040629162220.8257918741675570.412895937083778
1220.6251051064369650.749789787126070.374894893563035
1230.6174444495788500.7651111008422990.382555550421150
1240.5554869265145080.8890261469709840.444513073485492
1250.504277768860230.991444462279540.49572223113977
1260.4705499176530210.9410998353060430.529450082346979
1270.4800325126798730.9600650253597460.519967487320127
1280.4126649224145950.825329844829190.587335077585405
1290.635141235341140.729717529317720.36485876465886
1300.5943010029171090.8113979941657820.405698997082891
1310.7994014648230380.4011970703539240.200598535176962
1320.7382036274549240.5235927450901530.261796372545076
1330.6886521006771180.6226957986457650.311347899322882
1340.619324781585880.761350436828240.38067521841412
1350.5429985982799510.9140028034400980.457001401720049
1360.4680367935845620.9360735871691240.531963206415438
1370.3822355398996550.764471079799310.617764460100345
1380.3261071844389640.6522143688779270.673892815561036
1390.2722577657705690.5445155315411390.72774223422943
1400.3083379836165090.6166759672330190.69166201638349
1410.2251189626066460.4502379252132910.774881037393354
1420.1589199816885000.3178399633770000.8410800183115
1430.1161922857274140.2323845714548290.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/23/t12904746075gq8bwgk9g7uqg4/10a0z41290474575.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12904746075gq8bwgk9g7uqg4/10a0z41290474575.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12904746075gq8bwgk9g7uqg4/1wq1v1290474575.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12904746075gq8bwgk9g7uqg4/1wq1v1290474575.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12904746075gq8bwgk9g7uqg4/2wq1v1290474575.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12904746075gq8bwgk9g7uqg4/2wq1v1290474575.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12904746075gq8bwgk9g7uqg4/3wq1v1290474575.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12904746075gq8bwgk9g7uqg4/3wq1v1290474575.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12904746075gq8bwgk9g7uqg4/47zjg1290474575.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12904746075gq8bwgk9g7uqg4/47zjg1290474575.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12904746075gq8bwgk9g7uqg4/57zjg1290474575.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12904746075gq8bwgk9g7uqg4/57zjg1290474575.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12904746075gq8bwgk9g7uqg4/67zjg1290474575.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12904746075gq8bwgk9g7uqg4/67zjg1290474575.ps (open in new window)


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


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


http://www.freestatistics.org/blog/date/2010/Nov/23/t12904746075gq8bwgk9g7uqg4/9a0z41290474575.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12904746075gq8bwgk9g7uqg4/9a0z41290474575.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