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 15:17:57 +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/t1291648573i6m23osrkpohufi.htm/, Retrieved Mon, 06 Dec 2010 16:16:24 +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/t1291648573i6m23osrkpohufi.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 2.77 3411.13 14153.22 9327.78 8241 -6.2 3 1 2.76 3288.18 15418.03 9753.63 8444 -7.1 2 1.2 2.76 3280.37 16666.97 10443.5 8490 -1.4 2 1.2 2.46 3173.95 16505.21 10853.87 8388 -0.1 2 0.8 2.46 3165.26 17135.96 10704.02 8099 -0.9 -8 0.7 2.47 3092.71 18033.25 11052.23 7984 0 0 0.7 2.71 3053.05 17671 10935.47 7786 0.1 -2 0.9 2.8 3181.96 17544.22 10714.03 8086 2.6 3 1.2 2.89 2999.93 17677.9 10394.48 9315 6 5 1.3 3.36 3249.57 18470.97 10817.9 9113 6.4 8 1.5 3.31 3210.52 18409.96 11251.2 9023 8.6 8 1.9 3.5 3030.29 18941.6 11281.26 9026 6.4 9 1.8 3.51 2803.47 19685.53 10539.68 9787 7.7 11 1.9 3.71 2767.63 19834.71 10483.39 9536 9.2 13 2.2 3.71 2882.6 19598.93 10947.43 9490 8.6 12 2.1 3.71 2863.36 17039.97 10580.27 9736 7.4 13 2.2 4.21 2897.06 16969.28 10582.92 9694 8.6 15 2.7 4.21 3012.61 16973.38 10654.41 9647 6.2 13 2.8 4.21 3142.95 16329.89 11014.51 9753 6 16 2.9 4.5 3032.93 16153.34 10967.87 10070 6.6 10 3.4 4.51 3045.78 15311.7 10433.56 10137 5.1 14 3 4.51 etc...
 
Output produced by software:

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


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time9 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
BEL_20[t] = -1829.91346353290 + 0.0932493209745398Nikkei[t] + 0.340625474153254DJ_Indust[t] -0.0461339961375057Goudprijs[t] -3.13234058387437Conjunct_Seizoenzuiver[t] -3.40204073251154Cons_vertrouw[t] -40.6029474729970Alg_consumptie_index_BE[t] + 46.1458989103431Gem_rente_kasbon_1j[t] + 166.234384975720M1[t] + 211.441636202194M2[t] + 145.674425778467M3[t] + 104.382150990713M4[t] + 55.5711165024448M5[t] -4.54850954972528M6[t] -9.27999423012134M7[t] -1.80540573459105M8[t] + 65.0922035015173M9[t] + 102.426980918673M10[t] + 78.1752424408722M11[t] + 7.05246043891046t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-1829.91346353290396.703255-4.61281.1e-055e-06
Nikkei0.09324932097453980.0201514.62751e-055e-06
DJ_Indust0.3406254741532540.0439377.752600
Goudprijs-0.04613399613750570.021183-2.17790.0315120.015756
Conjunct_Seizoenzuiver-3.132340583874378.45438-0.37050.711710.355855
Cons_vertrouw-3.402040732511547.501817-0.45350.6510690.325535
Alg_consumptie_index_BE-40.602947472997031.022759-1.30880.1932770.096639
Gem_rente_kasbon_1j46.145898910343147.002120.98180.3283230.164161
M1166.234384975720125.3763341.32590.1875760.093788
M2211.441636202194125.9775551.67840.0960560.048028
M3145.674425778467125.9464021.15660.2498810.124941
M4104.382150990713126.4405950.82550.4108180.205409
M555.5711165024448123.9264420.44840.6547160.327358
M6-4.54850954972528124.324802-0.03660.970880.48544
M7-9.27999423012134124.738355-0.07440.9408280.470414
M8-1.80540573459105124.942163-0.01440.9884970.494248
M965.0922035015173124.5632360.52260.602310.301155
M10102.426980918673124.3672760.82360.4119260.205963
M1178.1752424408722123.5253670.63290.528110.264055
t7.052460438910462.7957932.52250.0130560.006528


