Home » date » 2010 » Nov » 24 »

Workshop 7 Regressiemodel 2

*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 00:41:04 +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/t1290559507dft9bqkn2ly71jm.htm/, Retrieved Wed, 24 Nov 2010 01:45:07 +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/t1290559507dft9bqkn2ly71jm.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 «
14 12 53 18 11 86 11 14 66 12 12 67 16 21 76 18 12 78 14 22 53 14 11 80 15 10 74 15 13 76 17 10 79 19 8 54 10 15 67 16 14 54 18 10 87 14 14 58 14 14 75 17 11 88 14 10 64 16 13 57 18 7 66 11 14 68 14 12 54 12 14 56 17 11 86 9 9 80 16 11 76 14 15 69 15 14 78 11 13 67 16 9 80 13 15 54 17 10 71 15 11 84 14 13 74 16 8 71 9 20 63 15 12 71 17 10 76 13 10 69 15 9 74 16 14 75 16 8 54 12 14 52 12 11 69 11 13 68 15 9 65 15 11 75 17 15 74 13 11 75 16 10 72 14 14 67 11 18 63 12 14 62 12 11 63 15 12 76 16 13 74 15 9 67 12 10 73 12 15 70 8 20 53 13 12 77 11 12 77 14 14 52 15 13 54 10 11 80 11 17 66 12 12 73 15 13 63 15 14 69 14 13 67 16 15 54 15 13 81 15 10 69 13 11 84 12 19 80 17 13 70 13 17 69 15 13 77 13 9 54 15 11 79 16 10 30 15 9 71 16 12 73 15 12 72 14 13 77 15 13 75 14 12 69 13 15 54 7 22 70 17 13 73 13 15 54 15 13 77 14 15 82 13 10 80 16 11 80 12 16 69 14 11 78 17 11 81 15 10 76 17 10 76 12 16 73 16 12 85 11 11 66 etc...
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
Belonging[t] = + 68.6905883670272 + 0.738682252828208Happiness[t] -0.612064171715593Depression[t] -2.79167918844864M1[t] + 1.16668974198661M2[t] + 5.38629689816489M3[t] -0.570072423785216M4[t] + 0.755352844437453M5[t] + 1.11291391479045M6[t] -1.21360489058126M7[t] -4.53924513891819M8[t] -1.68495950612742M9[t] -3.24013500131986M10[t] -0.27755330990375M11[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)68.69058836702729.6529357.11600
Happiness0.7386822528282080.4321761.70920.0895070.044753
Depression-0.6120641717155930.319215-1.91740.0571130.028556
M1-2.791679188448643.994013-0.6990.485670.242835
M21.166689741986613.9720690.29370.7693810.38469
M35.386296898164893.9951491.34820.1796510.089825
M4-0.5700724237852164.000206-0.14250.886870.443435
M50.7553528444374533.9687370.19030.8493150.424657
M61.112913914790454.0048020.27790.7814810.39074
M7-1.213604890581264.041968-0.30030.7644070.382204
M8-4.539245138918194.068388-1.11570.2663440.133172
M9-1.684959506127424.069224-0.41410.6794190.33971
M10-3.240135001319864.063068-0.79750.4264610.213231
M11-0.277553309903754.096768-0.06770.9460770.473038


