Home » date » 2010 » Dec » 21 »

PAPER BAEYENS (Multiple Linear Regression1)

*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: Tue, 21 Dec 2010 13:34:26 +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/21/t1292939625yuprl7itvxbmp9b.htm/, Retrieved Tue, 21 Dec 2010 14:53:55 +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/21/t1292939625yuprl7itvxbmp9b.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 «
13 5 14 12 3 18 15 0 11 12 7 12 10 4 16 12 1 18 15 6 14 9 3 14 12 12 15 11 0 15 11 5 17 11 6 19 15 6 10 7 6 16 11 2 18 11 1 14 10 5 14 14 7 17 10 3 14 6 3 16 11 3 18 15 7 11 11 8 14 12 6 12 14 3 17 15 5 9 9 5 16 13 10 14 13 2 15 16 6 11 13 4 16 12 6 13 14 8 17 11 4 15 9 5 14 16 10 16 12 6 9 10 7 15 13 4 17 16 10 13 14 4 15 15 3 16 5 3 16 8 3 12 11 3 12 16 7 11 17 15 15 9 0 15 9 0 17 13 4 13 10 5 16 6 5 14 12 2 11 8 3 12 14 0 12 12 9 15 11 2 16 16 7 15 8 7 12 15 0 12 7 0 8 16 10 13 14 2 11 16 1 14 9 8 15 14 6 10 11 11 11 13 3 12 15 8 15 5 6 15 15 9 14 13 9 16 11 8 15 11 8 15 12 7 13 12 6 12 12 5 17 12 4 13 14 6 15 6 3 13 7 2 15 14 12 16 14 8 15 10 5 16 13 9 15 12 6 14 9 5 15 12 2 14 16 4 13 10 7 7 14 5 17 10 6 13 16 7 15 15 8 14 12 6 13 10 0 16 8 1 12 8 5 14 11 5 17 13 5 15 16 7 17 16 7 12 14 1 16 11 3 11 4 4 15 14 8 9 9 6 16 14 6 15 8 2 10 8 2 10 11 3 15 12 3 11 11 0 13 14 2 14 15 8 18 16 8 16 1 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 time6 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
IEP[t] = + 12.4178609588345 + 0.272671749159568WP[t] -0.123934071881719HS[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)12.41786095883451.4282518.694500
WP0.2726717491595680.0725953.75610.0002450.000122
HS-0.1239340718817190.096627-1.28260.2015690.100784


