Home » date » 2010 » Dec » 02 »

WS7 deterministic trend

*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 21:49:42 +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/02/t1291326490p9an9qot7uv7efx.htm/, Retrieved Thu, 02 Dec 2010 22:48:21 +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/02/t1291326490p9an9qot7uv7efx.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 «
20 10 11 4 25 25 1 16 11 11 11 23 21 2 18 16 12 7 17 22 2 17 11 13 7 21 25 3 23 13 14 12 19 24 3 30 12 16 10 19 18 4 23 8 11 10 15 22 4 18 12 10 8 16 15 4 15 11 11 8 23 22 6 12 4 15 4 27 28 7 21 9 9 9 22 20 7 15 8 11 8 14 12 8 20 8 17 7 22 24 8 31 14 17 11 23 20 11 27 15 11 9 23 21 12 34 16 18 11 21 20 13 21 9 14 13 19 21 13 31 14 10 8 18 23 13 19 11 11 8 20 28 13 16 8 15 9 23 24 13 20 9 15 6 25 24 13 21 9 13 9 19 24 13 22 9 16 9 24 23 13 17 9 13 6 22 23 13 24 10 9 6 25 29 13 25 16 18 16 26 24 13 26 11 18 5 29 18 13 25 8 12 7 32 25 13 17 9 17 9 25 21 13 32 16 9 6 29 26 13 33 11 9 6 28 22 13 13 16 12 5 17 22 13 32 12 18 12 28 22 13 25 12 12 7 29 23 13 29 14 18 10 26 30 13 22 9 14 9 25 23 13 18 10 15 8 14 17 13 17 9 16 5 25 23 13 20 10 10 8 26 23 14 15 12 11 8 20 25 14 20 14 14 10 18 24 14 33 14 9 6 32 24 14 29 10 12 8 25 23 14 23 14 17 7 25 21 14 26 16 5 4 23 24 14 18 9 12 8 21 24 14 20 10 12 8 20 28 14 11 6 6 4 15 16 14 28 8 24 20 30 20 14 26 13 12 8 24 29 14 etc...
 
Output produced by software:

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


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


Multiple Linear Regression - Estimated Regression Equation
Org[t] = + 15.5287004980391 -0.0536894023314702concern[t] + 0.199935118355062doubts[t] -0.147908652466377Par_Crit[t] -0.232432985498191Par_Stan[t] + 0.379676563293621Pers_Stan[t] + 0.249702635338725Days[t] -0.035096925566633t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)15.52870049803912.3474016.615300
concern-0.05368940233147020.062701-0.85630.3932570.196629
doubts0.1999351183550620.1116621.79050.0754540.037727
Par_Crit-0.1479086524663770.106237-1.39230.1659760.082988
Par_Stan-0.2324329854981910.131255-1.77090.0786860.039343
Pers_Stan0.3796765632936210.0765364.96072e-061e-06
Days0.2497026353387250.142651.75050.0821550.041078
t-0.0350969255666330.013229-2.65310.0088640.004432


