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


Multiple Linear Regression - Estimated Regression Equation
PS[t] = + 8.8810887487407 -1.23162104238467Gender[t] + 0.252442484510157CM[t] + 0.0447956145838131CM_G[t] -0.183344002951501D[t] -0.130645172512862D_G[t] + 0.573211458789485PE[t] -0.284652770114989PE_G[t] -0.144270406337447PC[t] + 0.110306020586238PC_G[t] + 0.207928610225239O[t] + 0.161964789752110O_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)8.88108874874076.8470641.29710.1966410.09832
Gender-1.231621042384674.877395-0.25250.8009950.400497
CM0.2524424845101570.174971.44280.1512110.075605
CM_G0.04479561458381310.1138970.39330.6946670.347334
D-0.1833440029515010.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.1442704063374470.392223-0.36780.7135310.356766
PC_G0.1103060205862380.2775170.39750.6915940.345797
O0.2079286102252390.2243990.92660.3556520.177826
O_G0.1619647897521100.1595381.01520.3116730.155837


Multiple Linear Regression - Regression Statistics
Multiple R0.6216762962826
R-squared0.386481417359652
Adjusted R-squared0.340571863556632
F-TEST (value)8.41832223022466
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.88228318778823.11771681221184
23024.69969795905795.30030204094214
32220.67283947823531.32716052176470
42223.2172477003945-1.21724770039453
52522.73996096544022.26003903455985
62319.51969509343213.48030490656795
71719.3385350459548-2.33853504595485
82122.0094817127892-1.00948171278924
91923.7341169344749-4.7341169344749
101522.9461870992115-7.94618709921148
111617.3941561848707-1.39415618487066
122220.75478193400671.24521806599330
132324.3977577855181-1.39775778551813
142321.60128625311071.39871374688932
151922.4316112343517-3.43161123435169
162322.79350634595760.206493654042416
172523.77036272412271.22963727587727
182221.93163764951450.0683623504855226
192623.58466119985342.41533880014656
202923.60609301966845.39390698033157
213225.04079534325966.95920465674042
222522.24419244700412.75580755299586
232826.31735533841881.68264466158119
242523.60449367640521.39550632359481
252522.83127810128922.16872189871082
261821.7760006151216-3.77600061512158
272524.82801820300080.171981796999167
282522.52560393574862.47439606425144
292024.0023423110419-4.00234231104185
301516.5489407322832-1.54894073228325
312425.2136967791899-1.21369677918993
322624.22692510925241.77307489074756
331416.4988057281025-2.49880572810254
342423.68820762411940.31179237588064
352522.29011424697092.70988575302905
362024.8228294406094-4.82282944060945
372121.3379147072532-0.337914707253221
382727.3806373577635-0.38063735776349
392324.8875313004724-1.88753130047237
402525.9236847186639-0.923684718663891
412022.3048028084823-2.30480280848232
422222.7351814508955-0.735181450895486
432524.20338498864210.796615011357932
442523.48883642366101.51116357633896
451723.6354773260822-6.63547732608217
462524.23705304525670.762946954743253
472622.63334127880563.36665872119444
482724.48335679319152.51664320680848
491920.034027614319-1.03402761431901
502222.5712761469369-0.571276146936909
513228.99334525618643.00665474381355
522124.7417584656952-3.74175846569519
531821.5563365981081-3.55633659810815
542323.1025501030034-0.10255010300339
552021.8295927359971-1.82959273599709
562122.6142313584396-1.61423135843962
571719.2372963735279-2.23729637352785
581820.3155783697159-2.31557836971593
591920.9172996003486-1.91729960034864
602222.4071052135827-0.407105213582672
611419.2545777542679-5.25457775426786
621826.5470290665061-8.54702906650608
633523.991131907947311.0088680920527
642918.883085011027310.1169149889727
652122.3522465116134-1.35224651161343
662521.22534675749493.77465324250507
672622.83719972719153.16280027280852
681717.5001681270367-0.500168127036699
692520.48704542767164.51295457232843
702020.3710266060241-0.371026606024123
712221.22329673224720.776703267752821
722422.66000764694831.33999235305170
732123.211232304497-2.211232304497
742625.21224200879950.787757991200536
752420.77056086541283.22943913458719
761620.5381252902889-4.53812529028890
771820.8620827426893-2.86208274268930
781919.5746801581445-0.574680158144457
792117.48608106518823.51391893481175
802218.67641485437513.32358514562487
812319.64061854866653.35938145133348
822924.92513184570984.0748681542902
832120.33238844104750.667611558952548
842322.47915276999750.520847230002503
852723.09334663301993.90665336698007
862525.665739034365-0.665739034365012
872121.1025899837641-0.102589983764137
881017.5450137047189-7.5450137047189
892022.7748382661863-2.7748382661863
902622.40242636314513.59757363685486
912424.1709732057960-0.170973205796026
922932.039524903068-3.03952490306796
931919.637559433908-0.637559433907986
942422.86785351639861.13214648360137
951921.1918508495598-2.19185084955978
962222.2332378774937-0.233237877493683
971724.1770748831824-7.17707488318235
982423.18915257569790.810847424302144
991920.1213719624976-1.12137196249761
1001922.2397545862169-3.2397545862169
1012319.01195289827153.98804710172847
1022723.99969846635343.00030153364658
1031415.0272740449086-1.02727404490862
1042223.0668347665730-1.06683476657305
1052122.480071673226-1.48007167322600
1061823.6785415443543-5.67854154435434
1072023.5712368913594-3.57123689135942
1081923.1012937277056-4.10129372770564
1092422.92318700733251.07681299266752
1102526.0974028906659-1.09740289066594
1112924.57029194303654.42970805696351
1122825.00806463768262.99193536231745
1131715.87959474508431.12040525491573
1142922.44707816052616.55292183947392
1152626.9014120632511-0.901412063251095
1161417.8390211128728-3.83902111287284
1172621.69470808580764.30529191419238
1182020.1628931194827-0.162893119482687
1193224.73787797320987.2621220267902
1202321.28606633760281.71393366239721
1212121.9949450332778-0.994945033277755
1223024.69545439984945.3045456001506
1232420.88895785556723.11104214443277
1242222.6345480739457-0.634548073945693
1252422.26111114416451.73888885583554
1262422.42763447522331.57236552477667
1272420.27712560196593.72287439803414
1281918.04925196308420.95074803691578
1293127.81845366597213.18154633402794
1302226.8821117405066-4.88211174050664
1312720.74531009632676.25468990367333
1321917.50946730120921.49053269879080
1332118.44468556362162.55531443637837
1342323.6545548145521-0.654554814552146
1351920.62733266948-1.62733266948002
1361922.8328678522258-3.83286785222581
1372022.0710595177597-2.07105951775966
1382321.39324534532711.60675465467294
1391720.2204281949549-3.22042819495491
1401722.5158548399329-5.51585483993291
1411719.6490080600547-2.64900806005468
1422124.0813306672545-3.08133066725446
1432123.9449545369319-2.94495453693186
1441820.6650625429321-2.66506254293213
1451920.1098547493404-1.10985474934042
1462024.2900101615384-4.29001016153839
1471517.6814817408554-2.68148174085542
1482421.55555491219712.44444508780294
1492017.93995064964972.06004935035035
1502222.2540686796497-0.254068679649664
1511315.6183134640767-2.61831346407669
1521917.88589379986251.11410620013752
1532121.2774151677469-0.277415167746949
1542322.48369687599430.516303124005703
1551622.0445536366044-6.04455363660442
1562622.07289158947833.92710841052168
1572122.1738873024122-1.17388730241222
1582120.10468558914510.89531441085486
1592423.18820451161000.811795488390044


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
150.9910899284354470.01782014312910540.00891007156455268
160.9789930761537670.04201384769246570.0210069238462329
170.9582323405019660.08353531899606850.0417676594980342
180.9284799737602770.1430400524794460.071520026239723
190.9219148945979650.1561702108040700.0780851054020348
200.9408727456067960.1182545087864080.0591272543932041
210.9676516166485740.06469676670285130.0323483833514256
220.9541071228191720.0917857543616570.0458928771808285
230.9315329853877780.1369340292244440.0684670146122221
240.9008286886933320.1983426226133360.0991713113066681
250.8666276132730070.2667447734539850.133372386726993
260.8645066872324540.2709866255350920.135493312767546
270.8216655475927470.3566689048145070.178334452407253
280.7817841672645940.4364316654708120.218215832735406
290.8069567644268970.3860864711462070.193043235573103
300.7645940335754440.4708119328491110.235405966424556
310.7150036960600880.5699926078798250.284996303939912
320.665223359444430.6695532811111390.334776640555569
330.6142927271582520.7714145456834960.385707272841748
340.5506093870421390.8987812259157230.449390612957861
350.52831696894550.9433660621090.4716830310545
360.6254470780098280.7491058439803430.374552921990172
370.5643906437476070.8712187125047860.435609356252393
380.5088395570037480.9823208859925050.491160442996252
390.4669482941092810.9338965882185610.53305170589072
400.4274238804641960.8548477609283920.572576119535804
410.3908752351400140.781750470280030.609124764859986
420.3369580030707020.6739160061414040.663041996929298
430.2865077861800040.5730155723600080.713492213819996
440.2519517143830370.5039034287660730.748048285616963
450.3904741840758620.7809483681517240.609525815924138
460.3386030675866090.6772061351732190.66139693241339
470.3304018060441870.6608036120883740.669598193955813
480.3202807385788840.6405614771577680.679719261421116
490.2742916240703540.5485832481407070.725708375929646
500.2369299778135010.4738599556270030.763070022186499
510.2178286772160260.4356573544320510.782171322783974
520.2285800481113170.4571600962226340.771419951888683
530.2257612863858170.4515225727716330.774238713614184
540.1873304454767870.3746608909535730.812669554523213
550.1618906902962480.3237813805924950.838109309703752
560.1358184491857770.2716368983715550.864181550814223
570.1156895631441210.2313791262882420.884310436855879
580.09954429521469080.1990885904293820.90045570478531
590.08452767930802990.1690553586160600.91547232069197
600.06613968610465870.1322793722093170.933860313895341
610.08447735044225120.1689547008845020.915522649557749
620.2537801870533520.5075603741067030.746219812946648
630.702129226138420.5957415477231590.297870773861580
640.9239344970264530.1521310059470930.0760655029735466
650.908202957896550.1835940842069000.0917970421034502
660.9192124399007950.1615751201984110.0807875600992054
670.9184233746268010.1631532507463970.0815766253731985
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.7883846211675220.4232307576649550.211615378832478
780.7533839317895210.4932321364209580.246616068210479
790.7539014819782030.4921970360435950.246098518021797
800.7380617471950060.5238765056099890.261938252804994
810.7244221802043560.5511556395912870.275577819795644
820.744869339141940.510261321716120.25513066085806
830.7724884214963880.4550231570072250.227511578503612
840.738852375180550.5222952496388990.261147624819450
850.7477066064162830.5045867871674330.252293393583717
860.7236713366336890.5526573267326220.276328663366311
870.6817299099743560.6365401800512870.318270090025644
880.784955498359490.4300890032810210.215044501640510
890.7694338389856870.4611323220286270.230566161014313
900.7990465460492160.4019069079015680.200953453950784
910.7772335857884980.4455328284230040.222766414211502
920.7531964358292880.4936071283414240.246803564170712
930.712325856919010.575348286161980.28767414308099
940.6687766693251210.6624466613497590.331223330674879
950.627791860221220.744416279557560.37220813977878
960.5794361222898430.8411277554203130.420563877710157
970.6108031917211430.7783936165577140.389196808278857
980.563059882521690.8738802349566210.436940117478311
990.5154197262827140.9691605474345730.484580273717286
1000.4933080760481080.9866161520962150.506691923951892
1010.4831562049535390.9663124099070780.516843795046461
1020.4679533483025020.9359066966050030.532046651697498
1030.4209042247794340.8418084495588690.579095775220566
1040.3894791192913450.778958238582690.610520880708655
1050.3625253520151460.7250507040302930.637474647984854
1060.4333242501413090.8666485002826180.566675749858691
1070.4288956741352220.8577913482704440.571104325864778
1080.4314114293317380.8628228586634760.568588570668262
1090.3903700711076530.7807401422153060.609629928892347
1100.3527407320545520.7054814641091050.647259267945448
1110.3681909266559840.7363818533119670.631809073344016
1120.3663249384925120.7326498769850240.633675061507488
1130.3257038791256830.6514077582513660.674296120874317
1140.4485440383779660.8970880767559320.551455961622034
1150.3947966711196650.7895933422393310.605203328880335
1160.4061951530916270.8123903061832550.593804846908373
1170.4285637707958350.857127541591670.571436229204165
1180.3721167197848500.7442334395696990.62788328021515
1190.6212112166464730.7575775667070550.378788783353527
1200.6405588630339360.7188822739321270.359441136966064
1210.5871040629162220.8257918741675550.412895937083778
1220.6251051064369650.7497897871260690.374894893563034
1230.617444449578850.76511110084230.38255555042115
1240.5554869265145070.8890261469709850.444513073485493
1250.504277768860230.991444462279540.49572223113977
1260.4705499176530220.9410998353060440.529450082346978
1270.4800325126798730.9600650253597460.519967487320127
1280.4126649224145940.8253298448291870.587335077585406
1290.635141235341140.729717529317720.36485876465886
1300.5943010029171090.8113979941657820.405698997082891
1310.7994014648230380.4011970703539240.200598535176962
1320.7382036274549240.5235927450901530.261796372545076
1330.6886521006771160.6226957986457670.311347899322883
1340.619324781585880.761350436828240.38067521841412
1350.5429985982799520.9140028034400970.457001401720048
1360.4680367935845620.9360735871691250.531963206415438
1370.3822355398996550.764471079799310.617764460100345
1380.3261071844389640.6522143688779270.673892815561036
1390.2722577657705690.5445155315411390.72774223422943
1400.3083379836165090.6166759672330190.69166201638349
1410.2251189626066460.4502379252132910.774881037393354
1420.1589199816885000.3178399633770010.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/23/t1290473971z9qcs6jv512b8m2/10wipt1290473975.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290473971z9qcs6jv512b8m2/10wipt1290473975.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290473971z9qcs6jv512b8m2/17hah1290473975.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290473971z9qcs6jv512b8m2/17hah1290473975.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290473971z9qcs6jv512b8m2/27hah1290473975.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290473971z9qcs6jv512b8m2/27hah1290473975.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290473971z9qcs6jv512b8m2/37hah1290473975.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290473971z9qcs6jv512b8m2/37hah1290473975.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290473971z9qcs6jv512b8m2/4zqa21290473975.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290473971z9qcs6jv512b8m2/4zqa21290473975.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290473971z9qcs6jv512b8m2/5zqa21290473975.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290473971z9qcs6jv512b8m2/5zqa21290473975.ps (open in new window)


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


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


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


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