Home » date » 2010 » Dec » 06 »

*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: Mon, 06 Dec 2010 16:36:51 +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/06/t1291653299ewp1iaegagmrh5a.htm/, Retrieved Mon, 06 Dec 2010 17:35:09 +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/06/t1291653299ewp1iaegagmrh5a.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 «
3484.74 13830.14 9349.44 7977 -5.6 6 1 3.17 3411.13 14153.22 9327.78 8241 -6.2 3 1 3.17 3288.18 15418.03 9753.63 8444 -7.1 2 1.2 3.36 3280.37 16666.97 10443.5 8490 -1.4 2 1.2 3.11 3173.95 16505.21 10853.87 8388 -0.1 2 0.8 3.11 3165.26 17135.96 10704.02 8099 -0.9 -8 0.7 3.57 3092.71 18033.25 11052.23 7984 0 0 0.7 4.04 3053.05 17671 10935.47 7786 0.1 -2 0.9 4.21 3181.96 17544.22 10714.03 8086 2.6 3 1.2 4.36 2999.93 17677.9 10394.48 9315 6 5 1.3 4.75 3249.57 18470.97 10817.9 9113 6.4 8 1.5 4.43 3210.52 18409.96 11251.2 9023 8.6 8 1.9 4.7 3030.29 18941.6 11281.26 9026 6.4 9 1.8 4.81 2803.47 19685.53 10539.68 9787 7.7 11 1.9 5.01 2767.63 19834.71 10483.39 9536 9.2 13 2.2 5 2882.6 19598.93 10947.43 9490 8.6 12 2.1 4.81 2863.36 17039.97 10580.27 9736 7.4 13 2.2 5.11 2897.06 16969.28 10582.92 9694 8.6 15 2.7 5.1 3012.61 16973.38 10654.41 9647 6.2 13 2.8 5.11 3142.95 16329.89 11014.51 9753 6 16 2.9 5.21 3032.93 16153.34 10967.87 10070 6.6 10 3.4 5.21 3045.78 15311.7 10433.56 10137 5.1 14 3 5.21 3 etc...
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time10 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
BEL_20[t] = -1619.34491058766 + 0.097090018535330Nikkei[t] + 0.377623204905491DJ_Indust[t] + 0.0224418967318068Goudprijs[t] -11.9978133248867Conjunct_Seizoenzuiver[t] + 13.1960386198306Cons_vertrouw[t] + 35.1584463072643Alg_consumptie_index_BE[t] -281.151660194821Gem_rente_kasbon_5j[t] + 101.669511969855M1[t] + 111.675876231966M2[t] + 66.9582047439335M3[t] + 27.0773094453436M4[t] + 9.19557078440676M5[t] -8.26816866526923M6[t] + 43.5191316121944M7[t] + 54.7982173057046M8[t] + 90.3544111508069M9[t] + 154.637115270349M10[t] + 85.9311944465136M11[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-1619.34491058766360.842489-4.48771.7e-059e-06
Nikkei0.0970900185353300.0158196.137400
DJ_Indust0.3776232049054910.03599910.489800
Goudprijs0.02244189673180680.0086952.58110.0111280.005564
Conjunct_Seizoenzuiver-11.99781332488677.307075-1.64190.1033820.051691
Cons_vertrouw13.19603861983066.9919861.88730.0616840.030842
Alg_consumptie_index_BE35.158446307264324.310661.44620.1508850.075442
Gem_rente_kasbon_5j-281.15166019482156.829501-4.94733e-061e-06
M1101.669511969855116.8221670.87030.3859850.192993
M2111.675876231966117.859310.94750.3453880.172694
M366.9582047439335117.4191580.57020.5696410.28482
M427.0773094453436117.5755760.23030.8182770.409139
M59.19557078440676115.3902030.07970.9366240.468312
M6-8.26816866526923114.916944-0.07190.942770.471385
M743.5191316121944114.742080.37930.7051930.352597
M854.7982173057046114.6270440.47810.6335330.316767
M990.3544111508069114.6854890.78780.4324370.216218
M10154.637115270349115.0969691.34350.181790.090895
M1185.9311944465136114.5581840.75010.4547480.227374


Multiple Linear Regression - Regression Statistics
Multiple R0.94372311410716
R-squared0.890613316100117
Adjusted R-squared0.873188888576242
F-TEST (value)51.1129169024226
F-TEST (DF numerator)18
F-TEST (DF denominator)113
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation268.132458734677
Sum Squared Residuals8124136.74326266


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
13484.742824.94932725762659.79067274238
23411.132831.67944896253579.450551037465
33288.183026.34361786074261.836382139262
43280.373371.16595702633-90.7959570263253
53173.953460.59456225228-286.644562252277
63165.263186.09006272444-20.8300627244404
73092.713416.53562046413-323.825620464133
83053.053275.75311444174-222.70311444174
93181.963226.47236691210-44.5123669120959
102999.933090.11186975507-90.1818697550748
113249.573385.55429526564-135.984295265644
123210.523367.06124372353-156.541243723530
133030.293536.91507305959-506.625073059586
142803.473314.27051443885-510.800514438848
152767.633278.90181337856-511.27181337856
162882.63434.23459844578-551.634598445783
172863.362981.53971781858-118.179717818577
182897.062989.65626779428-92.5962677942793
193012.613070.89015368888-58.2801536888809
203142.953175.44209763084-32.4920976308441
213032.933114.56308713044-81.6330871304413
223045.782953.5841964616392.1958035383672
233110.522966.14395016107144.376049838927
243013.242968.4651107424644.7748892575436
252987.13029.90319403906-42.8031940390629
262995.552990.541421886935.00857811306545
272833.182664.59635271701168.583647282989
282848.962794.8872360052854.0727639947217
292794.832939.84732636752-145.017326367522
302845.262946.22098484891-100.960984848915
312915.022797.29075293645117.729247063550
322892.632660.34624676337232.283753236633
332604.422132.61689243756471.803107562441
342641.652271.92859150958369.721408490422
352659.812407.31788325785252.492116742151
362638.532399.32144294878239.208557051219
372720.252548.91463235998171.335367640016
382745.882492.10523568421253.774764315794
392735.72709.6967396233926.0032603766056
402811.72472.99135095788338.708649042122
412799.432449.88175063835349.548249361649
422555.282156.51035095622398.769649043779
432304.981878.2034968129426.776503187098
442214.951929.12242698476285.827573015238
452065.811795.90033131494269.909668685061
461940.491776.75680346372163.733196536281
4720421891.28608291027150.713917089728
481995.371743.94856603094251.421433969057
491946.811921.6839078549125.1260921450883
501765.91753.6721164336812.2278835663206
511635.251679.23165110453-43.9816511045273
521833.421771.1784904001662.2415095998413
531910.432017.38506129133-106.955061291331
541959.672369.02970769841-409.359707698409
551969.62376.18941793250-406.589417932497
562061.412345.81140615421-284.401406154209
572093.482584.35994753175-490.879947531753
582120.882515.97294061163-395.092940611629
592174.562525.63302147816-351.073021478160
602196.722567.71439975515-370.994399755147
612350.442882.44325306799-532.003253067986
622440.252897.72556474247-457.475564742468
632408.642826.54859490051-417.908594900511
642472.812915.55822575873-442.748225758727
652407.62624.86826017711-217.268260177112
662454.622827.44797155566-372.827971555662
672448.052650.93711425795-202.887114257947
682497.842663.55323750216-165.713237502159
692645.642760.68167711004-115.041677110037
702756.762710.3847425097646.3752574902388
712849.272808.5557139392340.7142860607731
722921.442864.6092694158456.8307305841598
732981.852953.8803039792727.9696960207345
743080.583168.90350949230-88.323509492304
753106.223176.90368584923-70.6836858492261
763119.312936.13144867646183.178551323542
773061.262856.49322090725204.766779092751
783097.312965.06967595899132.240324041010
793161.693110.1131946442151.5768053557948
803257.163158.0015765427699.1584234572418
813277.013185.1289212468391.8810787531733
823295.323254.4734478979240.8465521020795
833363.993369.74779724366-5.75779724366406
843494.173491.930530717492.23946928250979
853667.033685.70754337421-18.6775433742065
863813.063741.4292132235871.6307867764211
873917.963673.72249825942244.237501740584
883895.513708.68404932705186.825950672954
893801.063598.57749367387202.482506326132
903570.123313.32176750317256.798232496835
913701.613356.59519517905345.014804820952
923862.273514.41553114797347.854468852029
933970.13676.07256246039294.027437539608
944138.523988.45623625326150.063763746744
954199.753998.73254195989201.017458040108
964290.893910.76716303597380.122836964035
974443.914185.42827991608258.481720083922
984502.644262.80160010089239.838399899109
994356.983998.90291842320358.077081576795
1004591.274203.17891811961388.091081880395
1014696.964420.0950882854276.864911714602
1024621.44336.48201019186284.917989808139
1034562.844398.03746831465164.802531685346
1044202.524120.131694421782.3883055783028
1054296.494305.34034454639-8.85034454639469
1064435.234638.5329817899-203.302981789899
1074105.184150.08985488328-44.9098548832834
1084116.684240.72854501824-124.048545018241
1093844.493817.2319093179127.2580906820945
1103720.983872.06691585994-151.086915859942
1113674.43766.79191888594-92.3919188859348
1123857.623950.20310536987-92.5831053698668
1133801.063956.74444591671-155.684445916706
1143504.373528.70311771171-24.333117711709
1153032.63100.94100226371-68.3410022637077
1163047.033157.2452875544-110.215287554398
1172962.343153.97241587285-191.632415872854
1182197.822162.6123705867535.2076294132463
1192014.451896.19368260242118.256317397579
1201862.831857.377891646935.45210835307332
1211905.411975.26257577339-69.8525757733936
1221810.991765.2344591746145.7555408253865
1231670.071592.5702089974877.4997910025243
1241864.441899.79661991287-35.3566199128735
1252052.022055.93307267161-3.91307267160933
1262029.62081.41808305635-51.8180830563478
1272070.832116.80658350557-45.9765835055748
1282293.412525.39738085609-231.987380856094
1292443.272638.34145343671-195.071453436706
1302513.172722.73581916078-209.565819160776
1312466.922836.76517629852-369.845176298515
1322502.662831.12583696468-328.465836964683


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
220.05456828168177180.1091365633635440.945431718318228
230.06035855627860190.1207171125572040.939641443721398
240.1168177754948500.2336355509897010.88318222450515
250.06829510665196980.1365902133039400.93170489334803
260.04843460287105210.09686920574210420.951565397128948
270.02391070390074360.04782140780148710.976089296099256
280.03217879888748150.06435759777496310.967821201112518
290.03514379522388260.07028759044776510.964856204776117
300.02162201601990590.04324403203981180.978377983980094
310.01154593971258650.0230918794251730.988454060287413
320.006500091853481180.01300018370696240.993499908146519
330.009966631919048880.01993326383809780.99003336808095
340.006900282919063680.01380056583812740.993099717080936
350.003865410703370180.007730821406740350.99613458929663
360.002074453728364060.004148907456728120.997925546271636
370.001106374734771590.002212749469543180.998893625265228
380.002490770790479620.004981541580959250.99750922920952
390.004451241839391950.00890248367878390.995548758160608
400.01810319159957760.03620638319915520.981896808400422
410.01500815137107800.03001630274215610.984991848628922
420.01701576992972520.03403153985945030.982984230070275
430.02728874988270370.05457749976540750.972711250117296
440.05392359836449670.1078471967289930.946076401635503
450.1089171896703110.2178343793406230.891082810329689
460.3245821211628630.6491642423257260.675417878837137
470.5112287293456330.9775425413087340.488771270654367
480.5442417529403890.9115164941192210.455758247059611
490.5129532723429620.9740934553140760.487046727657038
500.4588041005219520.9176082010439030.541195899478048
510.404892386957060.809784773914120.59510761304294
520.5534477657419590.8931044685160820.446552234258041
530.6453642137558950.7092715724882110.354635786244105
540.8199906380681780.3600187238636450.180009361931822
550.8345940077660290.3308119844679420.165405992233971
560.8069318747161240.3861362505677510.193068125283876
570.8256458281583990.3487083436832020.174354171841601
580.868560164352260.2628796712954790.131439835647740
590.8486324829007150.302735034198570.151367517099285
600.823936232131270.3521275357374610.176063767868731
610.855106071908660.2897878561826800.144893928091340
620.8699273465378510.2601453069242990.130072653462149
630.9374849669119520.1250300661760950.0625150330880476
640.9946150260444950.01076994791100930.00538497395550463
650.9987190579924530.002561884015093270.00128094200754664
660.9996406524364520.0007186951270970040.000359347563548502
670.9999518736703189.62526593631777e-054.81263296815888e-05
680.9999773362010474.53275979066333e-052.26637989533167e-05
690.9999871862362772.56275274460655e-051.28137637230328e-05
700.9999923085668951.53828662102570e-057.69143310512852e-06
710.999994256018171.14879636609501e-055.74398183047504e-06
720.9999944442381631.11115236739173e-055.55576183695865e-06
730.9999973029886665.3940226676377e-062.69701133381885e-06
740.9999990419476251.91610475042714e-069.58052375213569e-07
750.999999900869321.98261362079871e-079.91306810399357e-08
760.9999999534426369.31147276026831e-084.65573638013415e-08
770.9999999904055071.91889869745944e-089.59449348729721e-09
780.999999993289911.34201782143454e-086.71008910717268e-09
790.9999999896380752.07238497873747e-081.03619248936873e-08
800.9999999910634071.78731856735111e-088.93659283675553e-09
810.999999986196682.76066403345250e-081.38033201672625e-08
820.9999999721946695.56106621715987e-082.78053310857993e-08
830.9999999633602697.32794625114006e-083.66397312557003e-08
840.9999999391705751.21658850164832e-076.08294250824162e-08
850.9999999411979961.17604007257742e-075.88020036288711e-08
860.9999999715022335.69955344438824e-082.84977672219412e-08
870.999999992516321.49673589763533e-087.48367948817664e-09
880.9999999989821982.03560455669455e-091.01780227834727e-09
890.999999999471341.05732020661709e-095.28660103308545e-10
900.9999999998172863.65428758537997e-101.82714379268999e-10
910.9999999993547491.29050230571643e-096.45251152858214e-10
920.9999999994520171.09596565757279e-095.47982828786394e-10
930.9999999978339774.33204625386485e-092.16602312693242e-09
940.9999999944842681.10314635139605e-085.51573175698023e-09
950.9999999788599064.22801877642693e-082.11400938821346e-08
960.9999999426567551.14686490986503e-075.73432454932513e-08
970.9999997756006574.48798686708328e-072.24399343354164e-07
980.999999692841376.14317259871989e-073.07158629935994e-07
990.9999998064611543.87077692299481e-071.93538846149740e-07
1000.999999182406091.63518782144992e-068.17593910724959e-07
1010.9999967613680986.47726380356991e-063.23863190178495e-06
1020.9999901617723871.96764552260977e-059.83822761304886e-06
1030.9999652064543026.95870913961568e-053.47935456980784e-05
1040.9998788308415860.000242338316828570.000121169158414285
1050.999565086480470.0008698270390597820.000434913519529891
1060.9990041543225340.001991691354932030.000995845677466013
1070.9971776603355260.005644679328948110.00282233966447406
1080.9913462726936650.01730745461266950.00865372730633476
1090.9930630620686610.01387387586267790.00693693793133896
1100.9846263253259070.03074734934818550.0153736746740927


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level480.539325842696629NOK
5% type I error level610.685393258426966NOK
10% type I error level650.730337078651685NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653299ewp1iaegagmrh5a/10a9gl1291653400.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653299ewp1iaegagmrh5a/10a9gl1291653400.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653299ewp1iaegagmrh5a/1l8j91291653400.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653299ewp1iaegagmrh5a/1l8j91291653400.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653299ewp1iaegagmrh5a/2l8j91291653400.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653299ewp1iaegagmrh5a/2l8j91291653400.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653299ewp1iaegagmrh5a/3wz1u1291653400.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653299ewp1iaegagmrh5a/3wz1u1291653400.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653299ewp1iaegagmrh5a/4wz1u1291653400.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653299ewp1iaegagmrh5a/4wz1u1291653400.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653299ewp1iaegagmrh5a/5wz1u1291653400.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653299ewp1iaegagmrh5a/5wz1u1291653400.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653299ewp1iaegagmrh5a/6780x1291653400.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653299ewp1iaegagmrh5a/6780x1291653400.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653299ewp1iaegagmrh5a/7hzzi1291653400.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653299ewp1iaegagmrh5a/7hzzi1291653400.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653299ewp1iaegagmrh5a/8hzzi1291653400.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653299ewp1iaegagmrh5a/8hzzi1291653400.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653299ewp1iaegagmrh5a/9a9gl1291653400.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653299ewp1iaegagmrh5a/9a9gl1291653400.ps (open in new window)


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