Home » date » 2010 » Nov » 26 »

WS8: model 3

*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: Fri, 26 Nov 2010 13:04:18 +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/26/t1290780355oa6lf6ljqyh1o9g.htm/, Retrieved Fri, 26 Nov 2010 15:05:59 +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/26/t1290780355oa6lf6ljqyh1o9g.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 «
2 14 2 18 2 11 1 12 2 16 2 18 2 14 2 14 2 15 2 15 1 17 2 19 1 10 2 16 2 18 1 14 1 14 2 17 1 14 2 16 1 18 2 11 2 14 2 12 1 17 2 9 1 16 2 14 2 15 1 11 2 16 1 13 2 17 2 15 1 14 1 16 1 9 1 15 2 17 1 13 1 15 2 16 1 16 1 12 2 12 2 11 2 15 2 15 2 17 1 13 2 16 1 14 1 11 2 12 1 12 2 15 2 16 2 15 1 12 2 12 1 8 1 13 2 11 2 14 2 15 1 10 2 11 1 12 2 15 1 15 1 14 2 16 2 15 1 15 1 13 2 12 2 17 2 13 1 15 1 13 1 15 1 16 2 15 1 16 2 15 2 14 1 15 2 14 2 13 2 7 2 17 2 13 2 15 2 14 2 13 2 16 2 12 2 14 1 17 1 15 2 17 1 12 2 16 1 11 2 15 1 9 2 16 1 15 1 10 2 10 2 15 2 11 2 13 1 14 2 18 1 16 2 14 2 14 2 14 2 14 2 12 2 14 2 15 2 15 2 15 2 13 1 17 2 17 2 19 2 15 1 13 1 9 2 15 1 15 1 15 2 16 1 11 1 14 2 11 2 15 1 13 2 15 1 16 2 14 1 15 2 16 2 16 1 11 1 12 1 9 2 16 2 13 1 16 2 12 2 9 2 13 2 13 2 14 2 19 2 13 2 12 2 13
 
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 time8 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
y[t] = + 13.4283031142472 + 0.832897843710754x[t] -1.31091204200039M1[t] -0.365009421819613M2[t] + 0.926100187197648M3[t] -0.866154643520036M4[t] -0.348823451910686M5[t] -1.49822113977123M6[t] + 0.49863090992441M7[t] -0.431904701871787M8[t] + 0.983814030091073M9[t] -0.844090480737548M10[t] -0.261872578116706M11[t] -0.00539532330297578t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)13.42830311424720.92342214.541900
x0.8328978437107540.3679012.26390.0250330.012516
M1-1.310912042000390.86543-1.51480.1319680.065984
M2-0.3650094218196130.864442-0.42220.6734560.336728
M30.9261001871976480.8643881.07140.2857360.142868
M4-0.8661546435200360.86529-1.0010.3184610.159231
M5-0.3488234519106860.864331-0.40360.6871070.343554
M6-1.498221139771230.86528-1.73150.0854490.042724
M70.498630909924410.8806160.56620.5720950.286048
M8-0.4319047018717870.881885-0.48980.6250350.312517
M90.9838140300910730.8800661.11790.2654270.132713
M10-0.8440904807375480.880495-0.95870.3392960.169648
M11-0.2618725781167060.881806-0.2970.7669030.383452
t-0.005395323302975780.003778-1.4280.1553890.077694


