Home » date » 2010 » Dec » 03 »

deterministische trend workshop 7

*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: Thu, 02 Dec 2010 23:47:54 +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/03/t1291333554ekl05mw28yl8kuu.htm/, Retrieved Fri, 03 Dec 2010 00:46:04 +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/03/t1291333554ekl05mw28yl8kuu.htm/},
    year = {2010},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2010},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
2 9 2 1 4 3 3 3 3 3 9 2 3 4 3 3 4 3 3 9 4 2 3 4 4 4 3 3 9 3 3 2 3 3 3 3 3 9 3 2 3 3 2 2 2 3 9 1 2 4 3 3 2 2 2 9 4 4 5 4 4 5 4 3 9 2 2 4 2 2 3 2 3 9 2 2 4 4 3 2 3 4 9 2 2 2 2 2 2 2 3 9 4 2 2 3 2 4 4 3 9 3 3 4 3 2 3 3 2 9 3 2 4 4 4 3 3 3 9 2 2 5 3 4 2 3 9 3 3 5 3 3 4 3 3 9 2 2 4 3 2 2 2 3 9 3 3 3 3 3 3 3 3 9 3 3 4 4 4 4 3 2 9 2 2 4 2 2 2 2 4 9 2 2 2 3 2 2 3 3 9 1 1 4 3 3 3 2 2 9 4 3 4 4 4 4 3 3 9 3 2 4 3 3 2 3 3 9 2 2 4 3 3 2 2 2 9 3 3 4 3 4 3 3 2 9 3 3 4 4 4 4 3 4 9 4 3 4 4 2 4 4 2 9 3 2 3 4 3 3 3 3 9 3 3 3 4 3 3 3 2 9 2 2 4 4 4 4 2 4 9 2 2 3 2 4 2 2 3 9 4 3 4 3 3 3 4 2 9 4 3 4 4 3 4 4 3 9 2 2 4 3 2 3 3 3 9 2 2 4 3 2 2 3 1 9 3 3 4 4 4 4 4 3 9 3 3 4 3 3 4 3 3 9 3 2 3 2 2 2 2 3 9 3 3 4 3 3 3 3 2 9 4 3 4 4 4 4 4 3 9 3 3 4 3 4 4 3 9 1 2 3 2 2 3 3 5 9 2 1 5 2 1 4 2 4 9 2 2 4 3 2 3 2 3 9 3 3 4 3 2 3 3 2 9 4 3 4 4 4 3 4 2 9 3 2 4 4 4 3 4 3 9 2 2 5 2 2 2 2 4 9 2 3 4 3 3 4 3 2 9 3 3 4 4 3 4 3 3 9 3 3 4 3 2 4 3 4 10 4 2 3 3 1 2 2 3 10 3 2 4 4 3 3 4 4 10 2 2 4 3 2 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 time11 seconds
R Server'George Udny Yule' @ 72.249.76.132
R Framework
error message
Warning: there are blank lines in the 'Data X' field.
Please, use NA for missing data - blank lines are simply
 deleted and are NOT treated as missing values.


Multiple Linear Regression - Estimated Regression Equation
Yt[t] = + 9.35251838680335 -0.640087609275249month[t] -0.0290741578293503X1t[t] + 0.995491703191262X2t[t] + 0.114642721332865X3t[t] + 0.00880269656895907X4t[t] -0.243179688101038X5t[t] -0.104457642439144X6t[t] -0.542200790326548X7t[t] -0.0331456040618912t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)9.352518386803350.81901611.419200
month-0.6400876092752490.068035-9.408300
X1t-0.02907415782935030.13013-0.22340.8235180.411759
X2t0.9954917031912620.1411287.053800
X3t0.1146427213328650.1174720.97590.3307220.165361
X4t0.008802696568959070.0864230.10190.9190110.459505
X5t-0.2431796881010380.063292-3.84220.0001819.1e-05
X6t-0.1044576424391440.102443-1.01970.3095720.154786
X7t-0.5422007903265480.047916-11.315700
t-0.03314560406189120.005988-5.53500


