Home » date » 2010 » Nov » 24 »

ws 7 5

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Wed, 24 Nov 2010 13:43:14 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Nov/24/t1290606118w69c10s0chw6lai.htm/, Retrieved Wed, 24 Nov 2010 14:41:58 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Nov/24/t1290606118w69c10s0chw6lai.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 «
27 24 14 11 12 24 23 25 11 7 8 25 25 17 6 17 8 30 23 18 12 10 8 19 19 18 8 12 9 22 29 16 10 12 7 22 25 20 10 11 4 25 21 16 11 11 11 23 22 18 16 12 7 17 25 17 11 13 7 21 24 23 13 14 12 19 18 30 12 16 10 19 22 23 8 11 10 15 15 18 12 10 8 16 22 15 11 11 8 23 28 12 4 15 4 27 20 21 9 9 9 22 12 15 8 11 8 14 24 20 8 17 7 22 20 31 14 17 11 23 21 27 15 11 9 23 20 34 16 18 11 21 21 21 9 14 13 19 23 31 14 10 8 18 28 19 11 11 8 20 24 16 8 15 9 23 24 20 9 15 6 25 24 21 9 13 9 19 23 22 9 16 9 24 23 17 9 13 6 22 29 24 10 9 6 25 24 25 16 18 16 26 18 26 11 18 5 29 25 25 8 12 7 32 21 17 9 17 9 25 26 32 16 9 6 29 22 33 11 9 6 28 22 13 16 12 5 17 22 32 12 18 12 28 23 25 12 12 7 29 30 29 14 18 10 26 23 22 9 14 9 25 17 18 10 15 8 14 23 17 9 16 5 25 23 20 10 10 8 26 25 15 12 11 8 20 24 20 14 14 10 18 24 33 14 9 6 32 23 29 10 12 8 25 21 23 14 17 7 25 24 26 16 5 4 23 24 18 9 12 8 21 28 20 10 12 8 20 16 11 6 6 4 15 20 28 8 24 20 30 29 26 13 12 8 24 27 22 10 12 8 26 22 17 8 14 6 etc...
 
Output produced by software:

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


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
O[t] = + 16.1007876215598 -0.0711082166488146CM[t] + 0.220341505387472D[t] -0.152876682627122PE[t] -0.249255555197606PC[t] + 0.423996843472858PS[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)16.10078762155982.005398.028800
CM-0.07110821664881460.063041-1.1280.2610990.130549
D0.2203415053874720.1128341.95280.052670.026335
PE-0.1528766826271220.104464-1.46340.1453980.072699
PC-0.2492555551976060.130658-1.90770.0583050.029152
PS0.4239968434728580.0757595.596700


