Home » date » 2010 » Dec » 21 »

paper - MR seasonal dummies non-linear

*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 13:35:36 +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/t1292938592u8mjp4naeyzmpnx.htm/, Retrieved Tue, 21 Dec 2010 14:36:45 +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/t1292938592u8mjp4naeyzmpnx.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 «
11974 10106 12069 11412 11180 10508 11288 10928 10199 11030 11234 13747 13912 12376 12264 11675 11271 10672 10933 10379 10187 10747 10970 12175 14200 11676 11258 10872 11148 10690 10684 11658 10178 10981 10773 11665 11359 10716 12928 12317 11641 10459 10953 10703 10703 11101 11334 13268 13145 12334 13153 11289 11374 10914 11299 11284 10694 11077 11104 12820 14915 11773 11608 11468 11511 11200 11164 10960 10667 11556 11372 12333 13102 11115 12572 11557 12059 11420 11185 11113 10706 11523 11391 12634 13469 11735 13281 11968 11623 11084 11509 11134 10438 11530 11491 13093 13106 11305 13113 12203 11309 11088 11234 11619 10942 11445 11291 13281 13726 11300 11983 11092 11093 10692 10786 11166 10553 11103 10969 12090 12544 12264 13783 11214 11453 10883 10381 10348 10024 10805 10796 11907 12261 11377 12689 11474 10992 10764 12164 10409 10398 10349 10865 11630 12221 10884 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'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Aantal[t] = + 12487.4666666667 + 656.13333333334M1[t] -1018.40000000000M2[t] -64.4666666666648M3[t] -1030.8M4[t] -1190.73333333333M5[t] -1721.13333333333M6[t] -1454.73333333333M7[t] -1632.53333333334M8[t] -2088.46666666667M9[t] -1389.86666666667M10[t] -1387.73333333333M11[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)12487.4666666667137.43645990.859900
M1656.13333333334194.3645043.37580.0009140.000457
M2-1018.40000000000194.364504-5.239600
M3-64.4666666666648194.364504-0.33170.7405450.370272
M4-1030.8194.364504-5.303400
M5-1190.73333333333194.364504-6.126300
M6-1721.13333333333194.364504-8.855200
M7-1454.73333333333194.364504-7.484600
M8-1632.53333333334194.364504-8.399300
M9-2088.46666666667194.364504-10.745100
M10-1389.86666666667194.364504-7.150800
M11-1387.73333333333194.364504-7.139800


