Home » date » 2010 » Nov » 24 »

mini turtorial : WS 7 -2

*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: Wed, 24 Nov 2010 08:33:59 +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/24/t1290587559oh6nrdcy1kaely8.htm/, Retrieved Wed, 24 Nov 2010 09:32:51 +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/24/t1290587559oh6nrdcy1kaely8.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 14 11 12 24 26 237.588 25 11 7 8 25 23 164.083 17 6 17 8 30 25 278.261 18 12 10 8 19 23 220.36 18 8 12 9 22 19 253.967 16 10 12 7 22 29 422.31 20 10 11 4 25 25 136.921 16 11 11 11 23 21 143.495 18 16 12 7 17 22 189.785 17 11 13 7 21 25 219.529 23 13 14 12 19 24 217.761 30 12 16 10 19 18 221.754 23 8 11 10 15 22 159.854 18 12 10 8 16 15 209.464 15 11 11 8 23 22 174.283 12 4 15 4 27 28 154.55 21 9 9 9 22 20 153.024 15 8 11 8 14 12 162.49 20 8 17 7 22 24 154.462 31 14 17 11 23 20 249.671 27 15 11 9 23 21 259.473 34 16 18 11 21 20 155.337 21 9 14 13 19 21 151.289 31 14 10 8 18 23 276.614 19 11 11 8 20 28 188.214 16 8 15 9 23 24 181.098 20 9 15 6 25 24 240.898 21 9 13 9 19 24 244.551 22 9 16 9 24 23 250.238 17 9 13 6 22 23 183.129 24 10 9 6 25 29 310.331 25 16 18 16 26 24 281.942 26 11 18 5 29 18 230.343 25 8 12 7 32 25 161.563 17 9 17 9 25 21 392.527 32 16 9 6 29 26 1077.414 33 11 9 6 28 22 248.275 13 16 12 5 17 22 557.386 32 12 18 12 28 22 731.874 25 12 12 7 29 23 301.42 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 time11 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
PS[t] = + 7.49421672000384 + 0.328566099942966CM[t] -0.367928837189672D[t] + 0.183960797094827PE[t] + 0.0231775389634437PC[t] + 0.400279254796218O[t] + 0.000246245385480167Time[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)7.494216720003842.2563153.32140.0011220.000561
CM0.3285660999429660.0557125.897500
D-0.3679288371896720.108331-3.39630.0008720.000436
PE0.1839607970948270.1016681.80940.0723610.03618
PC0.02317753896344370.1289860.17970.8576350.428817
O0.4002792547962180.0720265.557400
Time0.0002462453854801670.0006640.37070.71140.3557