Multiple Linear Regression - Regression Statistics
Multiple R0.514236415207976
R-squared0.26443909072595
Adjusted R-squared0.228929253726513
F-TEST (value)7.44692493885971
F-TEST (DF numerator)7
F-TEST (DF denominator)145
p-value1.20832214567379e-07
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.43911727777500
Sum Squared Residuals1714.99150929212


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12523.60405630795011.39594369204993
22121.8469707203285-0.846970720328523
32221.20793449163890.792065508361099
42521.84735161267533.15264838732472
52419.82056180328544.17943819671463
61819.6284552444457-1.62845524444574
72218.39028067093653.60971932906345
81520.4158224172039-5.4158224172039
92223.3510911415430-1.35109114154303
102824.18402281512583.81597718487415
112022.4923010311905-2.49230103119049
121219.7283112108128-7.72831121081281
132421.80716085063772.19283914936228
142022.5801437368723-2.58014373687232
152124.56176006012-3.56176006012
162022.3408954070786-2.3408954070786
172120.97163039561750.0283696043824669
182322.77343801257430.226561987425655
192823.39425303404104.60574696595896
202423.23538105492080.764618945079206
212424.6421137214652-0.642113721465157
222421.87378636224352.12621363775649
232323.2396568934144-0.239656893414380
242323.8546787668116-0.854678766811559
252925.37435544302613.62564455697393
262423.20934866137270.790651338627347
271825.8166792720602-7.8166792720602
282526.7970820274426-1.79708202744260
292123.5292902624992-2.52929026249918
302627.487672559846-1.48767255984600
312226.0195340768790-4.01953407687896
322223.6701656215863-1.67016562158627
332223.4771889612457-1.47718896124569
342326.2472112575822-3.24721125758219
353023.67344639822616.3265536017739
362323.4588907292745-0.458890729274526
371719.7465686681908-2.74656866819082
382324.2910585268586-1.29105852685862
392325.1143606695887-2.11436066958867
402523.32161296016141.67838703983859
412421.74999420466482.25000579533521
422428.0016821392244-4.00168213922439
432323.8152744781125-0.815274478112536
442124.3949441631213-3.39494416312127
452426.3114989267742-2.31149892677421
462422.58192575552931.41807424447074
472822.25970858036115.74029141963887
481621.8268768426804-5.8268768426804
492020.5927952512274-0.592795251227375
502923.95079299791215.04920700208792
512724.53970408853212.46029591146789
522223.7828794773891-1.78287947738909
532824.55716785679853.44283214320148
541621.1595767102694-5.15957671026945
552523.47604216748241.52395783251757
562423.97551305497320.0244869450268235
572824.06732353281503.93267646718496
582424.7084370717368-0.708437071736818
592323.0906731778823-0.0906731778822884
603027.0873487908292.91265120917101
612421.93486237446432.06513762553568
622124.3465389067657-3.34653890676574
632523.51925589998061.48074410001940
642524.15899006835660.841009931643362
652221.28071408563680.719285914363234
662322.75215942010120.247840579898821
672623.05222056285552.94777943714454
682321.84312556818071.15687443181934
692523.13473015095541.8652698490446
702121.7908163560116-0.79081635601161
712523.78898780900361.21101219099645
722422.45897438240771.54102561759230
732923.73500042016135.26499957983867
742223.7972568954409-1.7972568954409
752723.70068039460403.29931960539596
762620.05782030343445.94217969656557
772221.52480170265820.475198297341756
782422.11312115736911.88687884263095
792723.43364413773733.56635586226266
802421.63766203433472.36233796566531
812424.885098603503-0.885098603502989
822924.43136722390274.56863277609726
832222.3871856042376-0.387185604237574
842120.85732293836070.142677061639320
852420.71789037946313.28210962053694
862421.85407883838632.14592116161372
872322.02162741540580.978372584594233
882022.2429568736669-2.24295687366690
892721.45121914131875.54878085868125
902623.20427420669922.79572579330079
912521.92500531879233.07499468120767
922120.10854827646340.891451723536632
932120.97089468853830.0291053114617316
941920.5943230363677-1.59432303636772
952121.6432362490086-0.643236249008586
962121.2926008332459-0.29260083324594
971619.8035111867683-3.8035111867683
982220.64716912066871.35283087933133
992921.75519394014697.24480605985306
1001521.6358534475275-6.63585344752746
1011720.6786226659200-3.67862266591996
1021519.9210443011139-4.92104430111389
1032121.442712964441-0.442712964441015
1042120.78528619936090.214713800639119
1051919.1532266241979-0.153226624197947
1062418.07769537947735.92230462052272
1072021.9642772027555-1.9642772027555
1081724.3597518735404-7.35975187354037
1092324.1847774118242-1.18477741182424
1102421.79136705095572.20863294904428
1111421.4251043684990-7.42510436849896
1121922.2468142136299-3.24681421362987
1132421.55660967977112.44339032022893
1141319.9705908359096-6.9705908359096
1152224.5359932646432-2.53599326464319
1161620.4523060855796-4.45230608557956
1171922.3993625558498-3.39936255584980
1182521.98753206722703.01246793277304
1192523.22897209887061.77102790112938
1202320.78621461000732.21378538999266
1212422.76452841358391.2354715864161
1222622.74250236355323.25749763644680
1232620.79966049151635.20033950848374
1242523.33350476376331.66649523623675
1251821.5367165207630-3.53671652076304
1262119.23168087508711.76831912491292
1272622.64583809920533.35416190079472
1282321.09436293157791.90563706842211
1292319.05787820508493.94212179491511
1302221.50277006513490.497229934865092
1312021.3524535768885-1.35245357688847
1321321.0315670505931-8.03156705059306
1332420.39832770640403.60167229359597
1341520.5444039822562-5.54440398225622
1351422.0328614190784-8.0328614190784
1362222.7560687362669-0.756068736266917
1371016.7500582278710-6.75005822787096
1382423.07690650205510.923093497944933
1392220.52760802871261.47239197128736
1402424.2311243350231-0.231124335023130
1411920.3449987784280-1.34499877842805
1422020.7340969111277-0.734096911127747
1431316.1245407751944-3.1245407751944
1442018.83588765978921.16411234021085
1452221.66245274318940.337547256810550
1462421.73079326074572.26920673925433
1472921.55039925972347.44960074027656
1481219.6951930899155-7.69519308991555
1492019.55124520890450.448754791095511
1502120.0413549029060.958645097093987
1512422.1446842938731.85531570612701
1522220.66563759182971.33436240817029
1532017.1122286963612.887771303639


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.7168931983471540.5662136033056920.283106801652846
120.7857747313107450.4284505373785110.214225268689255
130.680614920829090.638770158341820.31938507917091
140.598244989168990.803510021662020.40175501083101
150.6026775489741360.7946449020517270.397322451025864
160.5007963030240030.9984073939519940.499203696975997
170.4646685762596710.9293371525193410.535331423740329
180.6165229258985720.7669541482028560.383477074101428
190.792053963549580.4158920729008410.207946036450421
200.727000451636630.545999096726740.27299954836337
210.6753254015948350.649349196810330.324674598405165
220.6254271016173980.7491457967652040.374572898382602
230.5681907574291350.863618485141730.431809242570865
240.4980769282645130.9961538565290250.501923071735487
250.4695119604277480.9390239208554970.530488039572252
260.3973649719798720.7947299439597450.602635028020128
270.6981750230925890.6036499538148220.301824976907411
280.6535523655867990.6928952688264030.346447634413202
290.6006286110350430.7987427779299140.399371388964957
300.5460341681062650.907931663787470.453965831893735
310.5148476359577210.9703047280845580.485152364042279
320.4659897304395570.9319794608791140.534010269560443
330.410988567008670.821977134017340.58901143299133
340.3682038942215640.7364077884431270.631796105778436
350.6080406572098100.7839186855803790.391959342790190
360.5491386009507370.9017227980985260.450861399049263
370.5088846712894710.9822306574210580.491115328710529
380.4523948198009840.9047896396019680.547605180199016
390.405437743116310.810875486232620.59456225688369
400.3815456554143740.7630913108287470.618454344585626
410.3588055619608840.7176111239217680.641194438039116
420.3483298888646180.6966597777292360.651670111135382
430.3033347035379160.6066694070758320.696665296462084
440.292378083913360.584756167826720.70762191608664
450.2658356386223240.5316712772446490.734164361377676
460.2320719753676750.464143950735350.767928024632325
470.310516735160360.621033470320720.68948326483964
480.4000468838777380.8000937677554760.599953116122262
490.3786435184859820.7572870369719650.621356481514018
500.4549072810103780.9098145620207550.545092718989622
510.4281069445369170.8562138890738330.571893055463083
520.3952100146240350.790420029248070.604789985375965
530.392644287987670.785288575975340.60735571201233
540.4685955106516200.9371910213032410.53140448934838
550.4218118753078680.8436237506157360.578188124692132
560.3757827044544710.7515654089089410.62421729554553
570.380771956905370.761543913810740.61922804309463
580.3414978210100630.6829956420201260.658502178989937
590.2977999791165480.5955999582330960.702200020883452
600.2777809321351280.5555618642702560.722219067864872
610.2421073851976130.4842147703952270.757892614802387
620.2653864219358490.5307728438716980.734613578064151
630.2301400794235310.4602801588470620.769859920576469
640.1941883307907710.3883766615815430.805811669209229
650.1619316151121550.3238632302243090.838068384887845
660.1342263722098610.2684527444197230.865773627790139
670.1160025131605060.2320050263210130.883997486839494
680.09368808709517850.1873761741903570.906311912904821
690.07572537678853980.1514507535770800.92427462321146
700.06356437071775570.1271287414355110.936435629282244
710.05021943719385010.1004388743877000.94978056280615
720.03891939835548410.07783879671096820.961080601644516
730.04464889598994250.0892977919798850.955351104010058
740.04126284930711500.08252569861423010.958737150692885
750.03478423839564380.06956847679128770.965215761604356
760.04655883608928190.09311767217856390.953441163910718
770.03644556386707820.07289112773415630.963554436132922
780.02940144520246080.05880289040492170.97059855479754
790.02623449450095010.05246898900190020.97376550549905
800.02046581167448540.04093162334897070.979534188325515
810.01702034955395740.03404069910791490.982979650446043
820.01720937688222580.03441875376445160.982790623117774
830.01475263402528260.02950526805056520.985247365974717
840.01128492992646200.02256985985292400.988715070073538
850.009586869190487070.01917373838097410.990413130809513
860.007875404442599520.01575080888519900.9921245955574
870.005852465984012240.01170493196802450.994147534015988
880.00565147883893030.01130295767786060.99434852116107
890.00885524334109720.01771048668219440.991144756658903
900.007424806587963880.01484961317592780.992575193412036
910.006733812874661560.01346762574932310.993266187125338
920.005720934278232660.01144186855646530.994279065721767
930.004321301016200420.008642602032400830.9956786989838
940.003755630417443140.007511260834886280.996244369582557
950.002979872575290940.005959745150581880.99702012742471
960.002192749827678440.004385499655356890.997807250172322
970.002841218634119390.005682437268238780.99715878136588
980.002132035496851430.004264070993702870.997867964503149
990.007941808607115970.01588361721423190.992058191392884
1000.02129785135316160.04259570270632320.978702148646838
1010.02384456853992190.04768913707984370.976155431460078
1020.03371714014086960.06743428028173930.96628285985913
1030.02643026676419750.05286053352839510.973569733235802
1040.01949296382177220.03898592764354440.980507036178228
1050.01431778795800130.02863557591600250.985682212041999
1060.04008536643100510.08017073286201030.959914633568995
1070.03989446841479130.07978893682958260.960105531585209
1080.09692977018685540.1938595403737110.903070229813145
1090.0822847380702990.1645694761405980.917715261929701
1100.07006006945963190.1401201389192640.929939930540368
1110.1711716198831920.3423432397663830.828828380116808
1120.1611064559538120.3222129119076230.838893544046188
1130.1528022498460120.3056044996920250.847197750153988
1140.2284537560300110.4569075120600230.771546243969988
1150.2259508395386950.4519016790773900.774049160461305
1160.2544085407273790.5088170814547580.745591459272621
1170.239026139681810.478052279363620.76097386031819
1180.2420379258281970.4840758516563940.757962074171803
1190.2478272348671090.4956544697342180.752172765132891
1200.2086913681001520.4173827362003030.791308631899848
1210.1820202858663760.3640405717327510.817979714133624
1220.16217567968190.32435135936380.8378243203181
1230.1945572875864390.3891145751728770.805442712413561
1240.1611574415972220.3223148831944450.838842558402778
1250.1428945717697770.2857891435395530.857105428230223
1260.1217877297568780.2435754595137560.878212270243122
1270.1052617091290990.2105234182581980.8947382908709
1280.08511558400053050.1702311680010610.91488441599947
1290.1753784699958830.3507569399917670.824621530004117
1300.1369080045148510.2738160090297030.863091995485149
1310.1123108902184990.2246217804369970.887689109781501
1320.1665913549763650.333182709952730.833408645023635
1330.4291726233100880.8583452466201750.570827376689912
1340.3711830562495610.7423661124991220.628816943750439
1350.5016638184342070.9966723631315870.498336181565793
1360.404778494978150.80955698995630.59522150502185
1370.6154987241799080.7690025516401840.384501275820092
1380.6229094856773710.7541810286452580.377090514322629
1390.5572246981530650.8855506036938710.442775301846935
1400.4397547715966660.8795095431933320.560245228403334
1410.3354822090879720.6709644181759450.664517790912028
1420.2927339652409290.5854679304818590.70726603475907


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level60.0454545454545455NOK
5% type I error level240.181818181818182NOK
10% type I error level360.272727272727273NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291326490p9an9qot7uv7efx/10tok41291326571.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291326490p9an9qot7uv7efx/10tok41291326571.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291326490p9an9qot7uv7efx/1n5nt1291326571.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291326490p9an9qot7uv7efx/1n5nt1291326571.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291326490p9an9qot7uv7efx/2xw4w1291326571.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291326490p9an9qot7uv7efx/2xw4w1291326571.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291326490p9an9qot7uv7efx/3xw4w1291326571.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291326490p9an9qot7uv7efx/3xw4w1291326571.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291326490p9an9qot7uv7efx/4xw4w1291326571.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291326490p9an9qot7uv7efx/4xw4w1291326571.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291326490p9an9qot7uv7efx/585lh1291326571.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291326490p9an9qot7uv7efx/585lh1291326571.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291326490p9an9qot7uv7efx/685lh1291326571.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291326490p9an9qot7uv7efx/685lh1291326571.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291326490p9an9qot7uv7efx/71fl11291326571.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291326490p9an9qot7uv7efx/71fl11291326571.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291326490p9an9qot7uv7efx/81fl11291326571.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291326490p9an9qot7uv7efx/81fl11291326571.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291326490p9an9qot7uv7efx/9tok41291326571.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291326490p9an9qot7uv7efx/9tok41291326571.ps (open in new window)


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