Multiple Linear Regression - Regression Statistics
Multiple R0.392999624550488
R-squared0.154448704896824
Adjusted R-squared0.0801773073539778
F-TEST (value)2.07951795720182
F-TEST (DF numerator)13
F-TEST (DF denominator)148
p-value0.0184665212073112
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation10.2844671234392
Sum Squared Residuals15653.999073939


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
15368.8956906575865-15.8956906575865
28676.420852771059.57914722894995
36673.6334916422841-7.6334916422841
46769.6399329165934-2.63993291659338
57668.41150965068857.58849034931145
67875.75501277213832.24498722786171
75364.3531232382978-11.3531232382978
88067.760188878832412.2398111211676
97471.9652209361672.03477906383301
107668.57385292582787.42614707417223
117974.8499916380474.15000836195292
125477.8290377970384-23.8290377970384
136764.10476913112682.89523086887323
145473.1072957502469-19.1072957502469
158781.2525240989445.74747590105607
165869.8931690788186-11.8931690788186
177571.21859434704133.78140565295872
188875.628394691025712.3716053089743
196471.697893298885-7.69789329888494
205768.0134250410577-11.0134250410577
216676.0174602097984-10.0174602097984
226865.00705974279932.99294025720066
235471.4098165361313-17.4098165361313
245668.9858769969474-12.9858769969474
258671.723801587786614.2761984122134
268070.99684083902749.00315916097265
277679.1630954215719-3.16309542157191
286969.281104907103-0.281104907103021
297871.95727659986956.04272340013051
306769.9721728306252-2.97217283062524
318073.7873219762576.21267802374305
325464.5732499391418-10.5732499391418
337173.4425854418234-2.4425854418234
348469.79798126925914.2020187307410
357470.79775236441573.20224763558433
367175.6129910385538-4.6129910385538
376360.30576601972062.69423398027940
387173.5927418408498-2.59274184084983
397680.5138418461157-4.51384184611572
406971.6027435128528-2.60274351285278
417475.0175974584475-1.01759745844745
427573.05351992305071.94648007694931
435474.3993861479725-20.3993861479726
445264.4466318580292-12.4466318580292
456969.1371100059668-0.137110005966768
466865.61912391451492.38087608548507
476573.9846913041062-8.98469130410625
487573.03811627057881.96188372942119
497469.27554490092424.72445509907577
507572.7274415069092.27255849309099
517279.7751595932875-7.77515959328751
526769.8931690788186-2.89316907881861
536366.5542909016943-3.55429090169429
546270.0987909117379-8.09879091173786
556369.608464621513-6.60846462151293
567667.8868069599458.11319304005496
577470.86771067384843.13228932615158
586771.0221096126901-4.02210961269013
597371.1565803739061.84341962609397
607068.37381282523181.62618717476818
615359.5670837668924-6.56708376689239
627772.11537733519344.88462266480659
637774.85761998571532.14238001428472
645269.8931690788186-17.8931690788186
655472.5693407715851-18.5693407715851
668070.45761892122829.54238107877178
676665.19739733839120.802602661608828
687365.67076020146047.32923979853959
696370.1290284210202-7.12902842102021
706967.96178875411221.03821124588783
716770.7977523644157-3.79775236441567
725471.3285418365447-17.3285418365447
738169.02230873869911.977691261301
746974.816870184281-5.81687018428101
758476.94704866308737.05295133691271
768065.355483714584214.6445162854158
777074.0467052772415-4.0467052772415
786969.0012806494193-0.00128064941928921
797770.60038303656646.39961696343362
805468.2456349694354-14.2456349694354
817971.35315676445147.6468432355486
823071.1487276938027-41.1487276938027
837173.9846913041062-2.98469130410625
847373.1647343516914-0.164734351691429
857269.63437291041462.36562708958541
867772.2419954163064.75800458369397
877577.2002848253125-2.20028482531252
886971.1172974222498-2.1172974222498
895469.8678479224975-15.8678479224975
907061.50886627387218.49113372612792
917372.07774754222280.922252457777211
925464.5732499391418-10.5732499391418
937770.12902842102026.87097157897979
948266.611042329568415.3889576704316
958071.89526262673438.10473737326576
968073.7767985234076.22320147659298
976964.97006946506764.02993053493241
987873.46612375973724.53387624026279
998179.90177767440011.09822232559988
1007673.08010801850922.91989198149081
1017675.88289779238830.117102207611722
1027368.87466256830674.12533743169332
1038571.951129461110213.0488705388898
1046665.54414212034780.455857879652206
1057968.292835905873410.7071640941266
1066860.4693743785657.53062562143504
1077673.49924521350332.50075478649673
1087169.97779541200091.02220458799915
1095464.1047691311268-10.1047691311268
1104662.5545605161217-16.5545605161217
1118276.5882206535975.41177934640307
1127467.06505814861846.9349418513816
1138872.316104609359915.6838953906401
1143870.9640912456787-32.9640912456787
1157673.42849396676662.57150603323341
1168669.849617556204416.1503824437956
1175468.7782819964764-14.7782819964764
1187067.83517067299962.16482932700044
1196973.246009051278-4.24600905127804
1209069.851177330888220.1488226691118
1215465.5821336367832-11.5821336367832
1227671.62993124459044.37006875540956
1238978.424413168743710.5755868312563
1247674.30423636194041.69576363805962
1257373.7934691150163-0.793469115016269
1267972.67366567971296.32633432028715
1279075.138068400800814.8619315991992
1287470.58829980903263.41170019096736
1298174.30788577576426.69211422423577
1307268.57385292582783.42614707417223
1317171.2831984550186-0.283198455018649
1326663.09744520816922.90255479183076
1337770.85850125384586.14149874615423
1346571.756549325703-6.75654932570305
1357477.8123489970281-3.81234899702811
1368271.37053358447510.6294664155250
1375463.4939700431163-9.49397004311633
1386371.5761554173943-8.57615541739427
1395465.8094615101068-11.8094615101068
1406468.4988711316606-4.49887113166063
1416969.2637280870794-0.263728087079386
1425470.4100454409746-16.4100454409745
1438471.663052698356512.3369473016435
1448671.68736984603514.3126301539650
1457769.63437291041467.36562708958541
1468974.943488265393614.0565117346064
1477678.5510312498563-2.55103124985632
1486068.2891864920496-8.28918649204958
1497571.57742235653163.42257764346835
1507364.82242329467538.17757670532473
1518571.951129461110213.0488705388898
1527963.349121595710715.6508784042893
1537173.3159673607108-2.31596736071078
1547266.96987033905875.03012966094126
1556963.43195606998115.56804393001893
1567867.276302562913210.7236974370868
1575466.3208158896114-12.3208158896114
1586971.6299312445904-2.62993124459044
1598181.3791421800565-0.379142180056540
1608472.214807684568411.7851923154316
1618467.292973154522516.7070268454775
1626969.6133448211349-0.613344821134881


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.9086773035497810.1826453929004380.0913226964502189
180.862312632212490.2753747355750190.137687367787510
190.7829800989534910.4340398020930180.217019901046509
200.847516461537410.3049670769251810.152483538462590
210.8238191198362970.3523617603274060.176180880163703
220.7574526177126290.4850947645747420.242547382287371
230.8103146654725910.3793706690548170.189685334527409
240.8020252793224760.3959494413550480.197974720677524
250.8579765260837330.2840469478325350.142023473916267
260.839602128271310.3207957434573790.160397871728689
270.7871080482714640.4257839034570730.212891951728536
280.7503928283291620.4992143433416750.249607171670838
290.6903649140163820.6192701719672360.309635085983618
300.656149032801630.687701934396740.34385096719837
310.6211179493664420.7577641012671160.378882050633558
320.5854120980187070.8291758039625850.414587901981293
330.5190303751826890.9619392496346220.480969624817311
340.487776683157450.97555336631490.51222331684255
350.4745404029526520.9490808059053050.525459597047348
360.4540970495864530.9081940991729060.545902950413547
370.4275263886814070.8550527773628140.572473611318593
380.3660949876208430.7321899752416850.633905012379158
390.3157775391663180.6315550783326360.684222460833682
400.2627580517105130.5255161034210260.737241948289487
410.2623981990485640.5247963980971270.737601800951436
420.2149844542042250.429968908408450.785015545795775
430.3285711888443250.6571423776886490.671428811155676
440.3209065340729430.6418130681458870.679093465927057
450.2759117264624950.551823452924990.724088273537505
460.2393395448550240.4786790897100490.760660455144976
470.2175738975845060.4351477951690130.782426102415494
480.2447557670500420.4895115341000840.755244232949958
490.2081342316855360.4162684633710710.791865768314464
500.1721254270126450.3442508540252900.827874572987355
510.1520097654114190.3040195308228380.84799023458858
520.1232755268040020.2465510536080050.876724473195998
530.1029796091080870.2059592182161730.897020390891913
540.09820132652227550.1964026530445510.901798673477725
550.0842765202624670.1685530405249340.915723479737533
560.08796684996014170.1759336999202830.912033150039858
570.07391604661840480.1478320932368100.926083953381595
580.07367183685825380.1473436737165080.926328163141746
590.06200536450194540.1240107290038910.937994635498055
600.06374103289851940.1274820657970390.93625896710148
610.05398276188480710.1079655237696140.946017238115193
620.04382426244868540.08764852489737070.956175737551315
630.03580284850099460.07160569700198930.964197151499005
640.05307835100627190.1061567020125440.946921648993728
650.1056060019018220.2112120038036440.894393998098178
660.09881427242483270.1976285448496650.901185727575167
670.09029713337156560.1805942667431310.909702866628434
680.08317973161563570.1663594632312710.916820268384364
690.07207917034916060.1441583406983210.92792082965084
700.05787013403402910.1157402680680580.94212986596597
710.04623307440858280.09246614881716560.953766925591417
720.06505398373263820.1301079674652760.934946016267362
730.07123735670664870.1424747134132970.928762643293351
740.06134693375581910.1226938675116380.93865306624418
750.05558611065982810.1111722213196560.944413889340172
760.09192873034338240.1838574606867650.908071269656618
770.07564854194872780.1512970838974560.924351458051272
780.06012374577974340.1202474915594870.939876254220257
790.05895305312778330.1179061062555670.941046946872217
800.0764516670773670.1529033341547340.923548332922633
810.07028749822033660.1405749964406730.929712501779663
820.6822507717501330.6354984564997340.317749228249867
830.6510879941428340.6978240117143320.348912005857166
840.6449842027777480.7100315944445040.355015797222252
850.6023704144926050.7952591710147910.397629585507395
860.5633382365440060.8733235269119870.436661763455994
870.5172606602937610.9654786794124780.482739339706239
880.4775754598541460.9551509197082920.522424540145854
890.5623087734792550.875382453041490.437691226520745
900.5771120859416840.8457758281166320.422887914058316
910.54273147810830.91453704378340.4572685218917
920.5637309839256320.8725380321487360.436269016074368
930.5372295729148950.925540854170210.462770427085105
940.5986475311761940.8027049376476120.401352468823806
950.5763890078846240.8472219842307510.423610992115376
960.5716975053087870.8566049893824260.428302494691213
970.545231267673370.909537464653260.45476873232663
980.5027241282344120.9945517435311750.497275871765588
990.4539621999851000.9079243999701990.5460378000149
1000.4142263495361870.8284526990723750.585773650463813
1010.3867278261181090.7734556522362170.613272173881891
1020.3653575615260890.7307151230521790.634642438473911
1030.3792926215289090.7585852430578170.620707378471091
1040.3420462814344190.6840925628688390.657953718565581
1050.370924214111250.74184842822250.62907578588875
1060.3842703654468230.7685407308936470.615729634553177
1070.3410608686646090.6821217373292170.658939131335392
1080.3379492523049150.675898504609830.662050747695085
1090.3160143329302130.6320286658604260.683985667069787
1100.3494203035980810.6988406071961620.650579696401919
1110.3154259395764940.6308518791529870.684574060423506
1120.2885346072507280.5770692145014570.711465392749272
1130.3118419665482350.623683933096470.688158033451765
1140.8003263920032450.399347215993510.199673607996755
1150.772398893462160.455202213075680.22760110653784
1160.7866221995765770.4267556008468470.213377800423423
1170.8113504409468290.3772991181063420.188649559053171
1180.7746352524812140.4507294950375730.225364747518786
1190.7713741162251860.4572517675496280.228625883774814
1200.7925160091927640.4149679816144730.207483990807236
1210.7820550824627820.4358898350744370.217944917537218
1220.7393463121944460.5213073756111080.260653687805554
1230.7636487563785970.4727024872428070.236351243621403
1240.7205520489173120.5588959021653760.279447951082688
1250.6944218838145720.6111562323708560.305578116185428
1260.644222414124240.7115551717515210.355777585875760
1270.631547072414550.73690585517090.36845292758545
1280.5793976522957630.8412046954084750.420602347704237
1290.5157740154682770.9684519690634450.484225984531723
1300.4669668289230740.9339336578461480.533033171076926
1310.4446174612501950.8892349225003910.555382538749805
1320.379810172290380.759620344580760.62018982770962
1330.3257894386268320.6515788772536630.674210561373168
1340.3059057634395750.611811526879150.694094236560425
1350.2401428508801280.4802857017602560.759857149119872
1360.2027292410874880.4054584821749770.797270758912512
1370.2578072857288220.5156145714576440.742192714271178
1380.2637827051476720.5275654102953450.736217294852328
1390.3252819525304740.6505639050609490.674718047469526
1400.3851039472349280.7702078944698560.614896052765072
1410.2933795016597320.5867590033194640.706620498340268
1420.4779203328896560.9558406657793110.522079667110344
1430.3798732801541260.7597465603082520.620126719845874
1440.2654795741661620.5309591483323240.734520425833838
1450.2602240628516470.5204481257032940.739775937148353


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


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


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


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


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


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


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


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


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


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


 
Parameters (Session):
par1 = 3 ; par2 = Include Monthly Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 3 ; par2 = Include Monthly 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