Multiple Linear Regression - Regression Statistics
Multiple R0.60633034651225
R-squared0.367636489101665
Adjusted R-squared0.342674771566204
F-TEST (value)14.7280125487920
F-TEST (DF numerator)6
F-TEST (DF denominator)152
p-value3.17079695832945e-13
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.41892436043040
Sum Squared Residuals1776.73465491636


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12422.99626420693101.00373579306896
22522.38112544276172.61887455723833
33024.26052311533045.73947688466962
41920.2789742488144-1.27897424881440
52220.54894728021111.45105271978886
62223.1538485629091-1.15384856290906
72522.54322680519412.45677319480592
82319.42377813895593.57622186104408
91718.7441947478246-1.74419474782464
102121.6473957180592-0.647395718059238
111922.782068518612-3.78206851861199
121923.3708343007121-4.3708343007121
131523.2086573942195-8.20865739421955
141617.0740571207245-1.07405712072445
152319.4335400798473.56645992015299
162724.0632930414572.93670695854302
172220.99025685841561.00974314158442
181416.5316300716229-2.53163007162287
192224.0564220145432-2.05642201454320
202323.9781140043529-0.978114004352876
212321.54849385896021.45150614103981
222124.3886861147034-3.38868611470337
231922.4026230187959-3.40262301879590
241823.8283281616084-5.82832816160841
252023.1529104528613-3.15291045286131
262322.42715009059620.572849909403775
272523.31867851033981.6813214896602
281923.3497551673766-4.3497551673766
292423.83132480131510.168675198684945
302221.55055401185120.449445988148775
312525.1797431201842-0.179743120184168
322623.17977182624752.82022817375251
332922.67864763911826.32135236088177
343225.18147637206246.81852362793759
352521.60693459875723.3930654012428
362924.58875178123154.41124821876851
372824.95167339526633.0483266047337
381717.1455292201308-0.145529220130812
392826.16897488794061.83102511205941
402922.94364387079696.05635612920315
412627.4788173843796-1.47881738437958
422523.45473044464881.54526955535121
431419.5175237491656-5.51752374916558
442522.08812098935032.91187901064969
452621.67015643570494.32984356429514
462020.3197264124031-0.319726412403092
471821.3671547222272-3.36715472222717
483224.64336707470507.35663292529504
492525.0016361320139-0.00163613201390625
502521.72035859933363.27964140066644
512320.80603467009932.19396532990070
522122.1492356754625-1.14923567546245
532024.0299933640439-4.02999336404385
541516.5442987740029-1.54429877400292
553026.71379188668513.28620811331489
562425.3300162522617-1.33001625226169
572624.30949546719931.69050453280074
582421.74609013569222.25390986430777
592221.53866219162410.461337808375946
601415.6507000971806-1.65070009718056
612422.24004165082481.75995834917520
622422.91935135228981.08064864771015
632423.31323904012730.686760959872749
642419.98476460168554.01523539831449
651918.53627066911390.46372933088607
663126.81208872941924.18791127058078
672226.6055871493741-4.60558714937407
682721.47297753474935.5270224652507
691917.69556735717011.30443264282986
702522.29842115268272.70157884731732
712025.0122922063225-5.01229220632251
722121.5762342604157-0.576234260415738
732727.4556169963108-0.455616996310772
742324.3037504827979-1.30375048279792
752525.6728958132087-0.672895813208655
762022.2299078147637-2.2299078147637
772119.19819605838151.80180394161847
782222.417505141978-0.417505141978009
792323.0204165951386-0.0204165951386217
802524.05331550721950.946684492780455
812523.41893326480421.58106673519577
821723.8763795816059-6.8763795816059
831921.4424520620989-2.44245206209887
842523.96533888186381.03466111813623
851922.3636478391902-3.36364783919022
862023.1563781126177-3.1563781126177
872622.51901161480123.48098838519878
882320.77692591894032.22307408105968
892724.3922224164582.60777758354202
901720.8995279474386-3.89952794743858
911723.3043464837684-6.30434648376844
921920.2150781936552-1.21507819365519
931719.7149683814551-2.71496838145506
942222.0673129004600-0.0673129004599735
952123.5448525940642-2.54485259406416
963228.58727191874463.41272808125542
972125.0868789369244-4.08687893692439
982124.2853818863904-3.28538188639036
991821.2932588686096-3.29325886860963
1001821.2820264382490-3.28202643824896
1012322.81804158956340.18195841043657
1021920.6573878892702-1.65738788927018
1032020.8995953382737-0.899595338273684
1042122.3335305420844-1.33353054208437
1052023.8127345742176-3.81273457421755
1061718.7686083422305-1.76860834223046
1071820.3002417700377-2.30024177003772
1081920.7495092255928-1.74950922559284
1092222.0366239387346-0.036623938734576
1101518.7407712497276-3.74077124972764
1111418.8355296791659-4.83552967916586
1121826.6291025639715-8.62910256397149
1132421.55055098987112.44944901012894
1143523.563397205429111.4366027945709
1152919.20395350194279.79604649805725
1162121.967868257756-0.967868257755998
1172520.50218382607204.49781617392795
1182018.48127935475941.51872064524063
1192223.1946468951034-1.19464689510339
1201316.8291807695812-3.82918076958117
1212623.23449531669092.76550468330912
1221716.87335063181300.126649368187030
1232520.07201136968274.92798863031729
1242020.7767361587495-0.776736158749505
1251918.06017623365380.93982376634618
1262122.5959450671439-1.59594506714386
1272221.06897851130940.931021488690566
1282422.69059844180581.30940155819417
1292122.982097229875-1.982097229875
1302625.51780914063030.482190859369657
1312420.57037826375553.42962173624446
1321620.3122802923847-4.31228029238474
1332322.36295036953230.637049630467729
1341820.8149317488686-2.81493174886861
1351622.3642469310098-6.36424693100983
1362624.03023216203411.96976783796592
1371919.0871712491341-0.0871712491341452
1382116.85829015901414.14170984098589
1392122.2021942974782-1.20219429747818
1402218.49325882738283.50674117261722
1412319.72983338340103.27016661659905
1422924.79206785389494.20793214610507
1432119.171870811091.82812918891001
1442119.92851903166391.07148096833607
1452323.0163143430536-0.0163143430536217
1462722.93932068912524.06067931087485
1472525.3596759096072-0.359675909607161
1482120.99180765325540.00819234674459426
1491017.1263926997398-7.12639269973983
1502022.6678186162857-2.6678186162857
1512622.57377369274363.42622630725644
1522423.59956330313970.400436696860332
1532931.612147522841-2.61214752284098
1541918.97088689311600.0291131068840320
1552422.04945356791281.95054643208716
1561920.7482599647819-1.74825996478192
1572423.4198376379520.580162362047989
1582221.79485375133730.205146248662669
1591723.6833853837874-6.68338538378744


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.1118265543096610.2236531086193210.88817344569034
110.3120232187595790.6240464375191570.687976781240421
120.1923394000521520.3846788001043030.807660599947848
130.9042190245490640.1915619509018720.095780975450936
140.8496414888577870.3007170222844250.150358511142213
150.7996046324074370.4007907351851250.200395367592563
160.7546545521194640.4906908957610720.245345447880536
170.6790083241365730.6419833517268540.320991675863427
180.6443809538760670.7112380922478670.355619046123933
190.5856431330099420.8287137339801170.414356866990058
200.5817575702651310.8364848594697390.418242429734869
210.5625016629460450.874996674107910.437498337053955
220.4930904726623410.9861809453246820.506909527337659
230.4446212397534550.889242479506910.555378760246545
240.4890291537756740.9780583075513480.510970846224326
250.5020879692916920.9958240614166170.497912030708308
260.4312469730082180.8624939460164350.568753026991782
270.3774570637289140.7549141274578270.622542936271086
280.3914594142099550.7829188284199110.608540585790045
290.3344150855450660.6688301710901310.665584914454934
300.2766487025102330.5532974050204660.723351297489767
310.2252560857633680.4505121715267360.774743914236632
320.2452150531045330.4904301062090670.754784946895467
330.3960158681068030.7920317362136060.603984131893197
340.6326698655076010.7346602689847980.367330134492399
350.6066998635724190.7866002728551620.393300136427581
360.5736235220297520.8527529559404950.426376477970248
370.5804434264133750.839113147173250.419556573586625
380.5508049493403740.8983901013192510.449195050659626
390.4967644787467210.9935289574934420.503235521253279
400.5895948936110280.8208102127779450.410405106388972
410.543438644540950.91312271091810.45656135545905
420.4966788048514870.9933576097029730.503321195148513
430.582244605510520.835510788978960.41775539448948
440.5533394655351860.8933210689296280.446660534464814
450.58109710890940.83780578218120.4189028910906
460.5328016972466970.9343966055066060.467198302753303
470.5108411404079330.9783177191841340.489158859592067
480.657789957721260.684420084557480.34221004227874
490.6137698472753310.7724603054493370.386230152724669
500.5934679870990180.8130640258019630.406532012900982
510.5555605757719030.8888788484561940.444439424228097
520.5136908788609610.9726182422780790.486309121139039
530.5412054055864860.9175891888270280.458794594413514
540.5126091924760760.9747816150478480.487390807523924
550.5453389762064780.9093220475870430.454661023793522
560.5099118307719040.9801763384561930.490088169228096
570.4688934162400980.9377868324801960.531106583759902
580.4340916565423650.868183313084730.565908343457635
590.3906025027229270.7812050054458540.609397497277073
600.3526812882574970.7053625765149940.647318711742503
610.3227185106832260.6454370213664520.677281489316774
620.2853578924044420.5707157848088850.714642107595558
630.2483395926526250.496679185305250.751660407347375
640.2747606585566730.5495213171133470.725239341443327
650.2374246721416750.474849344283350.762575327858325
660.2523121544074030.5046243088148060.747687845592597
670.3122073520448510.6244147040897020.687792647955149
680.3819404060729170.7638808121458340.618059593927083
690.3485950304264190.6971900608528390.65140496957358
700.3328681858028430.6657363716056870.667131814197157
710.4147713477561370.8295426955122750.585228652243863
720.3780891833166730.7561783666333450.621910816683327
730.3359807867548890.6719615735097770.664019213245111
740.296978946437730.593957892875460.70302105356227
750.2637217222895760.5274434445791510.736278277710424
760.2417568506567230.4835137013134450.758243149343277
770.2224534934292530.4449069868585070.777546506570747
780.1893002745586090.3786005491172190.81069972544139
790.1604596009549630.3209192019099250.839540399045037
800.1369658012325480.2739316024650960.863034198767452
810.1181440838347760.2362881676695530.881855916165224
820.2055046746321480.4110093492642950.794495325367852
830.1910268973084060.3820537946168120.808973102691594
840.1643280168254730.3286560336509460.835671983174527
850.1647122344132980.3294244688265950.835287765586702
860.1659875311644250.3319750623288490.834012468835575
870.1734306398895470.3468612797790940.826569360110453
880.1625311170179030.3250622340358060.837468882982097
890.1542605559763720.3085211119527430.845739444023628
900.1595090188288860.3190180376577710.840490981171114
910.2244407675197510.4488815350395010.775559232480249
920.1932833924304190.3865667848608380.806716607569581
930.1745489839872560.3490979679745130.825451016012744
940.1483206518110330.2966413036220660.851679348188967
950.1351910032608290.2703820065216580.864808996739171
960.1411121825856870.2822243651713740.858887817414313
970.1654208701152840.3308417402305680.834579129884716
980.1607739677507270.3215479355014530.839226032249273
990.1534550198963390.3069100397926780.846544980103661
1000.1480154035898860.2960308071797720.851984596410114
1010.1218280683812840.2436561367625680.878171931618716
1020.1018171768762800.2036343537525590.89818282312372
1030.0821250421475220.1642500842950440.917874957852478
1040.06661620319036110.1332324063807220.933383796809639
1050.07072440220496580.1414488044099320.929275597795034
1060.05815629972721360.1163125994544270.941843700272786
1070.05126356239759820.1025271247951960.948736437602402
1080.04476470034184930.08952940068369870.95523529965815
1090.03429281271549520.06858562543099040.965707187284505
1100.03355394143709910.06710788287419810.9664460585629
1110.04190476388217960.08380952776435930.95809523611782
1120.1690063851730030.3380127703460070.830993614826997
1130.1530049242617230.3060098485234460.846995075738277
1140.5734498547002770.8531002905994460.426550145299723
1150.8613694088206110.2772611823587770.138630591179389
1160.8295206926376980.3409586147246040.170479307362302
1170.8821646806982670.2356706386034670.117835319301733
1180.8583760339088550.283247932182290.141623966091145
1190.830373065457950.33925386908410.16962693454205
1200.8633286981447120.2733426037105750.136671301855288
1210.839931247079090.3201375058418190.160068752920909
1220.8009762236584710.3980475526830580.199023776341529
1230.8323956054794530.3352087890410940.167604394520547
1240.7914859572809840.4170280854380330.208514042719016
1250.7515141640472190.4969716719055620.248485835952781
1260.7031183107999590.5937633784000820.296881689200041
1270.6675575837709670.6648848324580670.332442416229033
1280.6270702661960980.7458594676078050.372929733803902
1290.5684526420629590.8630947158740820.431547357937041
1300.5060144629536050.9879710740927890.493985537046395
1310.5046200664181340.9907598671637310.495379933581866
1320.5011892299580310.9976215400839380.498810770041969
1330.453010776390330.906021552780660.54698922360967
1340.4032680596949260.8065361193898530.596731940305074
1350.5477570748369770.9044858503260470.452242925163023
1360.5137336948489220.9725326103021570.486266305151078
1370.4387944967839640.8775889935679280.561205503216036
1380.452806976840060.905613953680120.54719302315994
1390.3780813483297370.7561626966594750.621918651670263
1400.3419750510858560.6839501021717120.658024948914144
1410.2979493564488690.5958987128977380.702050643551131
1420.346174481670880.692348963341760.65382551832912
1430.5055587733040860.9888824533918270.494441226695913
1440.4247513497319970.8495026994639940.575248650268003
1450.3650445884051970.7300891768103940.634955411594803
1460.3239180237963090.6478360475926170.676081976203691
1470.2766210332356190.5532420664712380.723378966764381
1480.1763203932839490.3526407865678980.823679606716051
1490.3124208588028910.6248417176057830.687579141197109


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/Nov/24/t1290587559oh6nrdcy1kaely8/10axct1290587627.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290587559oh6nrdcy1kaely8/10axct1290587627.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290587559oh6nrdcy1kaely8/1rhnn1290587627.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290587559oh6nrdcy1kaely8/1rhnn1290587627.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290587559oh6nrdcy1kaely8/2e5f21290587627.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290587559oh6nrdcy1kaely8/2e5f21290587627.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290587559oh6nrdcy1kaely8/3e5f21290587627.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290587559oh6nrdcy1kaely8/3e5f21290587627.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290587559oh6nrdcy1kaely8/4e5f21290587627.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290587559oh6nrdcy1kaely8/4e5f21290587627.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290587559oh6nrdcy1kaely8/57wwn1290587627.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290587559oh6nrdcy1kaely8/57wwn1290587627.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290587559oh6nrdcy1kaely8/67wwn1290587627.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290587559oh6nrdcy1kaely8/67wwn1290587627.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290587559oh6nrdcy1kaely8/706v81290587627.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290587559oh6nrdcy1kaely8/706v81290587627.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290587559oh6nrdcy1kaely8/806v81290587627.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290587559oh6nrdcy1kaely8/806v81290587627.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290587559oh6nrdcy1kaely8/9axct1290587627.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290587559oh6nrdcy1kaely8/9axct1290587627.ps (open in new window)


 
Parameters (Session):
par1 = 5 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 5 ; 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