Multiple Linear Regression - Regression Statistics
Multiple R0.471298501870746
R-squared0.222122277865609
Adjusted R-squared0.196701437272982
F-TEST (value)8.7378022397116
F-TEST (DF numerator)5
F-TEST (DF denominator)153
p-value2.60674177576803e-07
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.50596517552417
Sum Squared Residuals1880.64414723419


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12722.98218556949184.01781443050821
22324.2825786314523-1.28257863145234
32524.34095422879860.659045771201429
42321.9980665446631.00193345533700
51921.8336821330798-2.83368213307984
62922.91509268754766.08490731245238
72524.80329369959090.196706300409119
82122.7152854982447-1.71528549824465
92221.97494106921050.0250589307894630
102522.48745245018632.51254754981370
112420.25433801550753.74566198449251
121819.7289967387193-1.72899673871928
132218.41378427295533.58621572704472
141520.7260760142444-5.72607601424443
152223.5341603804863-1.53416038048629
162824.28659735689383.71340264310620
172022.2993290364022-2.29932903640223
181219.0571642730681-7.05716427306815
192421.42559339704182.57440660295819
202021.3924266689121-1.39242666891212
212123.3129722470528-2.31297224705279
222020.6189146601678-0.61891466016778
232119.26593287205761.73406712794237
242321.09034589553051.9096541044695
252821.97773698347256.02226301652755
262421.94126536196902.05873463803104
272423.47293435329970.52706564670029
282420.41583177547523.58416822452483
292322.00607772830930.993922271690717
302322.72002183808180.279978161918176
312924.32610308785474.67389691214535
322422.13259505138341.86740494861663
331824.9735809453894-6.97358094538944
342526.0744041616619-1.07440416166193
352122.6327389723991-1.63273897239909
362626.7752737608804-0.775273760880398
372225.1784611738214-3.17846117382137
382222.8289932628498-0.828993262849823
392222.5984874210279-0.598487421027921
402325.6837796527932-2.68377965279324
413022.90301250519887.0969874948012
422322.73582793703640.264172062963616
431718.6730159033882-1.67301590338816
442323.7826378758166-0.782637875816639
452324.3831450049004-1.38314500490044
462522.48251135545522.51748864454482
472420.76251843776383.23748156223624
482427.5354730638752-3.53547306387521
492323.013420846334-0.0134208463340025
502123.8063083098388-2.80630830983878
512425.7679598408398-1.76795984083984
522421.87928235019212.12071764980794
532821.53341057880906.46658942119095
541621.0863166062874-5.08631660628735
552019.93824341567540.0617565843245719
562923.463773168975.53622683103
572723.93517520634863.06482479365144
582223.1947973370129-1.19479733701295
592824.05065111670893.94934888329110
601620.3649096621750-4.36490966217502
612522.97312554206182.02687445793816
622423.50392416381980.496075836180247
632823.68469137006764.3153086299324
642424.3948900774714-0.394890077471401
652322.72113925004430.278860749955726
663026.98414012603283.01585987396719
672421.311407554472.68859244553002
682124.1992785117533-3.19927851175327
692523.3568931102851.64310688971498
702524.02661298418790.973387015812072
712220.77311739004121.22688260995881
722322.51605973662220.483940263377783
732622.86207920816453.13792079183554
742321.60210792497011.39789207502990
752523.04628505340681.95371494659318
762121.3200859288626-0.320085928862601
772523.68216538814161.31783461185842
782422.19597013942901.80402986057096
792923.62294570190565.37705429809438
802223.6505049961384-1.65050499613838
812723.67004837475443.32995162524556
822619.67514714276536.32485285723467
832221.32611184683520.673888153164806
842422.10269394449471.89730605550531
852723.13672850304093.86327149695906
862421.32039269223682.67960730776318
872424.9069267712173-0.906926771217318
882924.50093826190294.49906173809706
892222.2661656990094-0.266165699009353
902120.58178382023690.418216179763108
912420.41038340479323.58961659520677
922421.82880621579072.17119378420933
932321.97259113384741.02740886615261
942022.279068894971-2.27906889497098
952721.46253970577525.53746029422485
962623.46626995291192.53373004708814
972521.94225715101793.05774284898208
982120.06417567205180.935824327948169
992120.78543915832230.214560841677722
1001920.3903237759386-1.39032377593858
1012121.6349353010046-0.634935301004597
1022121.3024414128131-0.302441412813057
1031619.7444211846365-3.74442118463651
1042220.7017996865281.29820031347199
1052921.85581752264447.1441824773556
1061521.6878883349162-6.68788833491623
1071720.7286345848914-3.72863458489142
1081519.9532515703311-4.95325157033112
1092121.7008324905864-0.700832490586391
1102121.0066281433363-0.00662814333629869
1111919.2957595789363-0.295759578936263
1122418.06733919659905.93266080340104
1132022.4284701075653-2.42847010756527
1141725.2117708701399-8.21177087013988
1152325.1139465965675-2.11394659656751
1162422.39604726106791.60395273893209
1171422.0787535781367-8.07875357813666
1181922.9242178924195-3.92421789241954
1192422.19934360098161.80065639901840
1201320.3943031311854-7.39430313118542
1212225.4191648291204-3.41916482912037
1221621.1576664088684-5.15766640886844
1231923.3390243535785-4.33902435357853
1242522.86403985743612.13596014256388
1252524.24469929156580.755300708434188
1262321.41336551453381.58663448546623
1272423.59903792426860.400962075731441
1282623.60261614071512.39738385928493
1292621.54461493512774.45538506487232
1302524.18722752738860.81277247261139
1311822.4068796765704-4.40687967657038
1322119.90151456612541.0984854338746
1332623.69902760200652.30097239799347
1342321.98481901635541.01518098364457
1352319.76631498826883.2336850117312
1362222.5902422845035-0.590242284503534
1372022.4111657951914-2.41116579519144
1381322.1381746285297-9.13817462852975
1392421.48079350625582.51920649374420
1401521.6539345726315-6.65393457263151
1411423.1850594569731-9.18505945697312
1422224.121841856075-2.12184185607499
1431017.7287537233398-7.7287537233398
1442424.5001568112989-0.500156811298874
1452221.88316733001280.116832669987208
1462425.8348513586269-1.83485135862688
1471921.6372239393157-2.63722393931569
1482022.1391981547192-2.13919815471916
1491317.1082779500906-4.10827795009065
1502020.146246659087-0.146246659087016
1512223.3199882509133-1.31998825091329
1522423.37107452132630.628925478673697
1532923.16314118732715.83685881267292
1541220.9396135417921-8.93961354179206
1552020.9804482210829-0.980448221082944
1562121.4480313076632-0.44803130766325
1572423.69477492368700.305225076313032
1582221.94307119034300.0569288096570307
1592017.73709747760762.26290252239236


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.7610618130989850.4778763738020290.238938186901014
100.6421522010094480.7156955979811030.357847798990552
110.5226549547416130.9546900905167740.477345045258387
120.476485795178290.952971590356580.52351420482171
130.5034459803739270.9931080392521470.496554019626073
140.7204440581309550.5591118837380910.279555941869045
150.6560507799711860.6878984400576290.343949220028814
160.6137224027697510.7725551944604980.386277597230249
170.5506215175117890.8987569649764210.449378482488211
180.6603404702184150.679319059563170.339659529781585
190.5874921033891550.825015793221690.412507896610845
200.599910689595960.800178620808080.40008931040404
210.5562926062965140.8874147874069710.443707393703486
220.4882761467208630.9765522934417250.511723853279137
230.4261965625964750.852393125192950.573803437403525
240.4262391750374370.8524783500748740.573760824962563
250.5653286833019510.8693426333960980.434671316698049
260.5028998786259060.9942002427481870.497100121374093
270.4385862580758650.877172516151730.561413741924135
280.431882165636730.863764331273460.56811783436327
290.3698863509225350.7397727018450710.630113649077464
300.3111429669731710.6222859339463420.688857033026829
310.3341460927232170.6682921854464340.665853907276783
320.2823097509817620.5646195019635250.717690249018238
330.5050750920675840.989849815864830.494924907932415
340.4598960654950410.9197921309900820.540103934504959
350.4247676406930180.8495352813860360.575232359306982
360.3683133100286230.7366266200572470.631686689971377
370.3455730237702920.6911460475405830.654426976229708
380.2949532492346920.5899064984693840.705046750765308
390.2488270992659450.4976541985318910.751172900734055
400.2251824768616520.4503649537233050.774817523138348
410.3785020127160580.7570040254321160.621497987283942
420.3274778527029060.6549557054058130.672522147297094
430.2939462944267860.5878925888535720.706053705573214
440.2505909885228880.5011819770457770.749409011477112
450.2173990120299900.4347980240599790.78260098797001
460.1950180583978300.3900361167956610.80498194160217
470.1816082996966240.3632165993932490.818391700303376
480.1685866375244230.3371732750488450.831413362475577
490.1380945007132750.2761890014265490.861905499286725
500.1279404656624580.2558809313249160.872059534337542
510.1059702708320390.2119405416640770.894029729167961
520.089941508238660.179883016477320.91005849176134
530.1483548149892090.2967096299784170.851645185010791
540.1800111005226060.3600222010452120.819988899477394
550.1732755066087670.3465510132175340.826724493391233
560.2293642147041570.4587284294083140.770635785295843
570.2195072276329700.4390144552659400.78049277236703
580.1886873844930730.3773747689861470.811312615506927
590.1991083310907370.3982166621814750.800891668909263
600.2284447398879710.4568894797759420.77155526011203
610.2014580229871250.402916045974250.798541977012875
620.1696565523923780.3393131047847560.830343447607622
630.1845379343657620.3690758687315240.815462065634238
640.1563682286995640.3127364573991290.843631771300436
650.1293836235394550.2587672470789100.870616376460545
660.1252372264675860.2504744529351730.874762773532414
670.1147226176779660.2294452353559320.885277382322034
680.1150635398107610.2301270796215230.884936460189239
690.09781217758461990.1956243551692400.90218782241538
700.08000681981452310.1600136396290460.919993180185477
710.06530921589906880.1306184317981380.934690784100931
720.05177757888973220.1035551577794640.948222421110268
730.04869168050985560.09738336101971120.951308319490144
740.0391536408137210.0783072816274420.960846359186279
750.0327517076337370.0655034152674740.967248292366263
760.02524953351896140.05049906703792280.974750466481039
770.01987801723782720.03975603447565440.980121982762173
780.01594764202757390.03189528405514790.984052357972426
790.02359034305213220.04718068610426440.976409656947868
800.01885548627546740.03771097255093480.981144513724533
810.01836838669770060.03673677339540110.9816316133023
820.03281462710839130.06562925421678270.967185372891609
830.02540800364715350.0508160072943070.974591996352847
840.02127412630551310.04254825261102620.978725873694487
850.02332675317860860.04665350635721730.976673246821391
860.0208038418957160.0416076837914320.979196158104284
870.01589201136201950.03178402272403910.98410798863798
880.02060901993369260.04121803986738520.979390980066307
890.01633876336296510.03267752672593030.983661236637035
900.01228547609714730.02457095219429450.987714523902853
910.01240968280972230.02481936561944450.987590317190278
920.01089193161672320.02178386323344650.989108068383277
930.008397844045307920.01679568809061580.991602155954692
940.006954377881051850.01390875576210370.993045622118948
950.01268757026202320.02537514052404650.987312429737977
960.01153837611875350.02307675223750710.988461623881246
970.01100726837737900.02201453675475810.98899273162262
980.008472686417339930.01694537283467990.99152731358266
990.006288619223921310.01257723844784260.993711380776079
1000.004839968127998570.009679936255997140.995160031872001
1010.003601604552226070.007203209104452140.996398395447774
1020.002578486537578040.005156973075156080.997421513462422
1030.002758813951051470.005517627902102950.997241186048949
1040.002175702845250650.00435140569050130.99782429715475
1050.009102389741956920.01820477948391380.990897610258043
1060.02026745527607140.04053491055214280.979732544723929
1070.02017772737707970.04035545475415950.97982227262292
1080.0254803582767060.0509607165534120.974519641723294
1090.01982573610055810.03965147220111620.980174263899442
1100.01460095195607070.02920190391214150.98539904804393
1110.01065945079489390.02131890158978770.989340549205106
1120.0259665655265970.0519331310531940.974033434473403
1130.02378966379604360.04757932759208720.976210336203956
1140.06542837527981190.1308567505596240.934571624720188
1150.05637027332980990.1127405466596200.94362972667019
1160.04612834507156610.09225669014313220.953871654928434
1170.1321930639967030.2643861279934060.867806936003297
1180.1275700505777090.2551401011554180.87242994942229
1190.1139734070165520.2279468140331050.886026592983448
1200.1954596967199740.3909193934399490.804540303280026
1210.1874076495061760.3748152990123510.812592350493824
1220.2226176627297030.4452353254594070.777382337270297
1230.2165690459609180.4331380919218370.783430954039082
1240.2161968093111790.4323936186223570.783803190688821
1250.1980543298387070.3961086596774150.801945670161293
1260.1634980828757260.3269961657514520.836501917124274
1270.1299090692460920.2598181384921840.870090930753908
1280.1344144751442470.2688289502884930.865585524855753
1290.1902087825267230.3804175650534450.809791217473278
1300.1660159448253260.3320318896506520.833984055174674
1310.1472815275431390.2945630550862790.85271847245686
1320.1293530194144750.2587060388289500.870646980585525
1330.1199843719629170.2399687439258340.880015628037083
1340.09975902886246690.1995180577249340.900240971137533
1350.1349896127424430.2699792254848870.865010387257557
1360.1027046409128130.2054092818256260.897295359087187
1370.07698445809870310.1539689161974060.923015541901297
1380.1877057864635630.3754115729271260.812294213536437
1390.2613033288023510.5226066576047020.738696671197649
1400.2421298966270620.4842597932541240.757870103372938
1410.4869183831220390.9738367662440770.513081616877961
1420.4388218459836630.8776436919673260.561178154016337
1430.7496694010908750.500661197818250.250330598909125
1440.6996712039798970.6006575920402070.300328796020103
1450.6009163598806050.7981672802387910.399083640119395
1460.5380748047556420.9238503904887160.461925195244358
1470.5606659498867790.8786681002264410.439334050113221
1480.4332756750981670.8665513501963330.566724324901833
1490.3400566648954190.6801133297908380.659943335104581
1500.2435626919644850.487125383928970.756437308035515


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level50.0352112676056338NOK
5% type I error level330.232394366197183NOK
10% type I error level420.295774647887324NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290606118w69c10s0chw6lai/10etf71290606183.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290606118w69c10s0chw6lai/10etf71290606183.ps (open in new window)


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


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


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


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


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290606118w69c10s0chw6lai/5btg11290606183.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290606118w69c10s0chw6lai/5btg11290606183.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290606118w69c10s0chw6lai/6mkym1290606183.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290606118w69c10s0chw6lai/6mkym1290606183.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290606118w69c10s0chw6lai/7mkym1290606183.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290606118w69c10s0chw6lai/7mkym1290606183.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290606118w69c10s0chw6lai/8etf71290606183.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290606118w69c10s0chw6lai/8etf71290606183.ps (open in new window)


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


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





Copyright

Creative Commons License

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

Software written by Ed van Stee & Patrick Wessa


Disclaimer

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


Privacy Policy

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

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

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

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

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

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

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

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

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


FreeStatistics.org is powered by