Home » date » 2010 » Nov » 22 »

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: Mon, 22 Nov 2010 20:46:59 +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/22/t1290458780f4w2ima7qwre2v4.htm/, Retrieved Mon, 22 Nov 2010 21:46:20 +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/22/t1290458780f4w2ima7qwre2v4.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 «
41 25 15 9 3 38 25 15 9 4 37 19 14 9 4 36 18 10 14 2 42 18 10 8 4 44 23 9 14 4 40 23 18 15 3 43 25 14 9 4 40 23 11 11 4 45 24 11 14 4 47 32 9 14 4 45 30 17 6 5 45 32 21 10 4 40 24 16 9 4 49 17 14 14 4 48 30 24 8 5 44 25 7 11 4 29 25 9 10 4 42 26 18 16 4 45 23 11 11 5 32 25 13 11 5 32 25 13 11 5 41 35 18 7 4 29 19 14 13 2 38 20 12 10 4 41 21 12 9 4 38 21 9 9 4 24 23 11 15 3 34 24 8 13 2 38 23 5 16 2 37 19 10 12 3 46 17 11 6 5 48 27 15 4 5 42 27 16 12 4 46 25 12 10 4 43 18 14 14 5 38 22 13 9 4 39 26 10 10 4 34 26 18 14 4 39 23 17 14 4 35 16 12 10 2 41 27 13 9 3 40 25 13 14 3 43 14 11 8 4 37 19 13 9 2 41 20 12 8 4 46 26 12 10 4 26 16 12 9 3 41 18 12 9 3 37 22 9 9 3 39 25 17 9 4 44 29 18 11 5 39 21 7 15 2 36 22 17 8 4 38 22 12 10 2 38 32 12 8 0 38 23 9 14 4 32 31 9 11 4 33 18 13 10 3 46 23 10 12 4 42 24 12 9 4 42 19 10 13 2 43 26 11 14 4 41 14 13 15 2 49 20 6 8 4 45 22 7 7 3 39 24 13 10 4 45 25 11 10 5 31 21 18 13 3 30 21 18 13 3 45 28 9 11 4 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 time10 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
Career[t] = + 31.7622562372553 + 0.188776879139715PersonalStandards[t] + 0.0437388904055657ParentalExpectations[t] -0.218043009341138Doubts[t] + 1.40702742932656LeadershipPreference[t] + 0.00608276680367076t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)31.76225623725533.4934249.09200
PersonalStandards0.1887768791397150.1068591.76660.0794750.039738
ParentalExpectations0.04373889040556570.1283290.34080.7337390.366869
Doubts-0.2180430093411380.155328-1.40380.1626050.081302
LeadershipPreference1.407027429326560.4835512.90980.0042090.002104
t0.006082766803670760.0101230.60090.5488870.274443


