Home » date » 2010 » Nov » 30 »

Personal Standards (Yt)

*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, 30 Nov 2010 11:17:13 +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/30/t1291115783dqvdkbw3p9ha1ix.htm/, Retrieved Tue, 30 Nov 2010 12:16:37 +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/30/t1291115783dqvdkbw3p9ha1ix.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 «
24 24 25 25 30 17 19 18 22 18 22 16 25 20 23 16 17 18 21 17 19 23 19 30 15 23 16 18 23 15 27 12 22 21 14 15 22 20 23 31 23 27 21 34 19 21 18 31 20 19 23 16 25 20 19 21 24 22 22 17 25 24 26 25 29 26 32 25 25 17 29 32 28 33 17 13 28 32 29 25 26 29 25 22 14 18 25 17 26 20 20 15 18 20 32 33 25 29 25 23 23 26 21 18 20 20 15 11 30 28 24 26 26 22 24 17 22 12 14 14 24 17 24 21 24 19 24 18 19 10 31 29 22 31 27 19 19 9 25 20 20 28 21 19 27 30 23 29 25 26 20 23 21 13 22 21 23 19 25 28 25 23 17 18 19 21 25 20 19 23 20 21 26 21 23 15 27 28 17 19 17 26 19 10 17 16 22 22 21 19 32 31 21 31 21 29 18 19 18 22 23 23 19 15 20 20 21 18 20 23 17 25 18 21 19 24 22 25 15 17 14 13 18 28 24 21 35 25 29 9 21 16 25 19 20 17 22 25 13 20 26 29 17 14 25 22 20 15 19 19 21 20 22 15 24 20 21 18 26 33 24 22 16 16 23 17 18 16 16 21 26 26 19 18 21 18 21 17 22 22 23 30 29 30 21 24 21 21 23 21 27 29 25 3 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 time9 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
PS[t] = + 14.5514432169931 + 0.328382757651301x[t] + 1.08162089861099M1[t] + 0.406425419305482M2[t] + 1.80572354132149M3[t] + 1.63550358771727M4[t] + 1.03025002187994M5[t] + 1.85898982437003M6[t] + 2.36391663137686M7[t] + 2.76323282770756M8[t] + 2.13843125245325M9[t] + 1.45968193131887M10[t] + 0.411295472818057M11[t] -0.0112734900892955t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)14.55144321699311.7730898.206800
x0.3283827576513010.0559015.874400
M11.081620898610991.4865410.72760.4680260.234013
M20.4064254193054821.492620.27230.7857860.392893
M31.805723541321491.4864531.21480.2264220.113211
M41.635503587717271.5257931.07190.2855440.142772
M51.030250021879941.5273590.67450.5010480.250524
M61.858989824370031.5323931.21310.2270530.113527
M72.363916631376861.5221661.5530.1226040.061302
M82.763232827707561.5181041.82020.0707930.035396
M92.138431252453251.5140191.41240.1599690.079984
M101.459681931318871.5127990.96490.3362070.168104
M110.4112954728180571.5191870.27070.7869810.39349
t-0.01127349008929550.006674-1.68910.093350.046675


