Home » date » 2010 » Dec » 25 »

*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: Sat, 25 Dec 2010 21:49:52 +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/25/t1293313664boe59h7wai2k3h3.htm/, Retrieved Sat, 25 Dec 2010 22:47:54 +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/25/t1293313664boe59h7wai2k3h3.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 24 14 11 12 24 26 2 25 11 7 8 25 23 2 17 6 17 8 30 25 1 18 12 10 8 19 23 2 18 8 12 9 22 19 2 16 10 12 7 22 29 2 20 10 11 4 25 25 2 16 11 11 11 23 21 2 18 16 12 7 17 22 2 17 11 13 7 21 25 1 23 13 14 12 19 24 2 30 12 16 10 19 18 1 23 8 11 10 15 22 2 18 12 10 8 16 15 2 15 11 11 8 23 22 1 12 4 15 4 27 28 1 21 9 9 9 22 20 2 15 8 11 8 14 12 1 20 8 17 7 22 24 2 31 14 17 11 23 20 1 27 15 11 9 23 21 2 34 16 18 11 21 20 2 21 9 14 13 19 21 2 31 14 10 8 18 23 1 19 11 11 8 20 28 2 16 8 15 9 23 24 1 20 9 15 6 25 24 2 21 9 13 9 19 24 2 22 9 16 9 24 23 1 17 9 13 6 22 23 2 24 10 9 6 25 29 1 25 16 18 16 26 24 2 26 11 18 5 29 18 2 25 8 12 7 32 25 1 17 9 17 9 25 21 1 32 16 9 6 29 26 1 33 11 9 6 28 22 1 13 16 12 5 17 22 2 32 12 18 12 28 22 1 25 12 12 7 29 23 1 29 14 18 10 26 30 2 22 9 14 9 25 23 1 18 10 15 8 14 17 1 17 9 16 5 25 23 2 20 10 10 8 26 23 2 15 12 11 8 20 25 2 20 14 14 10 18 24 2 33 14 9 6 32 24 2 29 10 12 8 25 23 1 23 14 17 7 25 21 2 26 16 5 4 23 24 1 18 9 12 8 21 2 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
R Framework
error message
The field 'Names of X columns' contains a hard return which cannot be interpreted.
Please, resubmit your request without hard returns in the 'Names of X columns'.