Multiple Linear Regression - Regression Statistics
Multiple R0.834192323463965
R-squared0.695876832526209
Adjusted R-squared0.675964006084472
F-TEST (value)34.9461606850389
F-TEST (DF numerator)11
F-TEST (DF denominator)168
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation532.289116898187
Sum Squared Residuals47599726.2666664


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11197413143.5999999999-1169.59999999989
21010611469.0666666667-1363.06666666666
31206912423-354.000000000007
41141211456.6666666667-44.6666666666724
51118011296.7333333333-116.733333333331
61050810766.3333333333-258.333333333342
71128811032.7333333333255.266666666661
81092810854.933333333373.0666666666557
91019910399-199.999999999996
101103011097.6-67.6000000000049
111123411099.7333333333134.266666666663
121374712487.46666666671259.53333333333
131391213143.6768.399999999992
141237611469.0666666667906.933333333333
151226412423-158.999999999999
161167511456.6666666667218.333333333334
171127111296.7333333333-25.7333333333337
181067210766.3333333333-94.3333333333327
191093311032.7333333333-99.7333333333329
201037910854.9333333333-475.933333333333
211018710399-212.000000000000
221074711097.6-350.6
231097011099.7333333333-129.733333333333
241217512487.4666666667-312.466666666667
251420013143.61056.39999999999
261167611469.0666666667206.933333333333
271125812423-1165
281087211456.6666666667-584.666666666666
291114811296.7333333333-148.733333333334
301069010766.3333333333-76.3333333333327
311068411032.7333333333-348.733333333333
321165810854.9333333333803.066666666668
331017810399-221.000000000000
341098111097.6-116.600000000000
351077311099.7333333333-326.733333333333
361166512487.4666666667-822.466666666667
371135913143.6-1784.60000000001
381071611469.0666666667-753.066666666667
391292812423505.000000000001
401231711456.6666666667860.333333333334
411164111296.7333333333344.266666666666
421045910766.3333333333-307.333333333333
431095311032.7333333333-79.7333333333329
441070310854.9333333333-151.933333333333
451070310399304
461110111097.63.40000000000036
471133411099.7333333333234.266666666667
481326812487.4666666667780.533333333333
491314513143.61.39999999999199
501233411469.0666666667864.933333333333
511315312423730
521128911456.6666666667-167.666666666666
531137411296.733333333377.2666666666664
541091410766.3333333333147.666666666667
551129911032.7333333333266.266666666667
561128410854.9333333333429.066666666668
571069410399295
581107711097.6-20.5999999999996
591110411099.73333333334.26666666666686
601282012487.4666666667332.533333333333
611491513143.61771.39999999999
621177311469.0666666667303.933333333333
631160812423-815
641146811456.666666666711.3333333333337
651151111296.7333333333214.266666666666
661120010766.3333333333433.666666666667
671116411032.7333333333131.266666666667
681096010854.9333333333105.066666666667
691066710399268.000000000000
701155611097.6458.4
711137211099.7333333333272.266666666667
721233312487.4666666667-154.466666666667
731310213143.6-41.600000000008
741111511469.0666666667-354.066666666667
751257212423149.000000000001
761155711456.6666666667100.333333333334
771205911296.7333333333762.266666666667
781142010766.3333333333653.666666666668
791118511032.7333333333152.266666666667
801111310854.9333333333258.066666666667
811070610399307
821152311097.6425.400000000000
831139111099.7333333333291.266666666667
841263412487.4666666667146.533333333333
851346913143.6325.399999999992
861173511469.0666666667265.933333333333
871328112423858.000000000001
881196811456.6666666667511.333333333334
891162311296.7333333333326.266666666666
901108410766.3333333333317.666666666667
911150911032.7333333333476.266666666667
921113410854.9333333333279.066666666667
93104381039938.9999999999996
941153011097.6432.400000000000
951149111099.7333333333391.266666666667
961309312487.4666666667605.533333333333
971310613143.6-37.600000000008
981130511469.0666666667-164.066666666667
991311312423690
1001220311456.6666666667746.333333333334
1011130911296.733333333312.2666666666664
1021108810766.3333333333321.666666666667
1031123411032.7333333333201.266666666667
1041161910854.9333333333764.066666666668
1051094210399543
1061144511097.6347.400000000000
1071129111099.7333333333191.266666666667
1081328112487.4666666667793.533333333333
1091372613143.6582.399999999992
1101130011469.0666666667-169.066666666667
1111198312423-439.999999999999
1121109211456.6666666667-364.666666666666
1131109311296.7333333333-203.733333333334
1141069210766.3333333333-74.3333333333327
1151078611032.7333333333-246.733333333333
1161116610854.9333333333311.066666666667
1171055310399154.000000000000
1181110311097.65.40000000000036
1191096911099.7333333333-130.733333333333
1201209012487.4666666667-397.466666666668
1211254413143.6-599.600000000008
1221226411469.0666666667794.933333333333
12313783124231360
1241121411456.6666666667-242.666666666666
1251145311296.7333333333156.266666666666
1261088310766.3333333333116.666666666667
1271038111032.7333333333-651.733333333333
1281034810854.9333333333-506.933333333333
1291002410399-375
1301080511097.6-292.600000000000
1311079611099.7333333333-303.733333333333
1321190712487.4666666667-580.466666666668
1331226113143.6-882.600000000008
1341137711469.0666666667-92.0666666666667
1351268912423266.000000000001
1361147411456.666666666717.3333333333337
1371099211296.7333333333-304.733333333334
1381076410766.3333333333-2.33333333333276
1391216411032.73333333331131.26666666667
1401040910854.9333333333-445.933333333333
1411039810399-1.00000000000038
1421034911097.6-748.6
1431086511099.7333333333-234.733333333333
1441163012487.4666666667-857.466666666667
1451222113143.6-922.600000000008
1461088411469.0666666667-585.066666666667
1471201912423-403.999999999999
1481102111456.6666666667-435.666666666666
1491079911296.7333333333-497.733333333334
1501042310766.3333333333-343.333333333333
1511048411032.7333333333-548.733333333333
1521045010854.9333333333-404.933333333333
153990610399-493
1541104911097.6-48.5999999999997
1551128111099.7333333333181.266666666667
1561248512487.4666666667-2.46666666666728
1571284913143.6-294.600000000008
1581138011469.0666666667-89.0666666666667
1591207912423-343.999999999999
1601136611456.6666666667-90.6666666666663
1611132811296.733333333331.2666666666664
1621044410766.3333333333-322.333333333333
1631085411032.7333333333-178.733333333333
1641043410854.9333333333-420.933333333333
1651013710399-262.000000000000
1661099211097.6-105.600000000000
1671090611099.7333333333-193.733333333333
1681236712487.4666666667-120.466666666667
1691437113143.61227.39999999999
1701169511469.0666666667225.933333333333
1711154612423-877
1721092211456.6666666667-534.666666666666
1731067011296.7333333333-626.733333333334
1741025410766.3333333333-512.333333333333
1751057311032.7333333333-459.733333333333
1761023910854.9333333333-615.933333333332
1771025310399-146.000000000000
1781117611097.678.4000000000003
1791071911099.7333333333-380.733333333333
1801181712487.4666666667-670.466666666667


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
150.9988430894222060.002313821155587040.00115691057779352
160.9970344316939730.005931136612054370.00296556830602718
170.993160373943110.01367925211378020.00683962605689011
180.9862381020642040.02752379587159270.0137618979357964
190.9762910604658680.04741787906826350.0237089395341317
200.9665801522969450.066839695406110.033419847703055
210.9457319543290270.1085360913419470.0542680456709733
220.9209126557493030.1581746885013940.0790873442506972
230.8878119218894120.2243761562211750.112188078110588
240.9473111588885420.1053776822229150.0526888411114575
250.9751514999069770.04969700018604560.0248485000930228
260.9663257186025740.06734856279485140.0336742813974257
270.976901206563420.04619758687315910.0230987934365795
280.9752655015660620.04946899686787650.0247344984339382
290.963718461777950.07256307644410030.0362815382220502
300.9483667493088610.1032665013822770.0516332506911386
310.9358013319924160.1283973360151680.0641986680075838
320.9527361850927750.09452762981445050.0472638149072252
330.9355057120152610.1289885759694780.0644942879847389
340.9137645690932060.1724708618135870.0862354309067937
350.8936540356845120.2126919286309760.106345964315488
360.9402217750847010.1195564498305970.0597782249152986
370.9966120597358380.006775880528323260.00338794026416163
380.9969111623393280.006177675321343560.00308883766067178
390.9978153160217980.004369367956404750.00218468397820237
400.998661825684140.002676348631721280.00133817431586064
410.9982386538548770.003522692290245390.00176134614512269
420.9974771618722820.005045676255435870.00252283812771793
430.9962160068495230.007567986300953570.00378399315047679
440.9946905467462270.01061890650754610.00530945325377304
450.993486331570250.01302733685949920.00651366842974958
460.9908128322504340.01837433549913250.00918716774956624
470.987965957495510.02406808500897890.0120340425044895
480.9899134115959620.02017317680807620.0100865884040381
490.986526900233150.02694619953369890.0134730997668494
500.9923061211290050.01538775774199010.00769387887099506
510.9947175675563630.01056486488727350.00528243244363674
520.9928279389482370.01434412210352640.00717206105176322
530.9899801131261950.02003977374760930.0100198868738046
540.9868896272646140.02622074547077280.0131103727353864
550.9833936521286340.03321269574273240.0166063478713662
560.9805208067026560.03895838659468830.0194791932973442
570.976146943506060.04770611298787840.0238530564939392
580.9686414000082720.06271719998345640.0313585999917282
590.959061287745890.0818774245082180.040938712254109
600.9504823061689030.09903538766219480.0495176938310974
610.996910897309960.006178205380081980.00308910269004099
620.9960232329599450.007953534080110220.00397676704005511
630.9971828249569270.005634350086146060.00281717504307303
640.9959900952999280.008019809400143250.00400990470007163
650.9946136813357410.01077263732851770.00538631866425884
660.993975182695460.01204963460908140.00602481730454068
670.9918066615669290.01638667686614240.00819333843307121
680.9889857554129450.02202848917410970.0110142445870548
690.9861001037998820.02779979240023660.0138998962001183
700.98497642380150.03004715239699990.0150235761984999
710.981302903413460.03739419317308080.0186970965865404
720.9767988367197280.04640232656054420.0232011632802721
730.9699547536859550.06009049262809090.0300452463140454
740.9650394233368890.06992115332622210.0349605766631110
750.957122746436910.0857545071261790.0428772535630895
760.9460326837655620.1079346324688770.0539673162344384
770.9564348686460430.08713026270791380.0435651313539569
780.9606880838514460.07862383229710760.0393119161485538
790.950859534700640.09828093059871760.0491404652993588
800.9415958493114690.1168083013770630.0584041506885314
810.9319459972713430.1361080054573130.0680540027286566
820.9258851846512290.1482296306975430.0741148153487714
830.9138120586498810.1723758827002390.0861879413501193
840.897467189862570.2050656202748590.102532810137430
850.884967864716720.230064270566560.11503213528328
860.8672926597577360.2654146804845270.132707340242264
870.900297216415420.1994055671691590.0997027835845793
880.899340151054660.2013196978906810.100659848945340
890.889144783204420.2217104335911610.110855216795580
900.8756452256675110.2487095486649770.124354774332489
910.8716684558192450.2566630883615110.128331544180755
920.8567654376421290.2864691247157420.143234562357871
930.8301861261540160.3396277476919670.169813873845984
940.8214823679514640.3570352640970730.178517632048536
950.8093869823906270.3812260352187450.190613017609373
960.8272794681396690.3454410637206630.172720531860331
970.798081681245160.4038366375096790.201918318754840
980.7676061369874150.4647877260251710.232393863012585
990.7918548407235030.4162903185529940.208145159276497
1000.8364528241002550.327094351799490.163547175899745
1010.8112539288351920.3774921423296160.188746071164808
1020.7972390043795310.4055219912409370.202760995620469
1030.7723443928068940.4553112143862120.227655607193106
1040.833159084351210.3336818312975780.166840915648789
1050.8435875183715270.3128249632569470.156412481628473
1060.8341826844900160.3316346310199670.165817315509984
1070.8127504431532940.3744991136934120.187249556846706
1080.8865054319854070.2269891360291870.113494568014593
1090.9078811768977270.1842376462045460.0921188231022728
1100.8897431214943650.2205137570112710.110256878505635
1110.8830336805494210.2339326389011570.116966319450579
1120.866930958011080.2661380839778410.133069041988920
1130.8434848581811310.3130302836377380.156515141818869
1140.8154890932355980.3690218135288030.184510906764401
1150.786890978431260.4262180431374810.213109021568741
1160.80242481493790.3951503701241980.197575185062099
1170.7811415944047320.4377168111905360.218858405595268
1180.7485000839222040.5029998321555920.251499916077796
1190.7104439584002750.5791120831994490.289556041599725
1200.6877308850206660.6245382299586680.312269114979334
1210.6816983400898520.6366033198202960.318301659910148
1220.7490969318567710.5018061362864570.250903068143229
1230.9526017491758720.09479650164825510.0473982508241276
1240.9399738892987060.1200522214025880.0600261107012941
1250.93497667899530.1300466420093980.065023321004699
1260.9254236138476740.1491527723046510.0745763861523256
1270.9345494361071260.1309011277857470.0654505638928735
1280.9237993989189440.1524012021621120.076200601081056
1290.9079312470931330.1841375058137330.0920687529068667
1300.886844670044150.2263106599117010.113155329955850
1310.86327929272040.2734414145591990.136720707279600
1320.847777145692440.3044457086151200.152222854307560
1330.8935070155550220.2129859688899570.106492984444979
1340.865652761525860.2686944769482810.134347238474140
1350.8857376247595660.2285247504808670.114262375240434
1360.866760897869050.2664782042618990.133239102130949
1370.8367834454783450.3264331090433090.163216554521655
1380.8137363866873730.3725272266252550.186263613312627
1390.9670091897207640.06598162055847140.0329908102792357
1400.9563491789572310.08730164208553720.0436508210427686
1410.9445301222485810.1109397555028370.0554698777514187
1420.9590389486114040.08192210277719170.0409610513885959
1430.9436047691181280.1127904617637450.0563952308818724
1440.9523015094912360.09539698101752720.0476984905087636
1450.9951012540748550.009797491850289770.00489874592514489
1460.9965158111657120.006968377668576590.00348418883428830
1470.9946897446412430.01062051071751400.00531025535875698
1480.9915400020509040.01691999589819120.00845999794909561
1490.9874015803621010.02519683927579710.0125984196378985
1500.979981084010420.04003783197916150.0200189159895808
1510.9716935949444270.05661281011114660.0283064050555733
1520.9573693453914350.08526130921712990.0426306546085649
1530.9427766385144610.1144467229710780.0572233614855388
1540.9133772387412290.1732455225175430.0866227612587714
1550.9002373780471770.1995252439056450.0997626219528227
1560.8760800417196380.2478399165607240.123919958280362
1570.9937872503969760.01242549920604760.00621274960302379
1580.9898211137979650.02035777240406950.0101788862020348
1590.9903345492528570.01933090149428530.00966545074714264
1600.988278314690030.02344337061994240.0117216853099712
1610.995415402768330.009169194463340340.00458459723167017
1620.9891896384603550.02162072307929030.0108103615396451
1630.9796006547753430.04079869044931440.0203993452246572
1640.9526787191772350.09464256164553040.0473212808227652
1650.8811956095089930.2376087809820140.118804390491007


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level160.105960264900662NOK
5% type I error level540.357615894039735NOK
10% type I error level750.496688741721854NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292938592u8mjp4naeyzmpnx/10jt1d1292938524.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292938592u8mjp4naeyzmpnx/10jt1d1292938524.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292938592u8mjp4naeyzmpnx/251l41292938524.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292938592u8mjp4naeyzmpnx/251l41292938524.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292938592u8mjp4naeyzmpnx/351l41292938524.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292938592u8mjp4naeyzmpnx/351l41292938524.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292938592u8mjp4naeyzmpnx/451l41292938524.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292938592u8mjp4naeyzmpnx/451l41292938524.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292938592u8mjp4naeyzmpnx/551l41292938524.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292938592u8mjp4naeyzmpnx/551l41292938524.ps (open in new window)


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


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


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


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


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