Multiple Linear Regression - Regression Statistics
Multiple R0.307001335081348
R-squared0.0942498197417304
Adjusted R-squared0.0824099481043673
F-TEST (value)7.96037513145893
F-TEST (DF numerator)2
F-TEST (DF denominator)153
p-value0.000514215104067017
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.81302234661533
Sum Squared Residuals1210.70349255125


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11312.04614269828830.953857301711705
21211.00506291244230.994937087557735
31511.05458616813563.9454138318644
41212.8393543403708-0.83935434037085
51011.5256028053653-1.52560280536527
61210.45971941412311.54028058587687
71512.31881444744782.68118555255216
8911.5007991999691-2.50079919996914
91213.8309108705235-1.83091087052353
101110.55884988060870.441150119391281
111111.6743404826431-0.674340482643119
121111.6991440880392-0.699144088039249
131512.81455073497472.18544926502528
14712.0709463036844-5.07094630368441
151110.73239116328270.267608836717303
161110.955455701650.0445442983499943
171012.0461426982883-2.04614269828828
181412.21968398096231.78031601903775
191011.5007991999691-1.50079919996914
20611.2529310562057-5.2529310562057
211111.0050629124423-0.00506291244226453
221512.96328841225262.03671158774743
231112.864157945767-1.86415794576698
241212.5666825912113-0.566682591211283
251411.1289969843242.87100301567602
261512.66581305769692.33418694230313
27911.7982745545248-2.79827455452484
281313.4095014440861-0.409501444086115
291311.10419337892791.89580662107215
301612.6906166630933.309383336907
311311.52560280536531.47439719463473
321212.4427485193296-0.442748519329564
331412.49235573012181.50764426987818
341111.649536877247-0.64953687724699
35912.0461426982883-3.04614269828828
361613.16163330032272.83836669967732
371212.9384848068564-0.93848480685644
381012.4675521247257-2.46755212472569
391311.40166873348361.59833126651645
401613.53343551596782.46656448403217
411411.6495368772472.35046312275301
421511.25293105620573.7470689437943
43511.2529310562057-6.2529310562057
44811.7486673437326-3.74866734373258
451111.7486673437326-0.74866734373258
461612.96328841225263.03671158774743
471714.64892611800222.35107388199777
48910.5588498806087-1.55884988060872
49910.3109817368453-1.31098173684528
501311.89740502101041.10259497898957
511011.7982745545248-1.79827455452484
52612.0461426982883-6.04614269828828
531211.59992966645470.400070333545269
54811.7486673437326-3.74866734373258
551410.93065209625393.06934790374612
561213.0128956230448-1.01289562304483
571110.98025930704610.0197406929538648
581612.46755212472573.53244787527431
59812.8393543403708-4.83935434037085
601510.93065209625394.06934790374612
61711.4263883837808-4.42638838378075
621613.53343551596782.46656448403217
631411.59992966645472.40007033354527
641610.955455701655.04454429834999
65912.7402238738853-3.74022387388526
661412.81455073497471.18544926502528
671114.0539754088908-3.05397540889084
681311.74866734373261.25133265626742
691512.74022387388532.25977612611474
70512.1948803755661-7.19488037556613
711513.13682969492651.86317030507345
721312.88896155116310.111038448836891
731112.7402238738853-1.74022387388526
741112.7402238738853-1.74022387388526
751212.7154202684891-0.715420268489131
761212.5666825912113-0.566682591211283
771211.67434048264310.325659517356881
781211.89740502101040.102594978989572
791412.19488037556611.80511962443387
80611.6247332718509-5.62473327185086
81711.1041933789279-4.10419337892785
821413.70697679864180.293023201358187
831412.74022387388531.25977612611474
841011.7982745545248-1.79827455452484
851313.0128956230448-0.0128956230448286
861212.3188144474478-0.318814447447845
87911.9222086264066-2.92220862640656
881211.22812745080960.771872549190426
891611.89740502101044.10259497898957
901013.4590246997794-3.45902469977945
911411.67434048264312.32565951735688
921012.4427485193296-2.44274851932956
931612.46755212472573.53244787527431
941512.8641579457672.13584205423302
951212.4427485193296-0.442748519329564
961010.434915808727-0.434915808726999
97811.2033238454134-3.20332384541344
98812.0461426982883-4.04614269828828
991111.6743404826431-0.674340482643119
1001311.92220862640661.07779137359344
1011612.21968398096233.78031601903775
1021612.83935434037083.16064565962915
1031410.70758755788663.29241244211343
1041111.8726014156143-0.872601415614299
105411.649536877247-7.64953687724699
1061413.48382830517560.516171694824424
107912.0709463036844-3.07094630368441
1081412.19488037556611.80511962443387
109811.7238637383365-3.72386373833645
110811.7238637383365-3.72386373833645
1111111.3768651280874-0.376865128087422
1121211.87260141561430.127398584385701
1131110.80671802437220.193281975627843
1141411.22812745080962.77187254919043
1151512.36842165824012.6315783417599
1161612.61628980200353.38371019799646
1171610.68278395249045.31721604750956
1181112.0461426982883-1.04614269828828
1191413.13682969492650.863170305073452
1201412.31881444744781.68118555255216
1211212.5666825912113-0.566682591211283
1221411.50079919996912.49920080003086
123813.0128956230448-5.01289562304483
1241312.46755212472570.532447875274307
1251612.74022387388533.25977612611474
1261210.80671802437221.19328197562784
1271612.21968398096233.78031601903775
1281210.31098173684531.68901826315472
1291111.4264723388797-0.426472338879681
130410.5588498806087-6.55884988060872
1311614.62412251260611.37587748739389
1321512.66581305769692.33418694230313
1331011.1041933789279-1.10419337892785
1341312.74022387388530.259776126114739
1351511.6495368772473.35046312275301
1361210.98025930704611.01974069295387
1371412.6906166630931.309383336907
138711.5007991999691-4.50079919996914
1391912.41794491393346.58205508606657
1401213.0128956230448-1.01289562304483
1411211.62473327185090.37526672814914
1421311.37686512808741.62313487191258
1431510.4349158087274.565084191273
144813.4095014440861-5.40950144408612
1451211.6495368772470.35046312275301
1461010.9802593070461-0.980259307046135
147811.2529310562057-3.2529310562057
1481013.7813036597313-3.78130365973127
1491512.83935434037082.16064565962915
1501611.3024543118994.69754568810097
1511312.07094630368440.929053696315594
1521612.98809201764873.0119079823513
153910.434915808727-1.434915808727
1541412.02133909289211.97866090710785
1551414.0291718034947-0.0291718034947114
1561212.17007677017-0.170076770169996


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
60.08560240966256580.1712048193251320.914397590337434
70.1754732328700160.3509464657400320.824526767129984
80.3453872392105760.6907744784211510.654612760789424
90.2314493393665270.4628986787330540.768550660633473
100.161290945522410.3225818910448190.83870905447759
110.09844363604504570.1968872720900910.901556363954954
120.05731355212360570.1146271042472110.942686447876394
130.03777481393402610.07554962786805220.962225186065974
140.1372691612679010.2745383225358020.862730838732099
150.09205434925520710.1841086985104140.907945650744793
160.06677951633942910.1335590326788580.933220483660571
170.05891756568055550.1178351313611110.941082434319444
180.07320365938003570.1464073187600710.926796340619964
190.06292895770721030.1258579154144210.93707104229279
200.1776442747268510.3552885494537010.82235572527315
210.135132236915620.270264473831240.86486776308438
220.115369581052360.2307391621047210.88463041894764
230.0909066701066930.1818133402133860.909093329893307
240.06647361988581380.1329472397716280.933526380114186
250.08193384965485320.1638676993097060.918066150345147
260.06502537468174320.1300507493634860.934974625318257
270.06121817699685620.1224363539937120.938781823003144
280.044610170021350.08922034004270.95538982997865
290.03590943449687190.07181886899374380.964090565503128
300.03781391525467090.07562783050934190.96218608474533
310.03112826733096690.06225653466193390.968871732669033
320.0220739974574840.04414799491496790.977926002542516
330.02300839864255630.04601679728511250.976991601357444
340.01633553949359630.03267107898719250.983664460506404
350.02037581849850490.04075163699700980.979624181501495
360.02989874155653090.05979748311306190.97010125844347
370.0252009267933060.0504018535866120.974799073206694
380.02313018587163190.04626037174326380.976869814128368
390.01955090688921470.03910181377842950.980449093110785
400.01977183019596950.0395436603919390.98022816980403
410.01825746837356520.03651493674713040.981742531626435
420.02525306901956170.05050613803912340.974746930980438
430.09398764081483740.1879752816296750.906012359185163
440.1266012175744110.2532024351488220.873398782425589
450.1040420979178230.2080841958356470.895957902082177
460.1049670687378630.2099341374757260.895032931262137
470.09701963769714080.1940392753942820.90298036230286
480.08133589166667050.1626717833333410.918664108333329
490.06577316332903020.131546326658060.93422683667097
500.05264330576833310.1052866115366660.947356694231667
510.04482491466377970.08964982932755940.95517508533622
520.1172061309151290.2344122618302580.882793869084871
530.09452363897299390.1890472779459880.905476361027006
540.114364918408850.22872983681770.88563508159115
550.12260075287720.24520150575440.8773992471228
560.1022128208634690.2044256417269370.897787179136531
570.0824355648802420.1648711297604840.917564435119758
580.09574395996865320.1914879199373060.904256040031347
590.1504351496545370.3008702993090750.849564850345463
600.1835287069217680.3670574138435370.816471293078232
610.240370653061410.4807413061228190.75962934693859
620.2301803119581270.4603606239162530.769819688041873
630.2210344840967350.442068968193470.778965515903265
640.3088603177579370.6177206355158730.691139682242063
650.3403464598951250.680692919790250.659653540104875
660.3047734711663020.6095469423326050.695226528833698
670.3121306743099180.6242613486198360.687869325690082
680.2792241068506390.5584482137012780.720775893149361
690.2662742697520730.5325485395041460.733725730247927
700.5014175858580540.9971648282838910.498582414141946
710.4758866402985650.951773280597130.524113359701435
720.4303784919624440.8607569839248870.569621508037556
730.4018538464905520.8037076929811040.598146153509448
740.3740907343607580.7481814687215160.625909265639242
750.3336249127894290.6672498255788590.666375087210571
760.2940501995398630.5881003990797270.705949800460137
770.2565769417412650.513153883482530.743423058258735
780.2206621644127790.4413243288255580.779337835587221
790.2010206384450580.4020412768901150.798979361554942
800.3089054494047570.6178108988095130.691094550595243
810.3554130285349740.7108260570699490.644586971465026
820.3141306143267270.6282612286534530.685869385673273
830.2816679369716690.5633358739433390.718332063028331
840.260077285377980.5201545707559590.73992271462202
850.2242070522621160.4484141045242320.775792947737884
860.1916932365017210.3833864730034430.808306763498279
870.1954939404855280.3909878809710550.804506059514472
880.1672565035231480.3345130070462960.832743496476852
890.1998357334431720.3996714668863430.800164266556828
900.2147937325571270.4295874651142530.785206267442873
910.2020684355459070.4041368710918140.797931564454093
920.1949853624609540.3899707249219080.805014637539046
930.2098886921058570.4197773842117150.790111307894143
940.193833624900620.3876672498012410.80616637509938
950.1641128111296060.3282256222592130.835887188870394
960.1375131262006040.2750262524012080.862486873799396
970.1461116397168190.2922232794336380.853888360283181
980.1787511606213950.3575023212427890.821248839378605
990.1518365725605450.3036731451210890.848163427439455
1000.1283078874407690.2566157748815380.871692112559231
1010.1449200199372870.2898400398745740.855079980062713
1020.148546815393770.297093630787540.85145318460623
1030.1544764838902220.3089529677804450.845523516109777
1040.1310363778270430.2620727556540860.868963622172957
1050.3675305565114810.7350611130229620.632469443488519
1060.322804840490390.6456096809807790.67719515950961
1070.3374278330827280.6748556661654560.662572166917272
1080.3064354004337650.612870800867530.693564599566235
1090.3586294387769540.7172588775539090.641370561223046
1100.4361200669148630.8722401338297260.563879933085137
1110.3911990992176890.7823981984353790.608800900782311
1120.3501420367068750.7002840734137490.649857963293125
1130.3109096717081960.6218193434163920.689090328291804
1140.2933471086746420.5866942173492830.706652891325358
1150.2996281690004670.5992563380009330.700371830999533
1160.332434953325260.6648699066505190.66756504667474
1170.414097224692230.828194449384460.58590277530777
1180.3736007779951970.7472015559903950.626399222004802
1190.328132779849640.656265559699280.67186722015036
1200.2929220115071210.5858440230142410.70707798849288
1210.2552965653180660.5105931306361310.744703434681934
1220.2339089932492280.4678179864984560.766091006750772
1230.3198438935023660.6396877870047320.680156106497634
1240.2712532488436470.5425064976872940.728746751156353
1250.2878806046082770.5757612092165540.712119395391723
1260.24201759608710.48403519217420.7579824039129
1270.3174474129293270.6348948258586530.682552587070673
1280.2879400713455510.5758801426911020.712059928654449
1290.2531951662450980.5063903324901950.746804833754902
1300.5761719341372970.8476561317254060.423828065862703
1310.603096838330020.793806323339960.39690316166998
1320.5471928193931940.9056143612136120.452807180606806
1330.5105275490567830.9789449018864350.489472450943217
1340.4685276237805640.9370552475611270.531472376219436
1350.5050774632662930.9898450734674140.494922536733707
1360.4414824597678480.8829649195356970.558517540232152
1370.3715890907514990.7431781815029990.628410909248501
1380.5779091833240510.8441816333518990.422090816675949
1390.7636402051447960.4727195897104090.236359794855204
1400.7146996906460270.5706006187079450.285300309353973
1410.6478139515343820.7043720969312350.352186048465618
1420.5802108124111320.8395783751777370.419789187588868
1430.6681210412087290.6637579175825420.331878958791271
1440.7329423126559180.5341153746881650.267057687344082
1450.6461490631943720.7077018736112560.353850936805628
1460.5406582456187740.9186835087624510.459341754381226
1470.5668012746529410.8663974506941180.433198725347059
1480.7929132643152240.4141734713695520.207086735684776
1490.68109457154240.63781085691520.3189054284576
1500.7551100800859290.4897798398281420.244889919914071


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level80.0551724137931034NOK
10% type I error level170.117241379310345NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292939625yuprl7itvxbmp9b/104921292938456.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292939625yuprl7itvxbmp9b/104921292938456.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292939625yuprl7itvxbmp9b/10ixoh1292938456.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292939625yuprl7itvxbmp9b/10ixoh1292938456.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292939625yuprl7itvxbmp9b/204921292938456.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292939625yuprl7itvxbmp9b/204921292938456.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292939625yuprl7itvxbmp9b/304921292938456.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292939625yuprl7itvxbmp9b/304921292938456.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292939625yuprl7itvxbmp9b/4m5qq1292938456.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292939625yuprl7itvxbmp9b/4m5qq1292938456.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292939625yuprl7itvxbmp9b/5m5qq1292938456.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292939625yuprl7itvxbmp9b/5m5qq1292938456.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292939625yuprl7itvxbmp9b/6m5qq1292938456.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292939625yuprl7itvxbmp9b/6m5qq1292938456.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292939625yuprl7itvxbmp9b/7ew7b1292938456.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292939625yuprl7itvxbmp9b/7ew7b1292938456.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292939625yuprl7itvxbmp9b/8p5ow1292938456.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292939625yuprl7itvxbmp9b/8p5ow1292938456.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292939625yuprl7itvxbmp9b/9p5ow1292938456.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292939625yuprl7itvxbmp9b/9p5ow1292938456.ps (open in new window)


 
Parameters (Session):
par1 = 2 ; par2 = Do not include Seasonal Dummies ; par3 = 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