Home » date » 2010 » Dec » 11 »

WS 10 - Multiple regression

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Sat, 11 Dec 2010 15:55:17 +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/11/t12920828190l47edivypr80ly.htm/, Retrieved Sat, 11 Dec 2010 16:53:42 +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/11/t12920828190l47edivypr80ly.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 time7 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk
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.76493979259821 -0.131393212690802G[t] + 0.812849739916337DA[t] + 0.24845330662011PE[t] + 0.190333948740538PC[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.764939792598213.278744-0.53830.5911590.29558
G-0.1313932126908020.744476-0.17650.8601430.430072
DA0.8128497399163370.1316586.173900
PE0.248453306620110.1341241.85240.0659050.032953
PC0.1903339487405380.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.77555756156289e-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.9429963486832-0.942996348683151
22521.66224986429713.33775013570285
31722.6806688810207-5.68066888102073
41819.9564501024386-1.95645010243863
51819.4213348995612-1.42133489956121
61619.5095287560754-3.50952875607538
72020.8505100107316-0.850510010731612
81622.326631604058-6.32663160405803
91822.3669114083879-4.36691140838794
101720.4676664538925-3.46766645389246
112322.40876509121380.591234908786182
123022.27486348986837.72513651013172
132315.18625436324097.8137456367591
141819.0528257532548-1.05282575325478
151521.6399459852527-6.63994598525267
161217.8833675707623-5.88336757076227
172119.50453415972431.49546584027573
181515.2651305398521-0.265130539852111
192019.83590788495280.164092115047235
203126.37158443611144.62841556388856
212725.32875587893311.6712441210669
223427.11393634445566.88606365554444
232119.56335818534941.43664181465056
243120.884855930526210.1151440694738
251919.379535245278-0.379535245278024
261620.1541763955572-4.15417639555715
272021.6592183800513-1.65921838005134
282118.20651776601592.79348223398405
292221.89706365373170.10293634626833
301719.5802942222319-2.58029422223187
312420.27153620463753.7284637953625
322530.5637664057857-5.56376640578574
332626.6662550100328-0.666255010032776
342524.0055687571210.994431242879022
351723.0741781572644-6.0741781572644
363227.89068093079494.10931906920513
373323.72326688249389.27673311750617
381322.1176367235977-9.11763672359766
393227.78280686174364.21719313825642
402525.9220271574816-0.922027157481621
412927.10196059800741.89803940199262
422221.96605747954580.0339425204542188
431817.43761759593730.562382404062688
441721.8330215105146-4.83302151051465
452022.1606604832955-2.16066048329547
461520.4080430902548-5.40804309025479
472022.1436532819039-2.14365328190395
483328.06265710060194.93734289939812
492922.09166665748146.90833334251864
502326.757758959365-3.757758959365
512623.22077150498412.77922849501594
521819.0309246014548-1.03092460145476
532018.81513881198181.1848611880182
541111.7389940806761-0.738994080676097
552829.0393609676901-1.03936096769014
562623.27021280267362.72978719732642
572222.1948320062007-0.19483200620072
581720.1319892269372-3.13198922693724
591215.5047881422787-3.50478814227875
601420.9892502421717-6.98925024217172
611720.8032760947745-3.80327609477455
622121.4092610676731-0.409261067673123
631922.8796194998407-3.87961949984067
641823.0451523878524-5.0451523878524
651017.8768088703137-7.87680887031365
662924.30516407024634.69483592975366
673118.404128781281812.5958712187182
681923.0218318601521-4.02183186015208
69920.0258711870156-11.0258711870156
702022.5560887583009-2.55608875830091
712817.69320801891110.306791981089
721918.07952129274680.920478707253165
733022.99926034652337.00073965347668
742927.21722937758751.78277062241254
752621.54353460746764.45646539253241
762319.49353200737723.50646799262281
771322.7158817249009-9.71588172490094
782122.5912216095481-1.59122160954806
791921.5259492231535-2.5259492231535
802823.01937879181134.98062120818873
812325.6408449436037-2.64084494360373
821813.84895277370084.15104722629917
832120.68610058219190.313899417808097
842021.8561577417173-1.85615774171726
852319.92011281978373.0798871802163
862120.76280970728220.237190292717798
872121.853821383801-0.853821383801027
881522.7718021836753-7.77180218367526
892827.10066770693010.899332293069894
901917.60549674147371.39450325852634
912621.19708494536854.80291505463146
921013.1418504270284-3.14185042702844
931617.0609511188811-1.06095111888111
942221.10570868044880.89429131955115
951918.68469466187370.315305338126302
963128.70333396765362.29666603234641
973125.16103635757535.83896364242467
982924.75003730086334.24996269913666
991917.48994065330251.51005934669754
1002218.97294519374693.02705480625307
1012322.31726114188160.68273885811841
1021516.2398076637836-1.23980766378358
1032021.3789421742014-1.37894217420141
1041819.5754702240473-1.57547022404732
1052321.95167537723361.04832462276643
1062521.05327034523113.94672965476892
1072116.51152617779014.48847382220993
1082419.5693988807014.43060111929903
1092525.3244868239239-0.324486823923948
1101719.5347608742898-2.53476087428981
1111314.5134634896455-1.51346348964548
1122818.14412935312729.85587064687278
1132120.07275998270690.92724001729313
1142528.1993393624112-3.19933936241119
115920.6810580737745-11.6810580737745
1161617.8955263219369-1.89552632193692
1171921.1236881841702-2.12368818417025
1181719.4117214751196-2.41172147511961
1192524.46537439600080.53462560399916
1202015.51539983314064.48460016685943
1212921.58249828097317.41750171902693
1221418.9967653443087-4.99676534430871
1232226.8737091669435-4.87370916694351
1241515.5337097000078-0.533709700007815
1251925.4092467019303-6.40924670193028
1262021.8831811742809-1.88318117428092
1271517.5257328923904-2.52573289239038
1282021.743111333972-1.74311133397203
1291820.1682541454936-2.16825414549357
1303325.42914520441347.57085479558655
1312223.8678831867946-1.86788318679461
1321616.5484737239343-0.548473723934336
1331718.9805095688634-1.98050956886341
1341615.12936160213670.870638397863306
1352117.12995591868323.87004408131681
1362627.5800944393104-1.5800944393104
1371821.2325898758653-3.23258987586534
1381823.1807825749856-5.18078257498559
1391718.2770155975882-1.27701559758816
1402224.70965448444-2.70965448444001
1413024.82878593386275.17121406613726
1423027.22267948345652.7773205165435
1432429.9801931815366-5.98019318153662
1442121.9633614489398-0.963361448939817
1452125.4587603637184-4.45876036371842
1462927.35576099840311.64423900159689
1473123.17415248974117.82584751025892
1482019.05487243642910.945127563570916
1491614.26887521901881.73112478098117
1502218.99248402354043.00751597645964
1512020.2765822914909-0.276582291490852
1522827.28099411182170.719005888178254
1533826.651154541643811.3488454583562
1542219.27217449741942.72782550258065
1552025.6249634727582-5.62496347275816
1561717.9825672375456-0.98256723754556
1572824.41302809888853.58697190111148
1582224.0742261499925-2.07422614999253
1593126.0504576385614.94954236143896


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.214465827965360.4289316559307190.78553417203464
110.2663908711114180.5327817422228350.733609128888583
120.7472688774787550.5054622450424910.252731122521245
130.7532428798811030.4935142402377950.246757120118897
140.7180392454127140.5639215091745710.281960754587286
150.7175828023617520.5648343952764960.282417197638248
160.6614078286186510.6771843427626980.338592171381349
170.5736850420040390.8526299159919210.426314957995961
180.5261676104314090.9476647791371820.473832389568591
190.4452702210870690.8905404421741390.554729778912931
200.4630582730357130.9261165460714250.536941726964287
210.383955783475350.76791156695070.61604421652465
220.3898462515551430.7796925031102860.610153748444857
230.3177975215178560.6355950430357110.682202478482144
240.6282749834381630.7434500331236740.371725016561837
250.5588288478036920.8823423043926160.441171152196308
260.5162502967718780.9674994064562440.483749703228122
270.4490476744089090.8980953488178190.550952325591091
280.4140436704437540.8280873408875080.585956329556246
290.3540557642646760.7081115285293520.645944235735324
300.3038982198375320.6077964396750630.696101780162468
310.38016864894430.76033729788860.6198313510557
320.4432963863532870.8865927727065740.556703613646713
330.3971713519071310.7943427038142620.602828648092869
340.4042854716908610.8085709433817220.595714528309139
350.4086264789174040.8172529578348080.591373521082596
360.4079786572159210.8159573144318430.592021342784078
370.585571960780440.828856078439120.41442803921956
380.7805943054182580.4388113891634830.219405694581741
390.7749891395815180.4500217208369640.225010860418482
400.7333678203505890.5332643592988230.266632179649411
410.7101911376498060.5796177247003890.289808862350194
420.6615038613379030.6769922773241940.338496138662097
430.6143736741653860.7712526516692270.385626325834614
440.5997504685099820.8004990629800370.400249531490018
450.5659475619960520.8681048760078960.434052438003948
460.5878941400570090.8242117198859820.412105859942991
470.5463841379008540.9072317241982920.453615862099146
480.5365914094759370.9268171810481250.463408590524063
490.5998327997603250.800334400479350.400167200239675
500.5789091579644150.842181684071170.421090842035585
510.5432060968395580.9135878063208850.456793903160442
520.4940078029377470.9880156058754940.505992197062253
530.4561600857131590.9123201714263190.543839914286841
540.4084775046339440.8169550092678880.591522495366056
550.3641220377638760.7282440755277510.635877962236124
560.3346955545072340.6693911090144680.665304445492766
570.2904446564091960.5808893128183920.709555343590804
580.2650275868661050.5300551737322090.734972413133895
590.2441927460448070.4883854920896150.755807253955193
600.3048602640035530.6097205280071060.695139735996447
610.2922149777193320.5844299554386640.707785022280668
620.2550569417682840.5101138835365670.744943058231716
630.2419586367770530.4839172735541060.758041363222947
640.2765486588784260.5530973177568520.723451341121574
650.3513751215637650.702750243127530.648624878436235
660.3511078114158780.7022156228317560.648892188584122
670.684177345712360.6316453085752810.31582265428764
680.6772179505465360.6455640989069280.322782049453464
690.849108315634780.3017833687304390.15089168436522
700.8304066907735750.339186618452850.169593309226425
710.931216028937710.1375679421245780.0687839710622892
720.915051954680360.1698960906392790.0849480453196393
730.9386147532336330.1227704935327330.0613852467663667
740.9265154648375450.146969070324910.0734845351624548
750.9272697765272180.1454604469455650.0727302234727823
760.9212959000026740.1574081999946530.0787040999973264
770.9693103644723740.06137927105525130.0306896355276256
780.9615953594511750.07680928109765010.0384046405488251
790.954408899354290.09118220129142080.0455911006457104
800.9560883093754810.08782338124903720.0439116906245186
810.9486539488534650.1026921022930710.0513460511465355
820.9472899762462630.1054200475074740.0527100237537368
830.9339765201254120.1320469597491760.0660234798745881
840.9210433014409310.1579133971181380.078956698559069
850.9125890638420910.1748218723158170.0874109361579086
860.8968603087233450.206279382553310.103139691276655
870.8755597001571060.2488805996857890.124440299842894
880.9196764586474180.1606470827051640.0803235413525821
890.9030478130783620.1939043738432760.0969521869216378
900.8832504007793710.2334991984412570.116749599220629
910.8858734398942570.2282531202114850.114126560105743
920.8737780360592140.2524439278815720.126221963940786
930.8512619044253560.2974761911492890.148738095574644
940.8235988998817240.3528022002365530.176401100118276
950.7905691830281850.418861633943630.209430816971815
960.7617144492819010.4765711014361980.238285550718099
970.7815174706851540.4369650586296910.218482529314846
980.7771350739962020.4457298520075970.222864926003798
990.7416724832098140.5166550335803720.258327516790186
1000.7155676491700530.5688647016598940.284432350829947
1010.6733622163766910.6532755672466190.326637783623309
1020.6360667066921360.7278665866157290.363933293307864
1030.5956196561791810.8087606876416380.404380343820819
1040.5545064969779880.8909870060440240.445493503022012
1050.5084612378933690.9830775242132620.491538762106631
1060.4854424980609470.9708849961218940.514557501939053
1070.4845708950659510.9691417901319020.515429104934049
1080.491336241946560.982672483893120.50866375805344
1090.4410942567141620.8821885134283240.558905743285838
1100.4167834439115440.8335668878230880.583216556088456
1110.3769381484277250.753876296855450.623061851572275
1120.6025865601156510.7948268797686970.397413439884349
1130.5965802709041860.8068394581916280.403419729095814
1140.5725362396754840.8549275206490330.427463760324516
1150.7721525378921290.4556949242157420.227847462107871
1160.754882203638880.4902355927222410.24511779636112
1170.7364412424292850.527117515141430.263558757570715
1180.7054290163632310.5891419672735380.294570983636769
1190.6558367803185080.6883264393629830.344163219681491
1200.6781286092404080.6437427815191850.321871390759592
1210.7363369631652580.5273260736694830.263663036834742
1220.7279613064783010.5440773870433980.272038693521699
1230.728988193114430.5420236137711410.271011806885571
1240.6765520994716970.6468958010566060.323447900528303
1250.7190642860193840.5618714279612320.280935713980616
1260.6856991281564180.6286017436871630.314300871843582
1270.6825034873078070.6349930253843870.317496512692193
1280.6443442721994220.7113114556011550.355655727800578
1290.6123617450268480.7752765099463040.387638254973152
1300.6861136783633330.6277726432733330.313886321636667
1310.6334238262997450.733152347400510.366576173700255
1320.5720686344216960.8558627311566070.427931365578304
1330.5622292109731650.875541578053670.437770789026835
1340.5050841767248880.9898316465502240.494915823275112
1350.455348068956030.910696137912060.54465193104397
1360.421753737161620.843507474323240.57824626283838
1370.4385729007873550.877145801574710.561427099212645
1380.5088201809509870.9823596380980270.491179819049013
1390.4332801923814180.8665603847628360.566719807618582
1400.3556699230677590.7113398461355190.64433007693224
1410.4246819981185060.8493639962370120.575318001881494
1420.3703251802935340.7406503605870670.629674819706466
1430.3047116303778640.6094232607557270.695288369622136
1440.2285587086849830.4571174173699670.771441291315017
1450.3682240643596840.7364481287193670.631775935640316
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/11/t12920828190l47edivypr80ly/105wy71292082906.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t12920828190l47edivypr80ly/105wy71292082906.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t12920828190l47edivypr80ly/1gvjv1292082906.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t12920828190l47edivypr80ly/1gvjv1292082906.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t12920828190l47edivypr80ly/29mig1292082906.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t12920828190l47edivypr80ly/29mig1292082906.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t12920828190l47edivypr80ly/39mig1292082906.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t12920828190l47edivypr80ly/39mig1292082906.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t12920828190l47edivypr80ly/49mig1292082906.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t12920828190l47edivypr80ly/49mig1292082906.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t12920828190l47edivypr80ly/52wij1292082906.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t12920828190l47edivypr80ly/52wij1292082906.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t12920828190l47edivypr80ly/62wij1292082906.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t12920828190l47edivypr80ly/62wij1292082906.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t12920828190l47edivypr80ly/7cnz41292082906.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t12920828190l47edivypr80ly/7cnz41292082906.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t12920828190l47edivypr80ly/8cnz41292082906.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t12920828190l47edivypr80ly/8cnz41292082906.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t12920828190l47edivypr80ly/95wy71292082906.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t12920828190l47edivypr80ly/95wy71292082906.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