Home » date » 2010 » Dec » 21 »

verbetering WS10 Multiple regression

*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, 21 Dec 2010 08:08:54 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/21/t1292918917bvtlrifaxfpio1f.htm/, Retrieved Tue, 21 Dec 2010 09:08: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/Dec/21/t1292918917bvtlrifaxfpio1f.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 «
25 11 7 8 23 25 17 6 17 8 25 30 18 8 12 9 19 22 16 10 12 7 29 22 20 10 11 4 25 25 16 11 11 11 21 23 18 16 12 7 22 17 17 11 13 7 25 21 30 12 16 10 18 19 23 8 11 10 22 15 18 12 10 8 15 16 21 9 9 9 20 22 31 14 17 11 20 23 27 15 11 9 21 23 21 9 14 13 21 19 16 8 15 9 24 23 20 9 15 6 24 25 17 9 13 6 23 22 25 16 18 16 24 26 26 11 18 5 18 29 25 8 12 7 25 32 17 9 17 9 21 25 32 12 18 12 22 28 22 9 14 9 23 25 17 9 16 5 23 25 20 14 14 10 24 18 29 10 12 8 23 25 23 14 17 7 21 25 20 10 12 8 28 20 11 6 6 4 16 15 26 13 12 8 29 24 22 10 12 8 27 26 14 15 13 8 16 14 19 12 14 7 28 24 20 11 11 8 25 25 28 8 12 7 22 20 19 9 9 7 23 21 30 9 15 9 26 27 29 15 18 11 23 23 26 9 15 6 25 25 23 10 12 8 21 20 21 12 14 9 24 22 28 11 13 6 22 25 23 14 13 10 27 25 18 6 11 8 26 17 20 8 16 10 24 25 21 10 11 5 24 26 28 12 16 14 22 27 10 5 8 6 24 19 22 10 15 6 20 22 31 10 21 12 26 32 29 13 18 12 21 21 22 10 13 8 19 18 23 10 15 10 21 23 20 9 19 10 16 20 18 8 15 10 22 21 25 14 11 5 15 17 21 8 10 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'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
CM[t] = -1.97155708164813 + 0.810124516285502D[t] + 0.251253601241107PE[t] + 0.188518804715737PC[t] -0.115718741599823O[t] + 0.566064813317673PS[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-1.971557081648133.052906-0.64580.5193780.259689
D0.8101245162855020.1303356.215700
PE0.2512536012411070.132761.89250.0603070.030154
PC0.1885188047157370.1682591.12040.2642940.132147
O-0.1157187415998230.103024-1.12320.2631030.131551
PS0.5660648133176730.0958135.90800


Multiple Linear Regression - Regression Statistics
Multiple R0.638102890589065
R-squared0.40717529897812
Adjusted R-squared0.387801942735575
F-TEST (value)21.0172823893021
F-TEST (DF numerator)5
F-TEST (DF denominator)153
p-value5.55111512312578e-16
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation4.47771018087769
Sum Squared Residuals3067.63293498216


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12521.6968275200523.30317247994805
21722.7576275344242-5.75762753442422
31819.475921308563-1.47592130856298
41619.5619453157043-3.56194531570429
52020.9062047066683-0.906204706668275
61622.3667061957279-6.36670619572789
71822.4023995380277-4.40239953802768
81720.5201335863125-3.52013358631251
93022.3274768850327.67252311496805
102315.10357659401447.89642340598557
111819.0918794530003-1.09187945300029
122119.41656627952531.58343372047466
133126.42032009363084.57967990636915
142725.23016665143841.76983334856159
152119.6129963230411.38700367695902
161620.2171532176049-4.21715321760486
172021.5938509463785-1.5938509463785
181719.5088680455431-2.50886804554309
192530.4697362245754-5.46973622457537
202626.7379136808267-0.737913680826713
212524.06521938270930.934780617290697
221723.0090707878074-6.00907078780739
233227.83873005040544.16126994959459
242222.0238725008844-0.0238725008844254
251721.7723044845037-4.77230448450369
262022.1848414522041-2.18484145220414
272922.1429710099726.85702899002803
282326.6826557598034-3.68265575980343
292018.73405323538451.2659467646155
301111.7902591765424-0.790259176542405
312623.31296729591192.68703270408813
322222.2461608568904-0.246160856890359
331421.0281654373449-7.02816543734494
341922.9325499189927-3.93254991899267
352022.4704044418167-2.47040444181673
362817.619597847696710.3804021523033
371918.12630763197670.873692368023276
383023.06009950396146.93990049603859
392927.1345419863581.86545801364201
402621.47813220477874.52186779522133
412319.54408442658333.45591557341675
422122.6403328681881-1.64033286818809
432822.94303025966695.05696974033307
442325.5488853193873-2.54888531938727
451813.7755446122484.22445538775199
462021.7890552501971-1.78905525019705
472121.7765070663015-0.776507066301509
482827.1471956440370.852804355963001
491013.1981887926427-3.1981887926427
502221.16865598911030.83134401088973
513128.77362610842912.22637389157087
522924.8021196150674.19788038493298
532218.89464588438873.10535411561134
542322.37307727969110.626922720308931
552021.4483664364161-1.44836643641609
561819.5049798788849-1.5049798788849
572520.96389048598294.03610951401714
582116.56355472657824.43644527342176
592419.49049875725164.5095012427484
602525.2360293362311-0.23602933623114
611314.5703651925901-1.57036519259012
622818.20363916640489.79636083359519
632528.140636065485-3.14063606548499
64920.7272742072834-11.7272742072834
651617.8284411696244-1.82844116962435
661921.2002096254339-2.20020962543391
672921.62453585610657.37546414389351
681419.0460894061991-5.04608940619911
692226.9144076581427-4.9144076581427
701515.5764012107348-0.576401210734846
711517.452226374503-2.45222637450297
722021.7886208868992-1.78862088689923
731820.2225815390998-2.22258153909977
743325.46684280399097.5331571960091
752223.7824344363272-1.78243443632724
761616.4697006570271-0.469700657027059
771615.0524322615910.94756773840901
781821.1470742942904-3.14707429429043
791823.0959206112274-5.09592061122735
802224.7434940752527-2.74349407525273
813024.72756612386955.27243387613054
823027.27399645056832.72600354943171
832429.9008223341231-5.90082233412311
842125.3787580941457-4.3787580941457
852927.39183778204791.60816221795207
863123.2405082710077.75949172899296
872018.97597105925841.02402894074159
881614.18758051463531.81241948536466
892218.91909894752583.08090105247424
902020.3316462195076-0.331646219507598
912827.32694895773190.673051042268083
923826.595805936383511.4041940636165
932219.33483336442922.66516663557078
942025.6868097712468-5.68680977124681
951718.0421110887897-1.04211108878971
962224.1216672736301-2.12166727363008
973126.08928147235674.91071852764329
982424.9730696546187-0.973069654618683
991819.8643239601547-1.86432396015473
1002322.31781935866780.682180641332218
1011521.6854310399808-6.68543103998085
1021217.8354454157556-5.83544541575557
1031515.3176615872635-0.317661587263507
1042019.77655799733790.223442002662072
1053427.15969310080766.84030689919239
1063120.918508179408110.0814918205919
1071919.2929241504289-0.292924150428892
1082118.26051127813752.73948872186254
1092221.9603148900490.0396851099510343
1102420.31786014721823.68213985278175
1113227.79002272300144.20997727699858
1123323.63621029465559.36378970534448
1131322.0253619285962-9.02536192859621
1142525.8389604910979-0.838960491097936
1152927.0240619141111.97593808588899
1161817.36433131679980.635668683200174
1172022.2065286208074-2.20652862080744
1181520.4502048915139-5.45020489151386
1193328.09940561358314.90059438641692
1202623.24301931189912.75698068810088
1211818.952868498816-0.95286849881596
1222828.9774711402709-0.977471140270934
1231720.1978454987339-3.19784549873386
1241215.4254660880949-3.42546608809486
1251720.7238630018849-3.72386300188489
1262121.3354034468641-0.335403446864113
1271823.0750654036623-5.0750654036623
1281017.9297721146776-7.92977211467762
1292924.22013599709424.77986400290577
1303118.45755519460712.542444805393
1311922.9476672047626-3.94766720476257
132920.0659733838091-11.0659733838091
1331322.7619883304533-9.76198833045328
1341921.4342707638265-2.43427076382648
1352120.73380350547790.266196494522131
1362319.9536344096973.04636559030299
1372120.8235483183180.176451681682021
1381522.8032661951564-7.80326619515638
1391917.65737118191451.3426288180855
1402621.2417390294554.75826097054501
1411617.1052598018456-1.10525980184556
1421918.73149628220690.268503717793141
1433125.19904737841265.8009526215874
1441917.41331147894671.58668852105333
1451516.1706084549776-1.1706084549776
1462321.9846165671171.01538343288295
1471719.5772208157054-2.57722081570542
1482120.11560899930670.884391000693341
1491719.4548480129136-2.45484801291361
1502524.51183550200020.488164497999802
1512015.55841555861624.44158444138375
1521925.4228566000411-6.42285660004114
1532021.9451042791923-1.94510427919232
1541719.0367506268633-2.03675062686334
1552117.04838769011293.95161230988708
1562627.6421945331063-1.64219453310631
1571718.3312627872462-1.33126278724619
1582121.9917911761762-0.991791176176223
1592824.45043191895543.54956808104462


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.886742398997970.226515202004060.11325760100203
100.8474765855703360.3050468288593280.152523414429664
110.8690062408306750.261987518338650.130993759169325
120.7957482312432240.4085035375135510.204251768756776
130.8247220760394620.3505558479210760.175277923960538
140.7689221603875850.462155679224830.231077839612415
150.7030402563700850.593919487259830.296959743629915
160.6596238419559880.6807523160880240.340376158044012
170.5808251795501890.8383496408996210.419174820449811
180.4971829122911410.9943658245822820.502817087708859
190.4798723059940070.9597446119880140.520127694005993
200.4020429677899190.8040859355798380.597957032210081
210.3958444299525890.7916888599051770.604155570047411
220.4184481241158590.8368962482317180.581551875884141
230.4736531565164780.9473063130329560.526346843483522
240.404114704308520.808229408617040.59588529569148
250.3639444369539560.7278888739079130.636055563046043
260.3027573379958590.6055146759917170.697242662004141
270.4235603311705750.847120662341150.576439668829425
280.3742282550170850.748456510034170.625771744982915
290.3449484721499590.6898969442999180.65505152785004
300.31490556014330.62981112028660.6850944398567
310.3054728569740510.6109457139481010.694527143025949
320.2527200122022690.5054400244045380.747279987797731
330.3128743421648740.6257486843297480.687125657835126
340.277157958254350.5543159165086990.72284204174565
350.2425752866190160.4851505732380310.757424713380984
360.5016009902054510.9967980195890970.498399009794549
370.4445325253783770.8890650507567540.555467474621623
380.5305102398967130.9389795202065730.469489760103287
390.5030530569318260.9938938861363480.496946943068174
400.5218709345315830.9562581309368330.478129065468417
410.4945172732442610.9890345464885220.505482726755739
420.4450881286768660.8901762573537320.554911871323134
430.4740709569254660.9481419138509330.525929043074534
440.4328784768464150.865756953692830.567121523153585
450.4069009905392360.8138019810784720.593099009460764
460.3713086173660890.7426172347321790.62869138263391
470.3232695891605270.6465391783210540.676730410839473
480.2780943866276510.5561887732553010.721905613372349
490.2808898300371690.5617796600743380.719110169962831
500.2421068284044630.4842136568089260.757893171595537
510.2118486790262060.4236973580524130.788151320973793
520.2056918512894890.4113837025789770.794308148710511
530.1839647309017810.3679294618035620.816035269098219
540.1523605810726080.3047211621452160.847639418927392
550.1312859155038830.2625718310077660.868714084496117
560.1126720150873550.2253440301747090.887327984912645
570.1119079836961950.223815967392390.888092016303805
580.1048712571078960.2097425142157920.895128742892104
590.09707690414589730.1941538082917950.902923095854103
600.07758583088364450.1551716617672890.922414169116355
610.06527727725666370.1305545545133270.934722722743336
620.1356584747419930.2713169494839850.864341525258007
630.1286037043884920.2572074087769830.871396295611508
640.3324818688939560.6649637377879110.667518131106044
650.2992718708407790.5985437416815580.700728129159221
660.2722773895611760.5445547791223530.727722610438824
670.3675767981360140.7351535962720270.632423201863986
680.3880500868872360.7761001737744710.611949913112764
690.393734477746520.787468955493040.60626552225348
700.3504216601857730.7008433203715460.649578339814227
710.3204354340587180.6408708681174360.679564565941282
720.2848384511308020.5696769022616030.715161548869198
730.2572407663984330.5144815327968660.742759233601567
740.3349224533197890.6698449066395780.665077546680211
750.2995781914744390.5991563829488780.700421808525561
760.2623669135826060.5247338271652110.737633086417394
770.2272594420298440.4545188840596880.772740557970156
780.2107031185041080.4214062370082160.789296881495892
790.2211261154587760.4422522309175520.778873884541224
800.1999204073607970.3998408147215950.800079592639203
810.2124339073882450.424867814776490.787566092611755
820.1914654911405870.3829309822811740.808534508859413
830.2248490217250040.4496980434500070.775150978274996
840.228449789431660.4568995788633210.77155021056834
850.1966602866172910.3933205732345810.80333971338271
860.2576662568147110.5153325136294210.742333743185289
870.2226273849154260.4452547698308510.777372615084574
880.1945934350412570.3891868700825130.805406564958743
890.177591493760670.355182987521340.82240850623933
900.1487789791513570.2975579583027140.851221020848643
910.1234400410364620.2468800820729240.876559958963538
920.3035864784651220.6071729569302440.696413521534878
930.2744135324916970.5488270649833940.725586467508303
940.3050201686830130.6100403373660260.694979831316987
950.2676048406528390.5352096813056770.732395159347161
960.2405769009929720.4811538019859450.759423099007028
970.2349798618025660.4699597236051320.765020138197434
980.2042383380141350.408476676028270.795761661985865
990.1781183156308190.3562366312616390.82188168436918
1000.1485162654103450.297032530820690.851483734589655
1010.1899731178219250.3799462356438490.810026882178075
1020.1975145840048010.3950291680096020.802485415995199
1030.1673560383382370.3347120766764740.832643961661763
1040.1400705138293020.2801410276586030.859929486170698
1050.1721735187103580.3443470374207160.827826481289642
1060.3265732914635650.653146582927130.673426708536435
1070.2851255558572190.5702511117144380.714874444142781
1080.2638174269782160.5276348539564320.736182573021784
1090.2242202279443820.4484404558887630.775779772055618
1100.2124273503385380.4248547006770750.787572649661462
1110.2015588175496890.4031176350993770.798441182450311
1120.3188856969594920.6377713939189840.681114303040508
1130.4432487510429420.8864975020858840.556751248957058
1140.3934189527087810.7868379054175610.606581047291219
1150.3702292965396520.7404585930793040.629770703460348
1160.3219745067534880.6439490135069760.678025493246512
1170.2871554344172230.5743108688344450.712844565582777
1180.2952742909890870.5905485819781750.704725709010913
1190.3156989584992370.6313979169984740.684301041500763
1200.3119625797474570.6239251594949130.688037420252543
1210.2661028387788690.5322056775577380.733897161221131
1220.2453655149544150.490731029908830.754634485045585
1230.2166774862644070.4333549725288140.783322513735593
1240.1894164404470170.3788328808940340.810583559552983
1250.1812901255700270.3625802511400540.818709874429973
1260.1458026234799870.2916052469599740.854197376520013
1270.15092755616630.3018551123325990.8490724438337
1280.2114965286380680.4229930572761360.788503471361932
1290.3488254278787320.6976508557574640.651174572121268
1300.7860077641875130.4279844716249730.213992235812487
1310.7429475744989130.5141048510021750.257052425501087
1320.9188322863424110.1623354273151780.0811677136575888
1330.9755592869072220.04888142618555550.0244407130927777
1340.963011591434260.07397681713147990.03698840856574
1350.9451568687756370.1096862624487260.0548431312243628
1360.9621033747164490.07579325056710250.0378966252835512
1370.9417851605683660.1164296788632670.0582148394316336
1380.962980623882590.07403875223482110.0370193761174105
1390.941454511611540.117090976776920.0585454883884602
1400.9391461527571930.1217076944856140.0608538472428072
1410.9058899211714440.1882201576571120.094110078828556
1420.8597755178718190.2804489642563630.140224482128181
1430.9375074592717230.1249850814565550.0624925407282775
1440.8985881442278910.2028237115442170.101411855772109
1450.8551563061977770.2896873876044460.144843693802223
1460.8056000967833740.3887998064332530.194399903216626
1470.7474960746412670.5050078507174660.252503925358733
1480.6352096681075540.7295806637848920.364790331892446
1490.6415571947106940.7168856105786120.358442805289306
1500.5097908903832760.9804182192334470.490209109616724


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level10.00704225352112676OK
10% type I error level40.028169014084507OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292918917bvtlrifaxfpio1f/1046su1292918923.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292918917bvtlrifaxfpio1f/1046su1292918923.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292918917bvtlrifaxfpio1f/1x5vj1292918923.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292918917bvtlrifaxfpio1f/1x5vj1292918923.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292918917bvtlrifaxfpio1f/2x5vj1292918923.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292918917bvtlrifaxfpio1f/2x5vj1292918923.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292918917bvtlrifaxfpio1f/38edm1292918923.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292918917bvtlrifaxfpio1f/38edm1292918923.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292918917bvtlrifaxfpio1f/48edm1292918923.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292918917bvtlrifaxfpio1f/48edm1292918923.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292918917bvtlrifaxfpio1f/58edm1292918923.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292918917bvtlrifaxfpio1f/58edm1292918923.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292918917bvtlrifaxfpio1f/6i5c61292918923.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292918917bvtlrifaxfpio1f/6i5c61292918923.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292918917bvtlrifaxfpio1f/7twt91292918923.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292918917bvtlrifaxfpio1f/7twt91292918923.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292918917bvtlrifaxfpio1f/8twt91292918923.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292918917bvtlrifaxfpio1f/8twt91292918923.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292918917bvtlrifaxfpio1f/9twt91292918923.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292918917bvtlrifaxfpio1f/9twt91292918923.ps (open in new window)


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