Multiple Linear Regression - Regression Statistics
Multiple R0.391457433269082
R-squared0.153238922061618
Adjusted R-squared0.0788612598102736
F-TEST (value)2.06028150688278
F-TEST (DF numerator)13
F-TEST (DF denominator)148
p-value0.0197505101968209
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.24355168996005
Sum Squared Residuals744.961579457345


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11413.77779143636530.222208563634675
21814.71829873324313.2817012667569
31116.0040130189574-5.00401301895738
41213.373465021226-1.37346502122596
51614.71829873324311.28170126675691
61813.56350572207964.43649427792042
71415.5549624484722-1.55496244847224
81414.6190315133731-0.619031513373067
91516.029354922033-1.02935492203295
101514.19605508790140.803944912098647
111713.93997982350853.06002017649153
121915.0293549220333.97064507796705
131012.8801497130188-2.88014971301883
141614.65355485360741.34644514639261
151815.93926913932172.06073086067833
161413.30872114159030.691278858409743
171413.82065700989660.179342990103369
181713.49876184244393.50123815755613
191414.6573207251258-0.657320725125775
201614.55428763373741.44571236626264
211815.13171319868652.86828680131351
221114.1313112082656-3.13131120826564
231414.7081337875835-0.70813378758351
241214.9646110423972-2.96461104239724
251712.81540583338314.18459416661688
26914.5888109739717-5.58881097397168
271615.04162741597520.958372584024793
281414.0768751056653-0.0768751056653012
291514.58881097397170.411189026028324
301112.6011201190974-1.6011201190974
311615.42547468920080.57452531079918
321313.6566459103909-0.656645910390893
331715.89986716276151.10013283723847
341514.06656732862990.933432671370065
351413.8104920642370.189507935762953
361614.06696931905081.93303068094922
37912.7506619537474-3.75066195374741
381513.69116925062521.30883074937479
391715.80978138005031.19021861994975
401313.1792333823188-0.179233382318837
411513.69116925062521.30883074937479
421613.36927408317242.63072591682755
431614.52783296585441.47216703414564
441213.5919020307552-1.59190203075518
451215.8351232831258-3.83512328312582
461114.0018234489942-3.00182344899422
471514.57864602831210.421353971687908
481514.83512328312580.164876716874178
491713.51881591782253.48118408217755
501313.6264253709895-0.626425370989503
511615.74503750041450.254962499585457
521413.11448950268310.885510497316871
531113.6264253709895-2.6264253709895
541213.3045302035367-1.30453020353674
551214.4630890862186-2.46308908621865
561514.36005599483020.639944005169771
571615.77037940349010.229620596509888
581513.93707956935851.06292043064148
591213.6810043049656-1.68100430496563
601214.7703794034901-2.77037940349011
61812.621174194476-4.62117419447599
621313.5616814913538-0.561681491353793
631115.6802936207788-4.68029362077883
641413.88264346675820.117356533241827
651514.39457933506450.605420664935452
661012.4068884801903-2.40688848019028
671115.2312430502937-4.23124305029369
681213.4624142714838-1.46241427148376
691515.7056355238544-0.705635523854403
701513.03943784601211.96056215398795
711413.61626042532990.383739574670082
721614.70563552385441.2943644761456
731513.3893281585511.61067184144897
741513.49693761171811.50306238828192
751314.7826518974324-1.78265189743237
761213.8178995871225-1.81789958712246
771714.32983545542882.67016454457116
781313.1750424442653-0.175042444265321
791514.33360132694720.666398673052771
801313.3976703918481-0.397670391848056
811514.80799380050790.192006199492061
821612.97469396637633.02530603362366
831514.3844143894050.615585610595036
841613.80799380050792.19200619949206
851513.32458427891531.67541572108468
861414.2650915757931-0.265091575793129
871514.71790801779670.28209198220334
881413.75315570748680.246844292513246
891314.2650915757931-1.26509157579313
90713.1102985646296-6.11029856462961
911715.10175529102231.89824470897773
921314.1658243559231-1.1658243559231
931515.576147764583-0.576147764582984
941413.74284793045140.257152069548612
951314.3196705097693-1.31967050976925
961614.5761477645831.42385223541702
971213.2598403992796-1.25984039927961
981414.2003476961574-0.200347696157419
991714.6531641381612.34683586183905
1001512.85551398414032.14448601585971
1011714.20034769615742.79965230384258
1021212.2126568412831-0.212656841283147
1031615.03701141138660.962988588613436
1041113.2681826325766-2.26818263257664
1051515.5114038849473-0.511403884947275
106912.8452062071049-3.84520620710493
1071614.25492663013351.74507336986646
1081513.67850604123651.32149395876348
1091012.3621986759332-2.36219867593315
1101014.1356038165217-4.13560381652171
1111515.421318102236-0.421318102235996
1121113.6236679482153-2.62366794821533
1131314.1356038165217-1.13560381652171
1141412.14791296164741.85208703835256
1151814.97226753175093.02773246824915
1161613.20343875294092.79656124705907
1171415.4466600053116-1.44666000531157
1181413.613360171180.386639828820031
1191414.1901827504978-0.190182750497835
1201414.4466600053116-0.446660005311566
1211213.1303526400082-1.13035264000819
1221414.070859936886-0.0708599368860008
1231515.3565742226003-0.356574222600287
1241513.55892406857961.44107593142037
1251514.0708599368860.929140063113999
1261312.91606692572250.0839330742775167
1271714.07462580840442.92537419159561
1281713.9715927170163.02840728298403
1291915.38191612567593.61808387432414
1301513.54861629154431.45138370845574
1311313.2925410271514-0.292541027151372
132913.5490182819651-4.5490182819651
1331513.06560876037251.93439123962751
1341513.17321821353951.82678178646046
1351514.45893249925380.541067500746177
1361613.49418018894392.50581981105608
1371113.1732182135395-2.17321821353954
1381412.0184252023761.98157479762398
1391114.8427797724794-3.84277977247944
1401513.90684883738031.09315116261974
1411314.4842744023294-1.48427440232939
1421513.48387241190851.51612758809145
1431613.22779714751572.77220285248434
1441414.3171722460401-0.317172246040147
1451512.1679670370262.83203296297398
1461613.94137217761462.05862782238542
1471615.22708646332890.772913536671132
1481112.5965384655975-1.59653846559745
1491213.1084743339038-1.10847433390383
150911.9536813227403-2.95368132274031
1511614.77803589284371.22196410715627
1521313.8421049577446-0.842104957744553
1531614.41953052269371.58046947730632
1541213.4191285322728-1.41912853227284
155913.9959511115907-4.9959511115907
1561314.2524283664044-1.25242836640444
1571312.93612100110110.0638789988989338
1581413.87662829797890.123371702021128
1591915.16234258369323.83765741630684
1601313.3646924296725-0.364692429672498
1611213.8766282979789-1.87662829797887
1621312.72183528681540.278164713184645


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.7757050678240970.4485898643518060.224294932175903
180.7461281614826110.5077436770347770.253871838517389
190.6877757843658060.6244484312683880.312224215634194
200.5734684523840910.8530630952318180.426531547615909
210.6638957477541160.6722085044917670.336104252245884
220.7796050555245880.4407898889508230.220394944475412
230.785608160823840.4287836783523190.21439183917616
240.903367184617270.1932656307654610.0966328153827306
250.9592301530417460.08153969391650850.0407698469582542
260.993433306002380.01313338799523840.00656669399761918
270.990097532915550.01980493416890040.00990246708445019
280.9896046467253860.02079070654922910.0103953532746145
290.9842655088438140.03146898231237270.0157344911561863
300.9928275716666480.01434485666670380.00717242833335192
310.9914076977869180.01718460442616470.00859230221308233
320.9868652919401920.02626941611961570.0131347080598078
330.981485831128750.03702833774250020.0185141688712501
340.978196403562810.04360719287437880.0218035964371894
350.9689258044429660.06214839111406750.0310741955570338
360.9622944640237850.07541107195242990.037705535976215
370.9702176598570380.05956468028592320.0297823401429616
380.9646505233175040.07069895336499290.0353494766824964
390.960997827661730.07800434467654150.0390021723382708
400.946841309707960.1063173805840810.0531586902920403
410.9336079731292860.1327840537414270.0663920268707137
420.9298216126392920.1403567747214160.070178387360708
430.9209147863583030.1581704272833950.0790852136416974
440.9054804842358340.1890390315283310.0945195157641656
450.931627706138330.1367445877233390.0683722938616693
460.9277306722426620.1445386555146750.0722693277573375
470.908919602329650.18216079534070.0910803976703502
480.885230409432570.2295391811348590.11476959056743
490.9335476541495440.1329046917009120.0664523458504561
500.9145768760459540.1708462479080930.0854231239540463
510.8939243061324480.2121513877351030.106075693867552
520.8754451942160660.2491096115678690.124554805783934
530.8800356467383710.2399287065232580.119964353261629
540.8761179699901710.2477640600196580.123882030009829
550.8666866485453830.2666267029092350.133313351454617
560.8465212419599710.3069575160800580.153478758040029
570.8178213924782560.3643572150434880.182178607521744
580.8083119698040060.3833760603919880.191688030195994
590.7872759252430380.4254481495139240.212724074756962
600.7917146939354670.4165706121290670.208285306064533
610.8580148859138940.2839702281722110.141985114086106
620.829250537537590.3414989249248190.17074946246241
630.8827592273594890.2344815452810230.117240772640512
640.8600317899660870.2799364200678270.139968210033913
650.8381744205167460.3236511589665080.161825579483254
660.8344593915371250.331081216925750.165540608462875
670.8800069953281390.2399860093437220.119993004671861
680.8624184222093250.275163155581350.137581577790675
690.8365329834497630.3269340331004740.163467016550237
700.8492550476879330.3014899046241340.150744952312067
710.8225639713384650.354872057323070.177436028661535
720.8096613388532610.3806773222934780.190338661146739
730.8096882473588310.3806235052823370.190311752641169
740.800174284487820.399651431024360.19982571551218
750.7905127259057080.4189745481885840.209487274094292
760.7710688198032990.4578623603934030.228931180196701
770.7977712307808740.4044575384382520.202228769219126
780.763384314784370.473231370431260.23661568521563
790.7463596632751160.5072806734497670.253640336724884
800.7113758458919830.5772483082160350.288624154108017
810.6725088758528060.6549822482943880.327491124147194
820.7119578692232180.5760842615535640.288042130776782
830.6763369588879170.6473260822241650.323663041112082
840.6813350194704430.6373299610591140.318664980529557
850.6714321653253360.6571356693493280.328567834674664
860.625753273411950.7484934531761010.374246726588051
870.5890442523754610.8219114952490780.410955747624539
880.5433148386603620.9133703226792760.456685161339638
890.5032525269634370.9934949460731250.496747473036563
900.7524534765608120.4950930468783750.247546523439188
910.745790822564730.5084183548705410.254209177435271
920.7210668034386340.5578663931227320.278933196561366
930.6826099407921480.6347801184157040.317390059207852
940.6384255097615250.723148980476950.361574490238475
950.6025884292074860.7948231415850290.397411570792514
960.5851294317721180.8297411364557640.414870568227882
970.550719367881940.898561264236120.44928063211806
980.5010756997074510.9978486005850990.498924300292549
990.4994042504616850.998808500923370.500595749538315
1000.4978438139474720.9956876278949440.502156186052528
1010.5505493181623190.8989013636753620.449450681837681
1020.4991888236312180.9983776472624360.500811176368782
1030.4572772264336940.9145544528673890.542722773566306
1040.480741102713960.961482205427920.51925889728604
1050.4344430406195760.8688860812391510.565556959380424
1060.5371969127219780.9256061745560440.462803087278022
1070.5285553567462640.9428892865074730.471444643253736
1080.5210482422646070.9579035154707860.478951757735393
1090.5526879999761950.894624000047610.447312000023805
1100.7060959773527890.5878080452944220.293904022647211
1110.6830740564281360.6338518871437290.316925943571864
1120.730908449982070.5381831000358590.26909155001793
1130.6899914148147670.6200171703704660.310008585185233
1140.6585297211485960.6829405577028070.341470278851404
1150.6742072088433830.6515855823132330.325792791156617
1160.6568407843603490.6863184312793010.343159215639651
1170.6714114827536070.6571770344927850.328588517246393
1180.6222194570231960.7555610859536080.377780542976804
1190.5641679775145390.8716640449709220.435832022485461
1200.5112410712579480.9775178574841050.488758928742052
1210.5427044602169280.9145910795661430.457295539783072
1220.5301097315183920.9397805369632160.469890268481608
1230.5653384018232670.8693231963534650.434661598176733
1240.5111177884079340.9777644231841320.488882211592066
1250.4529751238407130.9059502476814270.547024876159287
1260.4093660735694350.818732147138870.590633926430565
1270.470770109919750.94154021983950.52922989008025
1280.4516702634069180.9033405268138360.548329736593082
1290.4415773850104940.8831547700209870.558422614989506
1300.3810729333333260.7621458666666520.618927066666674
1310.316276488085030.6325529761700610.68372351191497
1320.4188269361069550.837653872213910.581173063893045
1330.354376609246950.70875321849390.64562339075305
1340.2906115027222350.581223005444470.709388497277765
1350.2779461213087080.5558922426174160.722053878691292
1360.3100597682367250.6201195364734490.689940231763275
1370.2593782919350310.5187565838700630.740621708064969
1380.2478722982251040.4957445964502080.752127701774896
1390.3399468739492670.6798937478985350.660053126050733
1400.275757655605070.5515153112101410.72424234439493
1410.26582244400350.5316448880070010.7341775559965
1420.2238067057802320.4476134115604630.776193294219768
1430.651030160337360.697939679325280.34896983966264
1440.5274063040563510.9451873918872980.472593695943649
1450.5721190954406410.8557618091187180.427880904559359


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level90.0697674418604651NOK
10% type I error level150.116279069767442NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/26/t1290780355oa6lf6ljqyh1o9g/10or1i1290776646.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t1290780355oa6lf6ljqyh1o9g/10or1i1290776646.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t1290780355oa6lf6ljqyh1o9g/1z8m61290776646.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t1290780355oa6lf6ljqyh1o9g/1z8m61290776646.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t1290780355oa6lf6ljqyh1o9g/2z8m61290776646.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t1290780355oa6lf6ljqyh1o9g/2z8m61290776646.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t1290780355oa6lf6ljqyh1o9g/3ahm91290776646.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t1290780355oa6lf6ljqyh1o9g/3ahm91290776646.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t1290780355oa6lf6ljqyh1o9g/4ahm91290776646.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t1290780355oa6lf6ljqyh1o9g/4ahm91290776646.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t1290780355oa6lf6ljqyh1o9g/5ahm91290776646.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t1290780355oa6lf6ljqyh1o9g/5ahm91290776646.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t1290780355oa6lf6ljqyh1o9g/6k8lb1290776646.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t1290780355oa6lf6ljqyh1o9g/6k8lb1290776646.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t1290780355oa6lf6ljqyh1o9g/7dikf1290776646.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t1290780355oa6lf6ljqyh1o9g/7dikf1290776646.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t1290780355oa6lf6ljqyh1o9g/8dikf1290776646.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t1290780355oa6lf6ljqyh1o9g/8dikf1290776646.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t1290780355oa6lf6ljqyh1o9g/9dikf1290776646.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t1290780355oa6lf6ljqyh1o9g/9dikf1290776646.ps (open in new window)


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