Multiple Linear Regression - Regression Statistics
Multiple R0.370926417662263
R-squared0.137586407319759
Adjusted R-squared0.106785921866894
F-TEST (value)4.46702073999156
F-TEST (DF numerator)5
F-TEST (DF denominator)140
p-value0.000831035690440629
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation4.99345534545331
Sum Squared Residuals3490.84348018507


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
14139.40253954254481.59746045745523
23840.815649738675-2.81564973867502
33739.6453323402348-2.64533234023484
43635.38341276091770.616587239082285
54239.51180844242132.48819155757866
64439.10977865847124.89022134152881
74037.88444100025722.11555899974275
84340.80840744909152.19159255090852
94039.86963376771670.130366232283254
104539.41036438563675.58963561436328
114740.8391844047476.16081559525302
124543.96899604057141.03100395942859
134542.24838866058572.75161133941434
144040.7436049515849-0.743604951584918
154938.250556736893810.7494432631062
164843.86341332194284.13658667805722
174440.12089409880333.87910590119672
182940.4324976557592-11.4324976557592
194239.71274925930592.28725074069413
204541.34357163188373.65642836811631
213241.8146859377779-9.81468593777792
223241.8207687045816-9.82076870458159
234143.3984593228482-2.39845932284823
242936.0868435470942-7.08684354709424
253839.662409298903-1.66240929890304
264140.07531195418760.92468804581244
273839.9501780497745-1.95017804977453
282437.7060068702954-13.7060068702954
293436.7987084343778-2.79870843437778
303835.83066862280162.16933137719837
313737.5795377917654-0.579537791765378
324641.37411860539514.62588139460486
334843.87901174390054.12098825609951
344240.77746189705411.22253810294593
354640.66712136263835.33287863736168
364339.97409914823713.02590085176287
373840.3747381585732-2.37473815857322
383940.7866687613779-1.78666876137791
393440.2704906140616-6.27049061406156
403939.6665038530405-0.66650385304052
413536.1905711925498-1.19057119254978
424139.94200895896361.05799104103642
434038.48032292078211.51967707921786
444339.03766772161123.9623322783888
453737.0430147969303-0.0430147969303161
464140.22623342046240.773766579537602
474640.92889144342215.07110855657792
482637.8582209988432-11.8582209988432
494138.24185752392632.75814247607372
503738.8718311360721-1.87183113607211
513941.201183092866-2.20118309286602
524442.97705367727841.0229463227216
533935.89853929115893.10146070884111
543640.871143765199-4.87114376519902
553837.40839120263950.591608797360536
563836.92427392086941.07572607913057
573839.4199997654584-1.41999976545840
583241.5904265934032-9.5904265934032
593338.1283810730274-5.12838107302742
604639.91807297495726.08192702504275
614240.85453942973521.14546057026482
624236.14303312401155.85696687598853
634340.11030478451072.8896952154893
644134.90644491445476.09355508554534
654940.07937264729878.92062735270125
664539.3177636428025.68223635719801
673940.7167319116216-1.71673191162163
684542.23114120608052.76885879391955
693138.3201048024877-7.32010480248768
703038.3261875692914-8.32618756929135
714541.10317192443183.89682807556822
724842.41530363202665.58469636797344
732838.1383256724161-10.1383256724161
743537.5094910117051-2.50949101170507
753840.6640949477224-2.66409494772242
763940.4659560227024-1.4659560227024
774040.2549678326448-0.254967832644762
783838.9527925434016-0.952792543401607
794238.27644198135993.72355801864015
803635.30831792098580.691682079014167
814943.80628005723495.19371994276512
824140.69122950266410.308770497335859
831835.9224835988106-17.9224835988106
843638.1344402019052-2.13444020190521
854238.91075468815863.08924531184143
864142.7773684699155-1.77736846991549
874340.05401360093482.94598639906523
884639.77222950552586.22777049447415
893740.8216072608941-3.82160726089410
903839.1161138606988-1.11611386069877
914340.89231527800472.10768472199529
924143.0319080800787-2.03190808007865
933534.71782004872620.282179951273831
943940.5892671426859-1.58926714268593
954239.71000799729432.28999200270571
963639.8325038422170-3.83250384221696
973541.3038256889569-6.3038256889569
983336.2909518132963-3.29095181329628
993638.3421050051797-2.34210500517969
1004839.42204155302238.57795844697767
1014140.1246995759820.875300424017985
1024738.56522644010118.43477355989893
1034139.23860810975891.76139189024108
1043142.2764579116633-11.2764579116633
1053641.4855930000655-5.48559300006554
1064641.53573526706794.46426473293209
1073938.28660748333810.713392516661932
1084440.92335851264643.07664148735360
1094337.32874805928395.67125194071613
1103241.4423503707902-9.44235037079021
1114040.7496487661822-0.749648766182157
1124039.30814638098920.691853619010763
1134637.30842378311028.69157621688976
1144539.42161101292525.57838898707484
1153940.936020307384-1.93602030738398
1164441.95899249049322.04100750950679
1173539.9895080752955-4.98950807529546
1183837.90548886434090.0945111356591246
1193836.63576087303471.36423912696532
1203637.5973402377987-1.59734023779867
1214238.27299684530973.72700315469028
1223939.9182919780917-0.918291978091683
1234143.3362457095252-2.33624570952517
1244139.683479205051.31652079494998
1254739.05308687177007.94691312823004
1263939.0289314558924-0.0289314558923762
1274039.83294417667770.167055823322273
1284440.52242210170623.47757789829377
1294239.74347977906292.25652022093707
1303538.850984936243-3.85098493624303
1314643.10833257421062.89166742578945
1324337.99032698979915.00967301020087
1334040.5788652986934-0.57886529869339
1344440.42640936903863.57359063096141
1353740.9123170449301-3.91231704493011
1364641.07823117046524.92176882953479
1374442.05525534791321.94474465208683
1383539.0157395389983-4.01573953899826
1393937.57073537627671.42926462372334
1404038.67832478225461.32167521774537
1414239.25138962916412.74861037083587
1423739.3301465836812-2.33014658368124
1432940.0167741738678-11.0167741738678
1443338.2408054781143-5.24080547811429
1453540.3196569045297-5.31965690452968
1464235.91464344143816.08535655856194


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.2274579982661730.4549159965323460.772542001733827
100.1209859961834210.2419719923668410.87901400381658
110.0600860045434740.1201720090869480.939913995456526
120.02563721958173780.05127443916347550.974362780418262
130.01055732722065290.02111465444130580.989442672779347
140.006348926854501910.01269785370900380.993651073145498
150.02819142691151330.05638285382302670.971808573088487
160.01595520219394220.03191040438788430.984044797806058
170.009075605676860410.01815121135372080.99092439432314
180.3220861106425950.6441722212851890.677913889357405
190.3229583057475100.6459166114950210.67704169425249
200.2576717787615080.5153435575230160.742328221238492
210.5867960549858210.8264078900283580.413203945014179
220.72540798668810.5491840266238010.274592013311901
230.6842784224301270.6314431551397460.315721577569873
240.6359451158168690.7281097683662610.364054884183131
250.605694063770290.788611872459420.39430593622971
260.6266046048321690.7467907903356620.373395395167831
270.5817071805969650.836585638806070.418292819403035
280.784178105900120.4316437881997610.215821894099881
290.773600242423920.4527995151521590.226399757576080
300.7895505176889110.4208989646221780.210449482311089
310.7652520969842350.4694958060315310.234747903015765
320.8193692114896720.3612615770206570.180630788510328
330.8385273883686350.322945223262730.161472611631365
340.8102289045793870.3795421908412260.189771095420613
350.8331509774951690.3336980450096630.166849022504831
360.8037987508590970.3924024982818060.196201249140903
370.7643748142824560.4712503714350880.235625185717544
380.7191792273502020.5616415452995970.280820772649798
390.7227652423885720.5544695152228570.277234757611428
400.6744464412242220.6511071175515550.325553558775778
410.6319636761490350.736072647701930.368036323850965
420.6038091834107840.7923816331784320.396190816589216
430.5705510049216080.8588979901567840.429448995078392
440.5562527243467020.8874945513065970.443747275653298
450.5073300784694220.9853398430611570.492669921530578
460.4566010743748520.9132021487497030.543398925625148
470.4717326186888160.9434652373776330.528267381311183
480.6609342757788570.6781314484422850.339065724221143
490.6410780610799270.7178438778401460.358921938920073
500.5938794180494880.8122411639010250.406120581950513
510.5468090738095320.9063818523809370.453190926190468
520.4993096605279370.9986193210558730.500690339472063
530.4853042749680080.9706085499360170.514695725031992
540.4673415415764260.9346830831528520.532658458423574
550.4270903393160540.8541806786321090.572909660683946
560.3943443473788610.7886886947577220.605655652621139
570.3483331563501390.6966663127002780.651666843649861
580.4584078319026880.9168156638053770.541592168097311
590.4473650361746780.8947300723493560.552634963825322
600.4891055897961320.9782111795922640.510894410203868
610.4460401131137090.8920802262274180.553959886886291
620.4736190748827440.9472381497654890.526380925117256
630.4430584584289710.8861169168579420.556941541571029
640.4684561295941690.9369122591883390.531543870405831
650.5779405000256110.8441189999487780.422059499974389
660.594235833530980.811528332938040.40576416646902
670.5512573905482560.8974852189034880.448742609451744
680.5205259593411490.9589480813177020.479474040658851
690.5624092879539990.8751814240920020.437590712046001
700.6308912628142330.7382174743715340.369108737185767
710.6191513198108770.7616973603782460.380848680189123
720.6460335945350940.7079328109298120.353966405464906
730.7593252145768690.4813495708462620.240674785423131
740.7250709299042250.5498581401915510.274929070095776
750.6919194938565340.6161610122869330.308080506143466
760.6489861328747780.7020277342504440.351013867125222
770.6030911298735870.7938177402528260.396908870126413
780.5573407789609820.8853184420780360.442659221039018
790.5477876600601730.9044246798796540.452212339939827
800.504432263808560.991135472382880.49556773619144
810.558848290815430.882303418369140.44115170918457
820.5184164181377970.9631671637244060.481583581862203
830.945416183281730.1091676334365410.0545838167182706
840.9343407090977780.1313185818044440.0656592909022219
850.9263739153672130.1472521692655730.0736260846327867
860.9079441879165590.1841116241668820.0920558120834412
870.8958224935473620.2083550129052760.104177506452638
880.912294369863660.1754112602726790.0877056301363397
890.8985368054255850.2029263891488290.101463194574415
900.8751787334927470.2496425330145060.124821266507253
910.8532819771731420.2934360456537150.146718022826858
920.8237438398851570.3525123202296870.176256160114843
930.7936927407387230.4126145185225550.206307259261277
940.7600227494785360.4799545010429280.239977250521464
950.7252799825367430.5494400349265150.274720017463257
960.7031421944989750.593715611002050.296857805501025
970.7278466540899850.544306691820030.272153345910015
980.7753921442105610.4492157115788780.224607855789439
990.7819266855545530.4361466288908930.218073314445447
1000.8355716534121150.328856693175770.164428346587885
1010.7999824912373330.4000350175253340.200017508762667
1020.8153790694258250.369241861148350.184620930574175
1030.7782307579326350.4435384841347310.221769242067365
1040.8888520635054430.2222958729891130.111147936494557
1050.9123304378011330.1753391243977330.0876695621988667
1060.8991391637926170.2017216724147660.100860836207383
1070.8782387028287780.2435225943424450.121761297171222
1080.8522111174443270.2955777651113460.147788882555673
1090.8425779187300610.3148441625398780.157422081269939
1100.9303879551319770.1392240897360470.0696120448680234
1110.9152478232165120.1695043535669760.0847521767834881
1120.8944405422947160.2111189154105680.105559457705284
1130.9131906795208260.1736186409583470.0868093204791736
1140.9076615099103880.1846769801792240.0923384900896122
1150.885186158665280.2296276826694400.114813841334720
1160.8569470962950460.2861058074099070.143052903704954
1170.881094894167030.2378102116659400.118905105832970
1180.8498314892692240.3003370214615520.150168510730776
1190.8129573113480950.374085377303810.187042688651905
1200.815928625769430.3681427484611410.184071374230571
1210.7678327534451040.4643344931097930.232167246554896
1220.7553756870941610.4892486258116770.244624312905839
1230.7192187337037580.5615625325924840.280781266296242
1240.6736631767081180.6526736465837630.326336823291882
1250.6922131543515810.6155736912968370.307786845648419
1260.6442149294921620.7115701410156770.355785070507838
1270.5806883647637560.8386232704724870.419311635236244
1280.5121665392718040.9756669214563920.487833460728196
1290.4290695235128790.8581390470257570.570930476487121
1300.5819182388851360.8361635222297270.418081761114864
1310.5177407554014310.9645184891971380.482259244598569
1320.4494962412444780.8989924824889550.550503758755522
1330.3983603226270830.7967206452541670.601639677372917
1340.29362105216420.58724210432840.7063789478358
1350.2706925579619840.5413851159239690.729307442038016
1360.2386820703642680.4773641407285370.761317929635732
1370.3223343358692880.6446686717385750.677665664130712


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level40.0310077519379845OK
10% type I error level60.0465116279069767OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458780f4w2ima7qwre2v4/10i4k61290458804.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458780f4w2ima7qwre2v4/10i4k61290458804.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458780f4w2ima7qwre2v4/1t3nd1290458804.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458780f4w2ima7qwre2v4/1t3nd1290458804.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458780f4w2ima7qwre2v4/2t3nd1290458804.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458780f4w2ima7qwre2v4/2t3nd1290458804.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458780f4w2ima7qwre2v4/33cmx1290458804.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458780f4w2ima7qwre2v4/33cmx1290458804.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458780f4w2ima7qwre2v4/43cmx1290458804.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458780f4w2ima7qwre2v4/43cmx1290458804.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458780f4w2ima7qwre2v4/53cmx1290458804.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458780f4w2ima7qwre2v4/53cmx1290458804.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458780f4w2ima7qwre2v4/6wlli1290458804.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458780f4w2ima7qwre2v4/6wlli1290458804.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458780f4w2ima7qwre2v4/7pdkl1290458804.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458780f4w2ima7qwre2v4/7pdkl1290458804.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458780f4w2ima7qwre2v4/8pdkl1290458804.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458780f4w2ima7qwre2v4/8pdkl1290458804.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458780f4w2ima7qwre2v4/9pdkl1290458804.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290458780f4w2ima7qwre2v4/9pdkl1290458804.ps (open in new window)


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





Copyright

Creative Commons License

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

Software written by Ed van Stee & Patrick Wessa


Disclaimer

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


Privacy Policy

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

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

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

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

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

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

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

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

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


FreeStatistics.org is powered by