Multiple Linear Regression - Regression Statistics
Multiple R0.934941793727624
R-squared0.874116157658626
Adjusted R-squared0.852760862975715
F-TEST (value)40.932057863762
F-TEST (DF numerator)19
F-TEST (DF denominator)112
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation288.923167774606
Sum Squared Residuals9349378.85021425


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
13484.742534.02114712633950.718852873674
23411.132608.47459422049802.655405779515
33288.182801.49323261313486.686767386874
43280.373084.88324623281195.486753767186
53173.953184.69794168707-10.7479416870737
63165.263193.785816389-28.5258163889966
73092.713384.73266462838-292.022664628377
83053.053337.36663672685-284.316636726849
93181.963277.35744518876-95.3974451887568
102999.933168.8389390444-168.908939044399
113249.573357.25266260533-107.682662605332
123210.523417.82120965294-207.301209652936
133030.293658.79478612352-628.50478612352
142803.473487.00921576899-683.539215768993
152767.633410.92774799485-643.297747994851
162882.63524.22935742517-641.629357425168
172863.363126.80591151088-263.445911510876
182897.063039.12287284004-142.062872840037
193012.613078.60718789925-65.9971878992468
203142.953150.64062278773-7.6906227877324
213032.933176.30910125195-143.379101251949
223045.782964.4549327019381.3250672980713
233110.522979.24232169379131.277678306210
243013.242902.5991972917110.640802708298
252987.13051.6343875118-64.5343875117993
262995.553109.55371282317-114.003712823174
272833.182754.8844676888978.2955323111083
282848.962839.498385309749.4616146902643
292794.832933.93648470224-139.106484702244
302845.262850.05605188813-4.79605188812484
312915.022686.73642490625228.283575093747
322892.632626.10126646834266.528733531663
332604.422121.19596131122483.224038688777
342641.652299.05784858478342.592151415219
352659.812480.17418366772179.635816332280
362638.532453.56456329165184.965436708353
372720.252517.19035019666203.05964980334
382745.882514.41301750447231.466982495533
392735.72797.79835498630-62.0983549863025
402811.72679.8979854921131.802014507899
412799.432644.01113865752155.418861342482
422555.282348.67071174700206.609288253004
432304.982010.83414680724294.145853192756
442214.951991.2180815781223.731918421901
452065.811830.89276859119234.917231408806
461940.491791.83042103848148.659578961518
4720421982.5835496961559.416450303854
481995.371857.72597228793137.644027712072
491946.811993.81250060264-47.0025006026429
501765.91838.89297939166-72.9929793916587
511635.251814.84101277089-179.591012770887
521833.421890.77697325789-57.3569732578883
531910.431958.42336958905-47.9933695890542
541959.672117.66138002378-157.991380023775
551969.62216.31774557692-246.717745576917
562061.412254.13152166134-192.721521661344
572093.482416.70330871334-323.223308713343
582120.882597.23667872717-476.356678727169
592174.562495.02958803531-320.469588035314
602196.722563.62674243379-366.906742433792
612350.442934.02667244014-583.586672440137
622440.252990.70106878267-550.451068782671
632408.642903.76169847032-495.121698470325
642472.812900.43142873969-427.621428739685
652407.62669.06550322987-261.465503229871
662454.622746.57851880803-291.958518808029
672448.052665.6779765628-217.627976562798
682497.842600.56767631484-102.727676314841
692645.642748.01841625171-102.378416251705
702756.762689.5635600569667.1964399430367
712849.272826.2226980406923.0473019593099
722921.442878.7450354756842.6949645243168
732981.853042.11576961814-60.2657696181366
743080.583153.26314225632-72.6831422563204
753106.223079.2714331808226.948566819183
763119.312896.81616927087222.493830729126
773061.262889.47106478781171.788935212188
783097.312852.49225484560244.817745154395
793161.692895.27782162376266.412178376245
803257.162947.30052442882309.859475571180
813277.013061.78557865143215.224421348566
823295.323049.03014569472246.289854305285
833363.993233.94162174953130.048378250467
843494.173273.1038096405221.066190359502
853667.033469.59436554623197.435634453773
863813.063551.59897984671261.461020153290
873917.963613.58137426977304.378625730234
883895.513635.03947158522260.470528414775
893801.063511.31668029212289.743319707881
903570.123296.57809190852273.541908091477
913701.613292.539780215409.070219784997
923862.273456.6463434808405.623656519201
933970.13693.417149394276.682850606002
944138.523929.60727773035208.912722269645
954199.753911.98732717343287.762672826574
964290.894009.28330579892281.606694201080
974443.914249.84639433541194.063605664587
984502.644347.72760198227154.912398017730
994356.984140.16728673163216.812713268371
1004591.274275.46543564731315.804564352688
1014696.964501.35724635082195.602753649178
1024621.44531.6153316664389.7846683335693
1034562.844612.75642372264-49.9164237226385
1044202.524356.34248836437-153.822488364367
1054296.494465.59284961735-169.102849617354
1064435.234636.2088858338-200.978885833801
1074105.184216.15173970512-110.971739705118
1084116.684196.54296930608-79.8629693060819
1093844.493823.1034584372021.3865415627959
1103720.983759.29648754651-38.3164875465073
1113674.43497.55663226248176.843367737517
1123857.623806.189693634751.4303063652964
1133801.063855.63915298752-54.5791529875167
1143504.373560.90942307378-56.5394230737847
1153032.63209.19378241135-176.59378241135
1163047.033346.12310492481-299.093104924814
1172962.343186.03912753891-223.699127538906
1182197.822318.32840662910-120.508406629096
1192014.452178.30728940516-163.857289405160
1201862.832103.58222525945-240.752225259453
1211905.412088.18016806193-182.770168061932
1221810.991729.4991998767481.490800123258
1231670.071579.9267590309290.1432409690804
1241864.441924.78185340449-60.3418534044938
1252052.022087.23550620509-35.2155062050931
1262029.62162.4795468097-132.879546809699
1272070.832219.86604564642-149.036045646417
1282293.412458.78173326400-165.371733263996
1292443.272596.13829349014-152.868293490137
1302513.172641.39290395831-128.222903958309
1312466.922575.12701822777-108.207018227771
1322502.662586.45496956136-83.7949695613586


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
230.1712011369770580.3424022739541160.828798863022942
240.07797231378567170.1559446275713430.922027686214328
250.04448017234901210.08896034469802420.955519827650988
260.01967823655064790.03935647310129580.980321763449352
270.008032527798524160.01606505559704830.991967472201476
280.003193441165874030.006386882331748060.996806558834126
290.001800285225304960.003600570450609930.998199714774695
300.0007425835063811320.001485167012762260.999257416493619
310.0002847965915119730.0005695931830239470.999715203408488
329.23169701472007e-050.0001846339402944010.999907683029853
338.74074571100918e-050.0001748149142201840.99991259254289
343.22256377037297e-056.44512754074594e-050.999967774362296
351.47821129305409e-052.95642258610819e-050.99998521788707
367.36243329036599e-061.47248665807320e-050.99999263756671
372.64384878591697e-065.28769757183394e-060.999997356151214
381.81169348658725e-063.6233869731745e-060.999998188306513
391.46464270762981e-062.92928541525961e-060.999998535357292
401.80146198055577e-053.60292396111153e-050.999981985380194
410.0001470905514912540.0002941811029825080.999852909448509
427.57608683876598e-050.0001515217367753200.999924239131612
433.99819601600853e-057.99639203201706e-050.99996001803984
443.80725861247481e-057.61451722494961e-050.999961927413875
454.44751874736872e-058.89503749473744e-050.999955524812526
466.02384948960904e-050.0001204769897921810.999939761505104
470.0001354991835468140.0002709983670936280.999864500816453
480.0001689066570318330.0003378133140636670.999831093342968
490.0003060303470628080.0006120606941256170.999693969652937
500.0001957839225547260.0003915678451094520.999804216077445
510.0001011484362402340.0002022968724804680.99989885156376
528.75825791807284e-050.0001751651583614570.99991241742082
530.0001898981653972360.0003797963307944710.999810101834603
540.0002634258457781410.0005268516915562820.999736574154222
550.0003179922385319030.0006359844770638060.999682007761468
560.0006858339568037060.001371667913607410.999314166043196
570.0005486656443363960.001097331288672790.999451334355664
580.001918579777582450.003837159555164890.998081420222418
590.001627037932717580.003254075865435160.998372962067282
600.001327861421343430.002655722842686870.998672138578657
610.001487044513869950.002974089027739890.99851295548613
620.001876216515224640.003752433030449270.998123783484775
630.01177773261972970.02355546523945950.98822226738027
640.1218879562300680.2437759124601350.878112043769932
650.4248431393804520.8496862787609040.575156860619548
660.646089287875680.707821424248640.35391071212432
670.8230851015944660.3538297968110690.176914898405534
680.9041063719507030.1917872560985950.0958936280492974
690.9735526169279250.05289476614414930.0264473830720746
700.9921459368017130.01570812639657400.00785406319828702
710.998266543086080.003466913827841940.00173345691392097
720.9998048095230080.0003903809539843550.000195190476992177
730.9999851237930352.97524139291884e-051.48762069645942e-05
740.99999853643022.92713960125355e-061.46356980062678e-06
750.9999999429729091.14054183072453e-075.70270915362265e-08
760.999999989018192.19636210976787e-081.09818105488393e-08
770.9999999982148333.57033419681764e-091.78516709840882e-09
780.9999999989853492.02930261770487e-091.01465130885243e-09
790.999999998756942.48612222058396e-091.24306111029198e-09
800.9999999993357861.32842806664082e-096.64214033320408e-10
810.9999999994034031.19319302796948e-095.96596513984742e-10
820.9999999993945661.21086798880362e-096.0543399440181e-10
830.9999999986249182.75016349222907e-091.37508174611454e-09
840.9999999966453326.70933669451476e-093.35466834725738e-09
850.999999994033521.19329606682527e-085.96648033412636e-09
860.999999991451181.70976397591806e-088.5488198795903e-09
870.999999994714081.05718405349796e-085.28592026748981e-09
880.9999999989655262.06894714538849e-091.03447357269425e-09
890.9999999998788492.42302823955694e-101.21151411977847e-10
900.9999999999800583.98849026661947e-111.99424513330974e-11
910.9999999999415961.16807648829504e-105.8403824414752e-11
920.9999999997940764.11848942936719e-102.05924471468359e-10
930.9999999990895231.8209540439428e-099.104770219714e-10
940.9999999981258873.74822513059431e-091.87411256529715e-09
950.9999999919997621.60004754459736e-088.00023772298682e-09
960.9999999726491375.47017251086111e-082.73508625543055e-08
970.9999999019078271.96184346855913e-079.80921734279566e-08
980.9999995804106478.39178706135815e-074.19589353067908e-07
990.9999985759627152.84807456906469e-061.42403728453235e-06
1000.9999949618209861.00763580274477e-055.03817901372386e-06
1010.9999841942836363.16114327278508e-051.58057163639254e-05
1020.9999574886331058.50227337893005e-054.25113668946502e-05
1030.9999246408023470.0001507183953051507.53591976525749e-05
1040.9997322487938580.0005355024122841930.000267751206142096
1050.9992853549620.001429290076000780.000714645038000389
1060.9988048775595750.002390244880849630.00119512244042482
1070.9964528192782960.007094361443408550.00354718072170427
1080.986526025389670.02694794922066030.0134739746103301
1090.9646131041884940.07077379162301250.0353868958115063


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level720.827586206896552NOK
5% type I error level770.885057471264368NOK
10% type I error level800.919540229885057NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291648573i6m23osrkpohufi/10so1t1291648666.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291648573i6m23osrkpohufi/10so1t1291648666.ps (open in new window)


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


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


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


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


http://www.freestatistics.org/blog/date/2010/Dec/06/t1291648573i6m23osrkpohufi/57o3o1291648666.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291648573i6m23osrkpohufi/57o3o1291648666.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/06/t1291648573i6m23osrkpohufi/67o3o1291648666.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291648573i6m23osrkpohufi/67o3o1291648666.ps (open in new window)


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


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


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


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





Copyright

Creative Commons License

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

Software written by Ed van Stee & Patrick Wessa


Disclaimer

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


Privacy Policy

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

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

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

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

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

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

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

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

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


FreeStatistics.org is powered by