Multiple Linear Regression - Estimated Regression Equation
COM[t] = -1.7649397925982 -0.131393212690805G[t] + 0.812849739916336DA[t] + 0.248453306620111PE[t] + 0.190333948740536PC[t] + 0.56590043905433PS[t] -0.115683772583743`O `[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-1.76493979259823.278744-0.53830.5911590.29558
G-0.1313932126908050.744476-0.17650.8601430.430072
DA0.8128497399163360.1316586.173900
PE0.2484533066201110.1341241.85240.0659050.032953
PC0.1903339487405360.1691071.12550.2621410.13107
PS0.565900439054330.0961235.887300
`O `-0.1156837725837430.103352-1.11930.264770.132385


Multiple Linear Regression - Regression Statistics
Multiple R0.638198057370523
R-squared0.407296760431509
Adjusted R-squared0.383900579922227
F-TEST (value)17.4086860147926
F-TEST (DF numerator)6
F-TEST (DF denominator)152
p-value2.88657986402541e-15
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation4.49195510423555
Sum Squared Residuals3067.00442008711


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12424.9429963486835-0.942996348683526
22521.66224986429713.33775013570287
31722.6806688810207-5.68066888102073
41819.9564501024386-1.95645010243861
51819.4213348995612-1.4213348995612
61619.5095287560754-3.50952875607535
72020.8505100107316-0.850510010731619
81622.326631604058-6.32663160405802
91822.3669114083879-4.36691140838794
101720.4676664538925-3.46766645389246
112322.40876509121380.59123490878619
123022.27486348986837.72513651013172
132315.18625436324097.8137456367591
141819.0528257532548-1.05282575325478
151521.6399459852527-6.63994598525266
161217.8833675707623-5.88336757076228
172119.50453415972431.49546584027573
181515.2651305398521-0.265130539852115
192019.83590788495280.164092115047226
203126.37158443611144.62841556388857
212725.32875587893311.67124412106691
223427.11393634445566.88606365554445
232119.56335818534941.43664181465057
243120.884855930526210.1151440694738
251919.379535245278-0.379535245278019
261620.1541763955571-4.15417639555715
272021.6592183800513-1.65921838005134
282118.20651776601592.79348223398406
292221.89706365373170.10293634626833
301719.5802942222319-2.58029422223187
312420.27153620463753.72846379536251
322530.5637664057857-5.56376640578572
332626.6662550100328-0.666255010032789
342524.0055687571210.994431242879025
351723.0741781572644-6.0741781572644
363227.89068093079494.10931906920513
373323.72326688249389.27673311750617
381322.1176367235977-9.11763672359767
393227.78280686174364.21719313825643
402525.9220271574816-0.922027157481621
412927.10196059800741.89803940199263
422221.96605747954580.033942520454222
431817.43761759593730.56238240406268
441721.8330215105147-4.83302151051466
452022.1606604832955-2.16066048329547
461520.4080430902548-5.40804309025478
472022.1436532819039-2.14365328190394
483328.06265710060194.93734289939813
492922.09166665748146.90833334251864
502326.757758959365-3.75775895936501
512623.22077150498412.77922849501595
521819.0309246014548-1.03092460145476
532018.81513881198181.18486118801821
541111.7389940806761-0.738994080676102
552829.0393609676901-1.03936096769013
562623.27021280267362.72978719732643
572222.1948320062007-0.194832006200714
581720.1319892269372-3.13198922693725
591215.5047881422787-3.50478814227875
601420.9892502421717-6.98925024217171
611720.8032760947745-3.80327609477454
622121.4092610676731-0.409261067673128
631922.8796194998407-3.87961949984067
641823.0451523878524-5.04515238785238
651017.8768088703137-7.87680887031366
662924.30516407024634.69483592975366
673118.404128781281812.5958712187182
681923.0218318601521-4.02183186015208
69920.0258711870156-11.0258711870156
702022.5560887583009-2.5560887583009
712817.693208018911010.3067919810890
721918.07952129274680.92047870725317
733022.99926034652337.00073965347668
742927.21722937758751.78277062241255
752621.54353460746764.4564653925324
762319.49353200737723.50646799262281
771322.7158817249009-9.71588172490093
782122.5912216095481-1.59122160954805
791921.5259492231535-2.52594922315349
802823.01937879181134.98062120818872
812325.6408449436037-2.64084494360372
821813.84895277370084.15104722629917
832120.68610058219190.313899417808100
842021.8561577417173-1.85615774171726
852319.92011281978373.07988718021631
862120.76280970728220.237190292717795
872121.8538213838010-0.853821383801031
881522.7718021836752-7.77180218367525
892827.10066770693010.899332293069908
901917.60549674147371.39450325852634
912621.19708494536854.80291505463146
921013.1418504270284-3.14185042702843
931617.0609511188811-1.06095111888111
942221.10570868044890.894291319551144
951918.68469466187370.315305338126314
963128.70333396765362.29666603234642
973125.16103635757535.83896364242468
982924.75003730086334.24996269913666
991917.48994065330251.51005934669754
1002218.97294519374693.02705480625307
1012322.31726114188160.682738858118413
1021516.2398076637836-1.23980766378359
1032021.3789421742014-1.37894217420142
1041819.5754702240473-1.57547022404732
1052321.95167537723351.04832462276645
1062521.05327034523113.94672965476891
1072116.51152617779014.48847382220993
1082419.56939888070104.43060111929903
1092525.3244868239239-0.324486823923942
1101719.5347608742898-2.53476087428981
1111314.5134634896455-1.51346348964549
1122818.14412935312729.85587064687279
1132120.07275998270690.927240017293142
1142528.1993393624112-3.19933936241119
115920.6810580737745-11.6810580737745
1161617.8955263219369-1.89552632193693
1171921.1236881841703-2.12368818417026
1181719.4117214751196-2.41172147511961
1192524.46537439600080.534625603999165
1202015.51539983314064.48460016685943
1212921.58249828097317.41750171902693
1221418.9967653443087-4.99676534430872
1232226.8737091669435-4.8737091669435
1241515.5337097000078-0.533709700007809
1251925.4092467019303-6.40924670193027
1262021.8831811742809-1.88318117428093
1271517.5257328923904-2.52573289239039
1282021.743111333972-1.74311133397202
1291820.1682541454936-2.16825414549356
1303325.42914520441347.57085479558657
1312223.8678831867946-1.86788318679460
1321616.5484737239343-0.548473723934339
1331718.9805095688634-1.98050956886341
1341615.12936160213670.870638397863298
1352117.12995591868323.87004408131681
1362627.5800944393104-1.58009443931040
1371821.2325898758653-3.23258987586535
1381823.1807825749856-5.18078257498559
1391718.2770155975882-1.27701559758815
1402224.70965448444-2.70965448444
1413024.82878593386275.17121406613726
1423027.22267948345652.77732051654350
1432429.9801931815366-5.98019318153661
1442121.9633614489398-0.96336144893981
1452125.4587603637184-4.45876036371842
1462927.35576099840311.64423900159689
1473123.17415248974117.82584751025892
1482019.05487243642910.945127563570912
1491614.26887521901881.73112478098116
1502218.99248402354043.00751597645964
1512020.2765822914908-0.276582291490847
1522827.28099411182170.719005888178257
1533826.651154541643811.3488454583562
1542219.27217449741942.72782550258064
1552025.6249634727582-5.62496347275816
1561717.9825672375456-0.982567237545564
1572824.41302809888853.58697190111148
1582224.0742261499925-2.07422614999252
1593126.0504576385614.94954236143898


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.2144658279653590.4289316559307190.78553417203464
110.2663908711114190.5327817422228370.733609128888581
120.7472688774787540.5054622450424910.252731122521246
130.7532428798811030.4935142402377940.246757120118897
140.7180392454127150.563921509174570.281960754587285
150.7175828023617530.5648343952764940.282417197638247
160.6614078286186510.6771843427626980.338592171381349
170.573685042004040.852629915991920.42631495799596
180.526167610431410.947664779137180.47383238956859
190.445270221087070.890540442174140.55472977891293
200.4630582730357150.9261165460714310.536941726964285
210.383955783475350.76791156695070.61604421652465
220.3898462515551440.7796925031102890.610153748444856
230.3177975215178550.635595043035710.682202478482145
240.6282749834381630.7434500331236740.371725016561837
250.558828847803690.882342304392620.44117115219631
260.5162502967718780.9674994064562450.483749703228122
270.449047674408910.898095348817820.55095232559109
280.4140436704437550.828087340887510.585956329556245
290.3540557642646750.708111528529350.645944235735325
300.3038982198375320.6077964396750650.696101780162468
310.3801686489443010.7603372978886020.619831351055699
320.4432963863532860.8865927727065720.556703613646714
330.3971713519071310.7943427038142620.602828648092869
340.4042854716908610.8085709433817220.595714528309139
350.4086264789174040.8172529578348080.591373521082596
360.4079786572159210.8159573144318420.592021342784079
370.5855719607804410.8288560784391180.414428039219559
380.7805943054182590.4388113891634820.219405694581741
390.7749891395815170.4500217208369660.225010860418483
400.7333678203505880.5332643592988250.266632179649412
410.7101911376498050.5796177247003910.289808862350195
420.6615038613379020.6769922773241960.338496138662098
430.6143736741653880.7712526516692240.385626325834612
440.5997504685099820.8004990629800360.400249531490018
450.5659475619960510.8681048760078980.434052438003949
460.5878941400570090.8242117198859820.412105859942991
470.5463841379008540.907231724198290.453615862099145
480.5365914094759370.9268171810481260.463408590524063
490.5998327997603250.800334400479350.400167200239675
500.5789091579644140.8421816840711720.421090842035586
510.5432060968395580.9135878063208850.456793903160442
520.4940078029377480.9880156058754970.505992197062252
530.4561600857131600.9123201714263190.54383991428684
540.4084775046339450.816955009267890.591522495366055
550.3641220377638760.7282440755277520.635877962236124
560.3346955545072330.6693911090144660.665304445492767
570.2904446564091960.5808893128183920.709555343590804
580.2650275868661050.5300551737322090.734972413133895
590.2441927460448060.4883854920896120.755807253955194
600.3048602640035530.6097205280071070.695139735996447
610.2922149777193310.5844299554386630.707785022280669
620.2550569417682830.5101138835365660.744943058231717
630.2419586367770540.4839172735541080.758041363222946
640.2765486588784250.553097317756850.723451341121575
650.3513751215637660.7027502431275320.648624878436234
660.3511078114158830.7022156228317650.648892188584117
670.6841773457123560.6316453085752880.315822654287644
680.6772179505465360.6455640989069290.322782049453464
690.8491083156347790.3017833687304430.150891684365221
700.8304066907735740.3391866184528530.169593309226426
710.931216028937710.1375679421245780.0687839710622891
720.915051954680360.1698960906392810.0849480453196405
730.9386147532336340.1227704935327330.0613852467663665
740.9265154648375450.1469690703249090.0734845351624547
750.9272697765272180.1454604469455650.0727302234727824
760.9212959000026730.1574081999946530.0787040999973266
770.9693103644723740.06137927105525220.0306896355276261
780.9615953594511750.07680928109764940.0384046405488247
790.954408899354290.09118220129142080.0455911006457104
800.9560883093754810.08782338124903720.0439116906245186
810.9486539488534650.1026921022930710.0513460511465355
820.9472899762462630.1054200475074740.0527100237537369
830.9339765201254120.1320469597491760.0660234798745881
840.9210433014409320.1579133971181370.0789566985590683
850.9125890638420910.1748218723158170.0874109361579087
860.8968603087233450.206279382553310.103139691276655
870.8755597001571050.2488805996857890.124440299842895
880.9196764586474180.1606470827051640.0803235413525821
890.9030478130783620.1939043738432760.096952186921638
900.8832504007793710.2334991984412580.116749599220629
910.8858734398942580.2282531202114840.114126560105742
920.8737780360592140.2524439278815720.126221963940786
930.8512619044253550.2974761911492890.148738095574645
940.8235988998817230.3528022002365530.176401100118277
950.7905691830281850.418861633943630.209430816971815
960.7617144492819020.4765711014361960.238285550718098
970.7815174706851550.436965058629690.218482529314845
980.7771350739962020.4457298520075960.222864926003798
990.7416724832098140.5166550335803710.258327516790186
1000.7155676491700530.5688647016598940.284432350829947
1010.6733622163766890.6532755672466210.326637783623311
1020.6360667066921350.727866586615730.363933293307865
1030.5956196561791820.8087606876416370.404380343820818
1040.5545064969779870.8909870060440250.445493503022013
1050.5084612378933690.9830775242132620.491538762106631
1060.4854424980609470.9708849961218940.514557501939053
1070.4845708950659530.9691417901319050.515429104934047
1080.491336241946560.982672483893120.50866375805344
1090.4410942567141620.8821885134283240.558905743285838
1100.4167834439115440.8335668878230880.583216556088456
1110.3769381484277240.7538762968554480.623061851572276
1120.602586560115650.79482687976870.39741343988435
1130.5965802709041850.806839458191630.403419729095815
1140.5725362396754850.854927520649030.427463760324515
1150.7721525378921280.4556949242157440.227847462107872
1160.754882203638880.4902355927222390.245117796361120
1170.7364412424292860.5271175151414290.263558757570714
1180.7054290163632320.5891419672735370.294570983636768
1190.6558367803185070.6883264393629850.344163219681493
1200.6781286092404090.6437427815191830.321871390759591
1210.7363369631652590.5273260736694830.263663036834741
1220.7279613064783010.5440773870433980.272038693521699
1230.728988193114430.5420236137711410.271011806885571
1240.6765520994716980.6468958010566030.323447900528301
1250.7190642860193850.5618714279612310.280935713980616
1260.6856991281564190.6286017436871620.314300871843581
1270.6825034873078060.6349930253843870.317496512692194
1280.6443442721994220.7113114556011550.355655727800578
1290.6123617450268470.7752765099463060.387638254973153
1300.6861136783633320.6277726432733350.313886321636668
1310.6334238262997450.733152347400510.366576173700255
1320.5720686344216970.8558627311566060.427931365578303
1330.5622292109731650.8755415780536690.437770789026834
1340.5050841767248880.9898316465502230.494915823275112
1350.4553480689560290.9106961379120590.54465193104397
1360.4217537371616190.8435074743232380.578246262838381
1370.4385729007873550.877145801574710.561427099212645
1380.5088201809509860.9823596380980290.491179819049014
1390.4332801923814180.8665603847628360.566719807618582
1400.3556699230677590.7113398461355180.644330076932241
1410.4246819981185060.8493639962370120.575318001881494
1420.3703251802935330.7406503605870660.629674819706467
1430.3047116303778630.6094232607557260.695288369622137
1440.2285587086849840.4571174173699690.771441291315016
1450.3682240643596830.7364481287193660.631775935640317
1460.2702762841063540.5405525682127090.729723715893646
1470.393719010786360.787438021572720.60628098921364
1480.3364928359229420.6729856718458850.663507164077058
1490.2529608164332760.5059216328665520.747039183566724


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


http://www.freestatistics.org/blog/date/2010/Dec/25/t1293313664boe59h7wai2k3h3/1mqlm1293313780.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/25/t1293313664boe59h7wai2k3h3/1mqlm1293313780.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/25/t1293313664boe59h7wai2k3h3/2mqlm1293313780.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/25/t1293313664boe59h7wai2k3h3/2mqlm1293313780.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/25/t1293313664boe59h7wai2k3h3/3mqlm1293313780.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/25/t1293313664boe59h7wai2k3h3/3mqlm1293313780.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/25/t1293313664boe59h7wai2k3h3/4fzlp1293313780.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/25/t1293313664boe59h7wai2k3h3/4fzlp1293313780.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/25/t1293313664boe59h7wai2k3h3/5fzlp1293313780.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/25/t1293313664boe59h7wai2k3h3/5fzlp1293313780.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/25/t1293313664boe59h7wai2k3h3/6fzlp1293313780.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/25/t1293313664boe59h7wai2k3h3/6fzlp1293313780.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/25/t1293313664boe59h7wai2k3h3/77q2a1293313780.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/25/t1293313664boe59h7wai2k3h3/77q2a1293313780.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/25/t1293313664boe59h7wai2k3h3/8001u1293313780.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/25/t1293313664boe59h7wai2k3h3/8001u1293313780.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/25/t1293313664boe59h7wai2k3h3/9001u1293313780.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/25/t1293313664boe59h7wai2k3h3/9001u1293313780.ps (open in new window)


 
Parameters (Session):
par1 = 2 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 2 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
R code (references can be found in the software module):
library(lattice)
library(lmtest)
n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
par1 <- as.numeric(par1)
x <- t(y)
k <- length(x[1,])
n <- length(x[,1])
x1 <- cbind(x[,par1], x[,1:k!=par1])
mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
colnames(x1) <- mycolnames #colnames(x)[par1]
x <- x1
if (par3 == 'First Differences'){
x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
for (i in 1:n-1) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
x <- x2
}
if (par2 == 'Include Monthly Dummies'){
x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
for (i in 1:11){
x2[seq(i,n,12),i] <- 1
}
x <- cbind(x, x2)
}
if (par2 == 'Include Quarterly Dummies'){
x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
for (i in 1:3){
x2[seq(i,n,4),i] <- 1
}
x <- cbind(x, x2)
}
k <- length(x[1,])
if (par3 == 'Linear Trend'){
x <- cbind(x, c(1:n))
colnames(x)[k+1] <- 't'
}
x
k <- length(x[1,])
df <- as.data.frame(x)
(mylm <- lm(df))
(mysum <- summary(mylm))
if (n > n25) {
kp3 <- k + 3
nmkm3 <- n - k - 3
gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
numgqtests <- 0
numsignificant1 <- 0
numsignificant5 <- 0
numsignificant10 <- 0
for (mypoint in kp3:nmkm3) {
j <- 0
numgqtests <- numgqtests + 1
for (myalt in c('greater', 'two.sided', 'less')) {
j <- j + 1
gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
}
if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
}
gqarr
}
bitmap(file='test0.png')
plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
points(x[,1]-mysum$resid)
grid()
dev.off()
bitmap(file='test1.png')
plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
grid()
dev.off()
bitmap(file='test2.png')
hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
grid()
dev.off()
bitmap(file='test3.png')
densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
dev.off()
bitmap(file='test4.png')
qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
qqline(mysum$resid)
grid()
dev.off()
(myerror <- as.ts(mysum$resid))
bitmap(file='test5.png')
dum <- cbind(lag(myerror,k=1),myerror)
dum
dum1 <- dum[2:length(myerror),]
dum1
z <- as.data.frame(dum1)
z
plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
lines(lowess(z))
abline(lm(z))
grid()
dev.off()
bitmap(file='test6.png')
acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
grid()
dev.off()
bitmap(file='test7.png')
pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
grid()
dev.off()
bitmap(file='test8.png')
opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
plot(mylm, las = 1, sub='Residual Diagnostics')
par(opar)
dev.off()
if (n > n25) {
bitmap(file='test9.png')
plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
grid()
dev.off()
}
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
a<-table.row.end(a)
myeq <- colnames(x)[1]
myeq <- paste(myeq, '[t] = ', sep='')
for (i in 1:k){
if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
if (rownames(mysum$coefficients)[i] != '(Intercept)') {
myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
}
}
myeq <- paste(myeq, ' + e[t]')
a<-table.row.start(a)
a<-table.element(a, myeq)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Variable',header=TRUE)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'S.D.',header=TRUE)
a<-table.element(a,'T-STAT<br />H0: parameter = 0',header=TRUE)
a<-table.element(a,'2-tail p-value',header=TRUE)
a<-table.element(a,'1-tail p-value',header=TRUE)
a<-table.row.end(a)
for (i in 1:k){
a<-table.row.start(a)
a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
a<-table.element(a,mysum$coefficients[i,1])
a<-table.element(a, round(mysum$coefficients[i,2],6))
a<-table.element(a, round(mysum$coefficients[i,3],4))
a<-table.element(a, round(mysum$coefficients[i,4],6))
a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple R',1,TRUE)
a<-table.element(a, sqrt(mysum$r.squared))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'R-squared',1,TRUE)
a<-table.element(a, mysum$r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-squared',1,TRUE)
a<-table.element(a, mysum$adj.r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (value)',1,TRUE)
a<-table.element(a, mysum$fstatistic[1])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[2])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[3])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'p-value',1,TRUE)
a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
a<-table.element(a, mysum$sigma)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
a<-table.element(a, sum(myerror*myerror))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Time or Index', 1, TRUE)
a<-table.element(a, 'Actuals', 1, TRUE)
a<-table.element(a, 'Interpolation<br />Forecast', 1, TRUE)
a<-table.element(a, 'Residuals<br />Prediction Error', 1, TRUE)
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,i, 1, TRUE)
a<-table.element(a,x[i])
a<-table.element(a,x[i]-mysum$resid[i])
a<-table.element(a,mysum$resid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable4.tab')
if (n > n25) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-values',header=TRUE)
a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'breakpoint index',header=TRUE)
a<-table.element(a,'greater',header=TRUE)
a<-table.element(a,'2-sided',header=TRUE)
a<-table.element(a,'less',header=TRUE)
a<-table.row.end(a)
for (mypoint in kp3:nmkm3) {
a<-table.row.start(a)
a<-table.element(a,mypoint,header=TRUE)
a<-table.element(a,gqarr[mypoint-kp3+1,1])
a<-table.element(a,gqarr[mypoint-kp3+1,2])
a<-table.element(a,gqarr[mypoint-kp3+1,3])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable5.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Description',header=TRUE)
a<-table.element(a,'# significant tests',header=TRUE)
a<-table.element(a,'% significant tests',header=TRUE)
a<-table.element(a,'OK/NOK',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'1% type I error level',header=TRUE)
a<-table.element(a,numsignificant1)
a<-table.element(a,numsignificant1/numgqtests)
if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'5% type I error level',header=TRUE)
a<-table.element(a,numsignificant5)
a<-table.element(a,numsignificant5/numgqtests)
if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'10% type I error level',header=TRUE)
a<-table.element(a,numsignificant10)
a<-table.element(a,numsignificant10/numgqtests)
if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable6.tab')
}
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by