Multiple Linear Regression - Regression Statistics
Multiple R0.86415787561406
R-squared0.746768833985806
Adjusted R-squared0.731158693615068
F-TEST (value)47.8387007579806
F-TEST (DF numerator)9
F-TEST (DF denominator)146
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.21870073244992
Sum Squared Residuals216.843795390000


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
122.31139229923516-0.311392299235163
234.1647724591164-1.1647724591164
332.728967123339660.271032876660345
433.94457929293671-0.944579292936707
533.92042282788315-0.92042282788315
633.81688857271178-0.816888572711783
724.16999512337462-2.16999512337462
833.85144255585159-0.851442555851587
933.15497950893917-0.154979508939173
1043.660323547501220.339676452498781
1132.284515458818210.715484541181793
1234.15187959120835-1.15187959120835
1322.64568560432208-0.645685604322078
1432.851911825292590.148088174707414
1599.28294974352176-0.282949743521756
1699.50548852544546-0.505488525445463
1797.468854817116491.53114518288351
1898.85366743637320.146332563626806
1998.749208201600380.250791798399624
2097.277465060376231.72253493962377
21910.3167460710351-1.31674607103507
2297.538796620523831.46120337947617
2398.537726741866790.462273258133211
2499.79132717984584-0.79132717984584
2598.750185174708130.249814825291873
2697.504101023224971.49589897677503
2797.793206354963861.20679364503614
2897.24797005159791.7520299484021
2997.727951080033211.27204891996679
3098.145138016521150.854861983478854
3197.915775433130891.08422456686911
3297.764817997991541.23518200200846
3397.060934636834921.93906536316508
3498.561230321791240.438769678208761
3599.85566598648348-0.855665986483481
3697.610388130493461.38961186950654
3797.558254750968891.44174524903111
3897.026063202284481.97393679771552
3998.27734402127270.722655978727309
4096.837718104970642.16228189502936
4194.181270289331004.8187297106690
4212.70804787348276-1.70804787348276
4323.49863886881370-1.49863886881370
4424.06026918370021-2.06026918370021
4533.24831392470118-0.248313924701179
4644.19676577839524-0.196765778395242
4734.69925014116946-1.69925014116946
4822.78986056742394-0.789860567423937
4923.23917692635544-1.23917692635544
5034.09706538304567-1.09706538304566
5132.307126921693960.692873078306045
5243.158532300806060.84146769919394
5333.73907536269955-0.739075362699553
5422.94343266465372-0.943432664653717
5522.22723104805192-0.227231048051920
5622.24723892614841-0.247238926148405
5723.19801039883331-1.19801039883331
5833.08577930884602-0.0857793088460195
5914.24669741149542-3.24669741149542
6052.990413942892892.00958605710711
6123.58449565470304-1.58449565470304
6233.27176006530929-0.271760065309288
6343.007939471030920.992060528969082
6443.87463062429010.125369375709896
6521.853174847194150.146825152805854
6632.531791170475710.468208829524285
6732.230274612007780.769725387992216
6832.941674259660290.0583257403397136
6931.696611803144611.30338819685539
7012.48719365208853-1.48719365208853
7132.403940004564570.596059995435434
7232.122619878901320.877380121098683
7333.5573324122704-0.557332412270402
7443.594945683504800.405054316495195
7531.721930091411621.27806990858838
7642.328872096624971.67112790337503
7732.266652334733740.733347665266264
7832.548632264500860.451367735499143
7922.88609235365934-0.88609235365934
8011.75032218945756-0.750322189457562
8125.47052579962838-3.47052579962838
8233.60333003981734-0.603330039817336
8344.01857740741917-0.0185774074191695
8433.62456632683062-0.624566326830624
8544.36447074822967-0.364470748229669
8654.126208752904420.873791247095579
8722.90754523970861-0.907545239708607
8823.11320207659631-1.11320207659631
8944.36190457337437-0.36190457337437
9043.346967903891160.653032096108835
9133.64895493248490-0.648954932484896
9243.637463172008160.362536827991844
9343.679701052556060.320298947443939
9443.404411693586260.595588306413739
9543.82789831634740.1721016836526
9644.69810502848281-0.698105028482812
9726.36174231716034-4.36174231716034
9843.529632601650110.470367398349894
9943.43313571907950.566864280920497
10043.897743227455410.102256772544589
10143.310078577621790.689921422378213
10243.915638200510380.0843617994896166
10355.60002621701524-0.600026217015241
10445.10377484538173-1.10377484538173
10542.023185586621111.97681441337889
10644.36970425247812-0.369704252478115
10733.13232590526458-0.132325905264584
10844.38898160785785-0.38898160785785
10944.28258569573763-0.282585695737626
11045.03475522847652-1.03475522847652
11134.78262067462629-1.78262067462629
11234.83493222008425-1.83493222008425
11333.77722075500175-0.77722075500175
11433.74165683542197-0.741656835421966
11543.548212174796460.451787825203541
11632.923053612207960.0769463877920404
11732.889908008146070.110091991853932
11844.02229490130181-0.0222949013018123
11933.81134173983772-0.811341739837718
12033.92191301493804-0.92191301493804
12133.75523561060766-0.755235610607657
12233.33017691887187-0.330176918871873
12333.33611682655029-0.336116826550291
12433.65338048290409-0.653380482904092
12542.982565585084841.01743441491516
12631.888556147132851.11144385286715
12743.668586392051280.331413607948717
12834.09449133033031-1.09449133033031
12945.61821243768829-1.61821243768829
13012.12787971973257-1.12787971973257
13143.421361254470850.578638745529147
13232.884078156920100.115921843079905
13342.668341182844081.33165881715592
13442.725758975786021.27424102421398
13543.780133047925680.219866952074317
13633.01487186157825-0.0148718615782511
13733.90386804574456-0.903868045744562
13832.422039432531420.577960567468577
13943.162767245466160.837232754533836
14034.36913535822434-1.36913535822434
14132.123487668490030.876512331509973
14233.04899284641422-0.0489928464142197
14342.605045075742811.39495492425719
14422.80008858136599-0.800088581365988
14532.745635582850580.254364417149421
14634.35048760677309-1.35048760677309
14732.547945751009770.452054248990233
14832.188724218314100.811275781685896
14932.477103050816630.522896949183371
15041.667566107335492.33243389266451
15132.188939549045330.811060450954672
15243.729784411370730.270215588629268
15332.667267446765980.332732553234015
15441.778163379188962.22183662081104
15533.97798492972524-0.97798492972524
15631.685117632226671.31488236777333


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
130.06165551272029270.1233110254405850.938344487279707
140.1002594976405350.2005189952810690.899740502359465
150.04252898532136260.08505797064272520.957471014678637
160.0271964549467480.0543929098934960.972803545053252
170.02104158919789750.04208317839579510.978958410802103
180.008819653712729020.01763930742545800.991180346287271
190.004537829006969950.00907565801393990.99546217099303
200.002120990034300790.004241980068601590.9978790099657
210.01483167718898840.02966335437797680.985168322811012
220.04109831059373880.08219662118747760.95890168940626
230.02815144971263120.05630289942526240.971848550287369
240.02460024602932210.04920049205864420.975399753970678
250.0141628252117480.0283256504234960.985837174788252
260.009697729007727840.01939545801545570.990302270992272
270.005346567311990190.01069313462398040.99465343268801
280.003147374268189940.006294748536379870.99685262573181
290.001817404656912620.003634809313825240.998182595343087
300.001251866230511760.002503732461023520.998748133769488
310.0008164269550537160.001632853910107430.999183573044946
320.0004249305238553430.0008498610477106860.999575069476145
330.0002471954039003810.0004943908078007620.9997528045961
340.0006645935443910080.001329187088782020.99933540645561
350.001682040144133160.003364080288266330.998317959855867
360.001301102542284990.002602205084569980.998698897457715
370.001325148130111190.002650296260222380.998674851869889
380.001444875421130270.002889750842260540.99855512457887
390.002662351908304840.005324703816609680.997337648091695
400.01389739785831060.02779479571662120.98610260214169
410.211486628503910.422973257007820.78851337149609
420.9995821799224260.000835640155148220.00041782007757411
430.9999728399008265.43201983487909e-052.71600991743954e-05
440.9999951771242219.64575155755931e-064.82287577877966e-06
450.9999943277162331.13445675339387e-055.67228376696933e-06
460.9999933965448631.3206910274554e-056.603455137277e-06
470.9999959292369258.14152615019874e-064.07076307509937e-06
480.9999927034592891.45930814225348e-057.29654071126742e-06
490.9999929907813271.40184373455203e-057.00921867276013e-06
500.9999888786652012.22426695974953e-051.11213347987477e-05
510.999984142669453.17146611003858e-051.58573305501929e-05
520.9999934436061431.31127877147450e-056.55639385737252e-06
530.999991383881341.72322373218970e-058.61611866094849e-06
540.9999895865920942.08268158118004e-051.04134079059002e-05
550.9999888646376372.22707247254288e-051.11353623627144e-05
560.999984588779963.08224400774916e-051.54112200387458e-05
570.9999810364555393.79270889223755e-051.89635444611877e-05
580.9999696025740976.07948518050991e-053.03974259025495e-05
590.9999885622927742.28754144524789e-051.14377072262394e-05
600.9999980319063753.93618725056456e-061.96809362528228e-06
610.9999981929131813.61417363735858e-061.80708681867929e-06
620.9999971113421185.77731576456481e-062.88865788228241e-06
630.9999980070040643.98599187270014e-061.99299593635007e-06
640.9999977759606714.44807865786595e-062.22403932893297e-06
650.9999974484583295.10308334164535e-062.55154167082268e-06
660.9999954537849289.092430144955e-064.5462150724775e-06
670.9999952110483039.577903395005e-064.7889516975025e-06
680.999992555836281.48883274412753e-057.44416372063764e-06
690.9999873502586222.52994827566609e-051.26497413783304e-05
700.999994534761421.0930477160019e-055.4652385800095e-06
710.9999917186306581.65627386838610e-058.28136934193048e-06
720.9999867036021122.6592795775113e-051.32963978875565e-05
730.9999822191304663.55617390673042e-051.77808695336521e-05
740.9999905090253211.89819493579333e-059.49097467896665e-06
750.9999859427374742.81145250521246e-051.40572625260623e-05
760.9999938373556641.23252886719649e-056.16264433598246e-06
770.999990250046061.94999078792658e-059.7499539396329e-06
780.9999937679393191.24641213626744e-056.23206068133722e-06
790.9999964082708047.18345839182226e-063.59172919591113e-06
800.9999980288097933.9423804145269e-061.97119020726345e-06
810.999999822632883.54734238467279e-071.77367119233640e-07
820.99999999406481.18704013228564e-085.93520066142819e-09
830.9999999923063121.53873769384124e-087.69368846920621e-09
840.9999999923153531.53692945259577e-087.68464726297886e-09
850.9999999850385582.99228834373761e-081.49614417186881e-08
860.999999993191191.36176219658614e-086.8088109829307e-09
870.9999999977865974.42680639566448e-092.21340319783224e-09
880.999999999888952.22099905898238e-101.11049952949119e-10
890.9999999997504724.99056242188086e-102.49528121094043e-10
900.9999999995116149.76771264705623e-104.88385632352812e-10
910.999999999627527.44959806899633e-103.72479903449816e-10
920.9999999991556951.68860999890972e-098.44304999454859e-10
930.9999999983298573.34028695548965e-091.67014347774483e-09
940.9999999963085527.38289650533276e-093.69144825266638e-09
950.9999999918483921.63032166361822e-088.1516083180911e-09
960.9999999870257852.59484306393927e-081.29742153196963e-08
970.9999999999491241.01752065724778e-105.08760328623891e-11
980.9999999998851822.29636645250879e-101.14818322625440e-10
990.9999999997626974.74606131269499e-102.37303065634749e-10
1000.9999999994215321.15693608705566e-095.78468043527831e-10
1010.9999999988296462.34070839120423e-091.17035419560212e-09
1020.9999999972317085.53658471037505e-092.76829235518752e-09
1030.9999999946037281.07925446692244e-085.3962723346122e-09
1040.9999999901789331.96421336230804e-089.8210668115402e-09
1050.9999999927233461.45533085816621e-087.27665429083103e-09
1060.99999998262513.47498018212213e-081.73749009106106e-08
1070.9999999803191893.93616223626171e-081.96808111813086e-08
1080.9999999633180757.336385089326e-083.668192544663e-08
1090.9999999192767881.61446423345902e-078.07232116729508e-08
1100.9999999863193022.7361396781573e-081.36806983907865e-08
1110.9999999674958586.50082845200863e-083.25041422600431e-08
1120.9999999195611341.60877731793766e-078.04388658968829e-08
1130.9999998443091133.11381773326921e-071.55690886663460e-07
1140.9999997021179315.95764137089438e-072.97882068544719e-07
1150.9999995667100028.6657999594454e-074.3328999797227e-07
1160.999999263472831.47305434067613e-067.36527170338064e-07
1170.9999988175046752.36499065025434e-061.18249532512717e-06
1180.9999986578963662.68420726845118e-061.34210363422559e-06
1190.9999971997505975.60049880676308e-062.80024940338154e-06
1200.999993412694781.31746104385961e-056.58730521929804e-06
1210.999990525893591.89482128188405e-059.47410640942026e-06
1220.9999796996205724.06007588565986e-052.03003794282993e-05
1230.9999584438227138.31123545734825e-054.15561772867413e-05
1240.9999399710665040.0001200578669910986.00289334955488e-05
1250.9998889158241070.0002221683517867530.000111084175893377
1260.9998502726455820.0002994547088356790.000149727354417839
1270.9997047388318970.000590522336205960.00029526116810298
1280.9994727050869150.001054589826170770.000527294913085385
1290.9989579451122430.002084109775513640.00104205488775682
1300.9997179003115860.0005641993768282680.000282099688414134
1310.9994434576330820.001113084733835770.000556542366917884
1320.9989873056221930.002025388755614630.00101269437780732
1330.9982976121986680.003404775602663520.00170238780133176
1340.9979644191838250.004071161632350110.00203558081617506
1350.9981433383863830.003713323227234740.00185666161361737
1360.996240927970650.007518144058699510.00375907202934976
1370.9942276346222250.01154473075555090.00577236537777543
1380.992281343631060.01543731273787780.00771865636893891
1390.9897734016259740.02045319674805140.0102265983740257
1400.975121596283050.04975680743390150.0248784037169508
1410.9624745566730160.07505088665396790.0375254433269840
1420.911532693544240.1769346129115190.0884673064557597
1430.849663611741380.3006727765172410.150336388258621


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level1090.83206106870229NOK
5% type I error level1210.923664122137405NOK
10% type I error level1260.961832061068702NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291333554ekl05mw28yl8kuu/10bmq1291333662.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291333554ekl05mw28yl8kuu/10bmq1291333662.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291333554ekl05mw28yl8kuu/10puj11291333662.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291333554ekl05mw28yl8kuu/10puj11291333662.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291333554ekl05mw28yl8kuu/20bmq1291333662.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291333554ekl05mw28yl8kuu/20bmq1291333662.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291333554ekl05mw28yl8kuu/3blmt1291333662.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291333554ekl05mw28yl8kuu/3blmt1291333662.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291333554ekl05mw28yl8kuu/4blmt1291333662.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291333554ekl05mw28yl8kuu/4blmt1291333662.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291333554ekl05mw28yl8kuu/5blmt1291333662.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291333554ekl05mw28yl8kuu/5blmt1291333662.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291333554ekl05mw28yl8kuu/63clv1291333662.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291333554ekl05mw28yl8kuu/63clv1291333662.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291333554ekl05mw28yl8kuu/7elky1291333662.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291333554ekl05mw28yl8kuu/7elky1291333662.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291333554ekl05mw28yl8kuu/8elky1291333662.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291333554ekl05mw28yl8kuu/8elky1291333662.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291333554ekl05mw28yl8kuu/9elky1291333662.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291333554ekl05mw28yl8kuu/9elky1291333662.ps (open in new window)


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