Multiple Linear Regression - Regression Statistics
Multiple R0.483105972728421
R-squared0.233391380885874
Adjusted R-squared0.164660952965297
F-TEST (value)3.39575044048285
F-TEST (DF numerator)13
F-TEST (DF denominator)145
p-value0.000140547979544881
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.85416881771716
Sum Squared Residuals2153.91950494218


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12423.50297680914590.497023190854101
22523.14489059740251.85510940259752
33021.90585316811888.0941468318812
41922.0527424820766-3.05274248207656
52221.43621542614990.56378457385005
62221.59691622324820.40308377675185
72523.40410057077091.59589942922912
82322.47861224640710.52138775359292
91722.4993026963661-5.49930269636609
102121.4808971274911-0.4808971274911
111922.3915337248088-3.39153372480879
121924.2676440654606-5.26764406546056
131523.0393121704231-8.03931217042313
141620.7109294127718-4.71092941277183
152321.11380577174461.88619422825536
162719.94716405509727.05283594490278
172222.2860818180323-0.286081818032306
181421.1332515845253-7.1332515845253
192223.2688186896993-1.26881868969933
202327.2690717301051-4.26907173010505
212325.3194656341562-2.31946563415624
222126.9281221264917-5.92812212649167
231921.5994863284347-2.59948632843465
241824.4607449420403-6.46074494204031
252021.5904992587464-1.59049925874639
262319.91888201639773.08111798360231
272522.62043767892962.3795623210704
281922.7673269928874-3.76732699288738
292422.47918269461211.52081730538794
302221.65473521875640.345264781243643
312524.4470678392330.552932160767008
322625.16349330312570.836506696874298
332924.85580099543344.1441990045666
343223.83739542655848.16260457344159
352520.15067341675794.8493265832421
362924.65384581862014.34615418137993
372826.05257598479311.94742401520694
381718.7984518623722-1.79845186237224
392826.42574888967371.57425111032633
402923.94557614242105.05442385757896
412624.64258011709961.35741988290038
422523.16136712594131.83863287405868
431422.3414894122536-8.34148941225363
442522.40114936084372.59885063915625
452622.75022256845403.24977743154596
462020.4182859689739-0.418285968973859
471821.0005398086403-3.00053980864026
483224.84694669519987.15305330480018
492524.60376307311630.39623692688369
502521.94699755781373.05300244218630
512324.3201704626943-1.32017046269432
522121.5116149577904-0.51161495779039
532021.5518534171664-1.55185341716637
541519.4138749107055-4.41387491070546
553025.49003510769514.5099648923049
562425.2213122986339-1.22131229863391
572623.27170620268512.7282937973149
582420.93976960320493.06023039679508
592218.23819586635833.76180413364169
601418.4723924187536-4.47239241875355
612420.52788810022923.47211189977085
622421.15495016143962.84504983856044
632421.88620927806372.11379072193634
642421.37633307671882.62366692328116
651918.13274395958180.867256040418188
663125.18948266735735.81051733264267
672226.3399014995775-4.33990149957747
682722.78735111400334.21264888599674
691918.86744847214660.13255152785336
702521.78963599508733.21036400491273
712023.3570381077076-3.35703810770758
722119.97902432593851.02097567406149
732724.66158206862452.33841793137548
742323.6467303415784-0.646730341578419
752524.04960670055120.950393299448774
762022.8829649839038-2.88296498390381
772118.98261035146422.01738964853583
782222.4271387250754-0.427138725075379
792322.26402652669030.735973473309696
802525.6075140517934-0.607514051793423
812523.32952519819331.67047480180669
821720.9975885987131-3.99758859871312
831920.9230769230769-1.92307692307692
842520.17212520251834.82787479748173
851922.2276208839939-3.22762088399387
862020.8843863992965-0.884386399296465
872622.27241103122323.72758896877682
882320.12062104162182.87937895837815
892723.77306983516213.22693016483786
901721.6350913287012-4.63509132870123
911724.4274239491779-7.42742394917786
921919.5613425329985-0.561342532998458
931720.8955640135627-3.89556401356266
942222.1758377482468-0.175837748246784
952120.13102952670280.868970473297223
963223.64905365561108.35094634438896
972124.7194010641327-3.71940106413273
982123.3761665794353-2.37616657943533
991821.4803636348490-3.48036363484903
1001822.2840184641094-4.28401846410941
1012321.99587416583411.00412583416591
1021920.1862784170245-1.18627841702448
1032022.3218455221985-2.32184552219851
1042122.0531227131373-1.05312271313732
1052023.0589614360502-3.05896143605022
1061723.0257041401291-6.02570414012914
1071820.6525131609338-2.65251316093383
1081921.2150924709804-2.21509247098038
1092222.6138226371534-0.613822637153377
1101519.3002916065482-4.30029160654817
1111419.3747852078697-5.37478520786968
1121824.1190331289457-6.11903312894567
1132421.20382676945992.79617323054006
1143523.334824112465911.6651758875341
1152918.574353306962710.4256466930373
1162121.2610753167632-0.261075316763173
1172521.61014852437353.38985147562653
1182020.2633601978472-0.263360197847188
1192221.83076231046750.169237689532508
1201319.7662795593036-6.76627955930363
1212623.79207178668702.20792821331296
1221718.1798614525227-1.17986145252272
1232522.19494814565982.80505185434016
1242019.71477539840720.285224601592786
1251920.4117793730858-1.41177937308579
1262121.5576284431379-0.557628443137896
1272220.40936797179891.59063202820108
1282422.43932446629681.56067553370317
1292121.1464838856506-0.146483885650622
1302625.38220243919650.61779756080354
1312420.71033215644203.28966784355796
1321618.3174666476269-2.31746664762688
1332319.71619681379993.28380318620012
1341818.7013450867538-0.701345086753777
1351621.731283506937-5.73128350693699
1362623.19170385150002.80829614850002
1371919.9481147343629-0.948114734362946
1382120.76558104676370.234418953236252
1392120.93085160603000.0691483939700265
1402222.9608081005279-0.96080810052789
1412324.9517950963947-1.95179509639469
1422924.2617722851714.73822771482899
1432121.2318157906731-0.231815790673101
1442119.82409855481181.17590144518816
1452320.89444596333352.10555403666646
1462722.83503905514914.16496094485085
1472524.87982920237850.120170797621541
1482121.0861254245206-0.086125424520628
1491019.1560673379888-9.1560673379888
1502021.9438301962974-1.94383019629741
1512621.78071799791234.21928200208767
1522424.7958227653642-0.795822765364149
1532927.44357527653361.55642472346645
1541921.4994283428891-2.49942834288906
1552419.78300287899634.21699712100365
1561918.37528564313510.624714356864907
1572423.05784338582110.942156614178902
1582220.40107787051851.59892212948151
1591724.7445473213069-7.74454732130691


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.938747178492410.1225056430151790.0612528215075893
180.9120246385615130.1759507228769740.0879753614384872
190.8516690642704180.2966618714591630.148330935729582
200.7958247423238160.4083505153523680.204175257676184
210.8200511558850910.3598976882298170.179948844114909
220.7713240992588820.4573518014822370.228675900741118
230.7201799290295380.5596401419409240.279820070970462
240.6746734856628070.6506530286743870.325326514337193
250.6625329843015950.674934031396810.337467015698405
260.6739683930986050.652063213802790.326031606901395
270.5990616132732980.8018767734534040.400938386726702
280.5584457129083880.8831085741832230.441554287091612
290.5202471625809270.9595056748381460.479752837419073
300.5290930591519960.9418138816960080.470906940848004
310.4663760876123210.9327521752246420.533623912387679
320.4315583189846230.8631166379692460.568441681015377
330.5899680692853190.8200638614293630.410031930714681
340.7986247836655160.4027504326689670.201375216334483
350.8012316035440920.3975367929118160.198768396455908
360.8652774315640640.2694451368718720.134722568435936
370.858642549688250.2827149006235010.141357450311750
380.8715051842993160.2569896314013680.128494815700684
390.8453043892758850.3093912214482310.154695610724115
400.8403103300244740.3193793399510530.159689669975526
410.8013597683158370.3972804633683260.198640231684163
420.7659538083614970.4680923832770060.234046191638503
430.9222511714934040.1554976570131910.0777488285065957
440.9018474146258940.1963051707482110.0981525853741056
450.882701322296750.2345973554064980.117298677703249
460.8672220508100170.2655558983799660.132777949189983
470.8625195088037830.2749609823924340.137480491196217
480.9097193052741770.1805613894516460.0902806947258229
490.8855000057169660.2289999885660680.114499994283034
500.8631660654536930.2736678690926140.136833934546307
510.8764462744337530.2471074511324930.123553725566247
520.8608199449586130.2783601100827750.139180055041387
530.8481344428864280.3037311142271450.151865557113572
540.8609039579300080.2781920841399850.139096042069992
550.8644754818861330.2710490362277340.135524518113867
560.841834253787020.316331492425960.15816574621298
570.8156811655004880.3686376689990230.184318834499512
580.789367701923330.4212645961533390.210632298076670
590.7726392696035740.4547214607928520.227360730396426
600.7975388541195880.4049222917608240.202461145880412
610.7800635890940860.4398728218118280.219936410905914
620.7503598349304010.4992803301391980.249640165069599
630.7288338445126060.5423323109747880.271166155487394
640.6993589690127840.6012820619744320.300641030987216
650.6568647121056340.6862705757887320.343135287894366
660.685070655431350.62985868913730.31492934456865
670.7187214335935160.5625571328129670.281278566406484
680.7120435917672960.5759128164654090.287956408232704
690.6725635906499730.6548728187000540.327436409350027
700.654310212657360.6913795746852790.345689787342640
710.6622691823979740.6754616352040520.337730817602026
720.6169681262618030.7660637474763950.383031873738198
730.5772649915027980.8454700169944050.422735008497202
740.5439465576819070.9121068846361850.456053442318093
750.5263620294381420.9472759411237170.473637970561858
760.5260567680405180.9478864639189640.473943231959482
770.4933600087213910.9867200174427810.506639991278609
780.4463380332657810.8926760665315620.553661966734219
790.3982541328897780.7965082657795570.601745867110222
800.3580861507967960.7161723015935920.641913849203204
810.3235655238402460.6471310476804910.676434476159754
820.3397493193723170.6794986387446340.660250680627683
830.3082132319928320.6164264639856640.691786768007168
840.3270520227625120.6541040455250240.672947977237488
850.3182052480147950.636410496029590.681794751985205
860.2818842495927450.563768499185490.718115750407255
870.315646618024090.631293236048180.68435338197591
880.3136408436647460.6272816873294910.686359156335254
890.3141969467010070.6283938934020130.685803053298993
900.3374754524174630.6749509048349250.662524547582537
910.5140962194464810.9718075611070370.485903780553519
920.4696528821152210.9393057642304410.530347117884779
930.4620250339931360.9240500679862710.537974966006864
940.4162315405056350.832463081011270.583768459494365
950.3698720363822460.7397440727644920.630127963617754
960.5933892167367690.8132215665264630.406610783263231
970.5964309295103160.8071381409793690.403569070489684
980.5635773676949250.872845264610150.436422632305075
990.5574368366811150.8851263266377710.442563163318885
1000.5528330455130740.8943339089738530.447166954486926
1010.527003730708440.945992538583120.47299626929156
1020.4881946011622650.976389202324530.511805398837735
1030.5095548899512830.9808902200974340.490445110048717
1040.4586042396873270.9172084793746530.541395760312673
1050.4392768120794790.8785536241589570.560723187920521
1060.5226437881689530.9547124236620950.477356211831047
1070.5241163277924220.9517673444151560.475883672207578
1080.4840887423901030.9681774847802060.515911257609897
1090.4618030498880860.9236060997761720.538196950111914
1100.5139535707200150.972092858559970.486046429279985
1110.5230097156898540.9539805686202930.476990284310146
1120.7159025709663770.5681948580672450.284097429033623
1130.7077869344302350.584426131139530.292213065569765
1140.9370651542075790.1258696915848430.0629348457924215
1150.9861217433642640.0277565132714720.013878256635736
1160.9793931546517580.04121369069648390.0206068453482420
1170.9795058531236240.04098829375275190.0204941468763760
1180.9700376726835850.05992465463282920.0299623273164146
1190.9647396831402570.0705206337194850.0352603168597425
1200.9911422448114250.01771551037714990.00885775518857494
1210.9898441799006760.02031164019864790.0101558200993240
1220.9883201733839370.02335965323212610.0116798266160631
1230.9953442792807250.009311441438549680.00465572071927484
1240.9921629208100370.01567415837992540.0078370791899627
1250.9887096731033670.02258065379326620.0112903268966331
1260.9818813893696750.03623722126064980.0181186106303249
1270.9722018696332340.05559626073353210.0277981303667660
1280.9621638771462410.07567224570751790.0378361228537590
1290.9520226562042350.09595468759152940.0479773437957647
1300.9501528944304460.09969421113910730.0498471055695537
1310.9256688736352660.1486622527294670.0743311263647336
1320.925223839150430.1495523216991390.0747761608495694
1330.903384742416410.1932305151671780.0966152575835892
1340.8691392499143960.2617215001712070.130860750085604
1350.8227894215167520.3544211569664970.177210578483248
1360.7507074284807740.4985851430384530.249292571519227
1370.7920575470058770.4158849059882450.207942452994123
1380.720487484822120.5590250303557610.279512515177880
1390.6897997590495510.6204004819008970.310200240950449
1400.5616040755697390.8767918488605220.438395924430261
1410.4818815913193320.9637631826386650.518118408680668
1420.4751590264241300.9503180528482610.524840973575870


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level10.00793650793650794OK
5% type I error level100.0793650793650794NOK
10% type I error level160.126984126984127NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291115783dqvdkbw3p9ha1ix/10nv9r1291115821.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291115783dqvdkbw3p9ha1ix/10nv9r1291115821.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291115783dqvdkbw3p9ha1ix/1yctx1291115821.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291115783dqvdkbw3p9ha1ix/1yctx1291115821.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291115783dqvdkbw3p9ha1ix/2yctx1291115821.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291115783dqvdkbw3p9ha1ix/2yctx1291115821.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291115783dqvdkbw3p9ha1ix/3qlt01291115821.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291115783dqvdkbw3p9ha1ix/3qlt01291115821.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291115783dqvdkbw3p9ha1ix/4qlt01291115821.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291115783dqvdkbw3p9ha1ix/4qlt01291115821.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291115783dqvdkbw3p9ha1ix/51ual1291115821.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291115783dqvdkbw3p9ha1ix/51ual1291115821.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291115783dqvdkbw3p9ha1ix/61ual1291115821.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291115783dqvdkbw3p9ha1ix/61ual1291115821.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291115783dqvdkbw3p9ha1ix/7u4r61291115821.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291115783dqvdkbw3p9ha1ix/7u4r61291115821.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291115783dqvdkbw3p9ha1ix/8u4r61291115821.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291115783dqvdkbw3p9ha1ix/8u4r61291115821.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291115783dqvdkbw3p9ha1ix/9u4r61291115821.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291115783dqvdkbw3p9ha1ix/9u4r61291115821.ps (open in new window)


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