Home » date » 2010 » Nov » 19 »

workshop 7 month-effect

*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: Fri, 19 Nov 2010 13:22:14 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Nov/19/t1290172888vetvfnevkvj9n0j.htm/, Retrieved Fri, 19 Nov 2010 14:21:28 +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/19/t1290172888vetvfnevkvj9n0j.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 «
9 26 24 14 11 12 24 9 23 25 11 7 8 25 9 25 17 6 17 8 30 9 23 18 12 10 8 19 9 19 18 8 12 9 22 9 29 16 10 12 7 22 10 25 20 10 11 4 25 10 21 16 11 11 11 23 10 22 18 16 12 7 17 10 25 17 11 13 7 21 10 24 23 13 14 12 19 10 18 30 12 16 10 19 10 22 23 8 11 10 15 10 15 18 12 10 8 16 10 22 15 11 11 8 23 10 28 12 4 15 4 27 10 20 21 9 9 9 22 10 12 15 8 11 8 14 10 24 20 8 17 7 22 10 20 31 14 17 11 23 10 21 27 15 11 9 23 10 20 34 16 18 11 21 10 21 21 9 14 13 19 10 23 31 14 10 8 18 10 28 19 11 11 8 20 10 24 16 8 15 9 23 10 24 20 9 15 6 25 10 24 21 9 13 9 19 10 23 22 9 16 9 24 10 23 17 9 13 6 22 10 29 24 10 9 6 25 10 24 25 16 18 16 26 10 18 26 11 18 5 29 10 25 25 8 12 7 32 10 21 17 9 17 9 25 10 26 32 16 9 6 29 10 22 33 11 9 6 28 10 22 13 16 12 5 17 10 22 32 12 18 12 28 10 23 25 12 12 7 29 10 30 29 14 18 10 26 10 23 22 9 14 9 25 10 17 18 10 15 8 14 10 23 17 9 16 5 25 10 23 20 10 10 8 26 10 25 15 12 11 8 20 10 24 20 14 14 10 18 10 24 33 14 9 6 32 10 23 29 10 12 8 25 10 21 23 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 time35 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
D[t] = + 4.09848461408953 + 0.322678071995212M[t] + 0.113329495895667O[t] + 0.246895780354797CM[t] -0.109244278297376PE[t] + 0.151547174570634PC[t] -0.189756878633375PS[t] + 0.000994111036614365t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)4.0984846140895311.141690.36790.7134990.35675
M0.3226780719952121.1151520.28940.7727040.386352
O0.1133294958956670.0580931.95080.0529290.026464
CM0.2468957803547970.0405386.090500
PE-0.1092442782973760.074902-1.45850.1467810.073391
PC0.1515471745706340.0941781.60910.1096730.054836
PS-0.1897568786333750.057396-3.30610.0011820.000591
t0.0009941110366143650.0046930.21180.8325330.416267


Multiple Linear Regression - Regression Statistics
Multiple R0.490382703106539
R-squared0.240475195506076
Adjusted R-squared0.205265436357351
F-TEST (value)6.82978814170003
F-TEST (DF numerator)7
F-TEST (DF denominator)151
p-value4.7523723134546e-07
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.49660665392697
Sum Squared Residuals941.189762449295


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11411.9383609412612.06163905873900
21111.4872938812390-0.487293881238988
367.69855356508792-1.69855356508792
41210.57182007773681.42817992226324
589.48328418726646-1.48328418726646
6109.820687347408880.179312652591118
7109.763956786962580.236043213037422
8119.764393772258531.23560622774147
91610.79561723512075.20438276487926
101110.02143226065870.97856773934132
111312.41847690975100.581523090249047
121212.9461816021611-0.946181602161122
13812.9774721403172-4.97747214031721
141210.56707392883291.43292607116709
15119.18314474134381.81685525865620
1647.32123516068448-3.32123516068448
17910.9996412635532-1.99964126355323
1889.76064402319735-1.76064402319735
19810.0310031133341-2.03100311333405
201412.71096464433991.28903535566008
211512.1900764504962.80992354950399
221613.72390968644692.27609031355308
23911.7481733683644-2.74817336836436
241414.31378239371-0.31378239370999
251111.4299165844033-0.429916584403251
2689.38220479627381-1.38220479627381
2799.53662674775096-0.536626747750961
28911.5961879912493-2.59618799124928
29910.4542311586860-1.45423115868602
3099.47335143639562-0.473351436395625
311011.7502994625792-1.75029946257920
321611.77405823688894.22594176311115
33119.105681596729161.89431840327084
34810.0423757817061-2.04237578170605
3598.700056774409640.299943225590365
361612.63142025838013.36857974161986
371112.6157490448223-1.61574904482226
38169.28687320426736.7131267957327
391212.2969260292881-0.296926029288111
401210.39095209203451.60904790796547
411412.54128228558781.45871771441223
42910.4958862801234-1.49588628012338
431010.6558545064659-0.655854506465924
4498.438718345545340.561281654454662
451010.1007501125091-0.100750112509129
461210.12322130706601.87677869293403
471411.60024009549682.39975990450321
481412.09431574348291.90568425651715
491012.2980569018874-2.29805690188738
50149.893248772946364.10675122705364
511612.21072228585773.78927771414227
52910.4575426615236-1.45754266152362
531011.5954031954859-1.59540319548587
5469.01244269724991-3.01244269724992
55811.2759876621775-3.27598766217748
561312.43406219208670.565937807913336
571010.841300432646-0.841300432646008
5888.89909901396103-0.899099013961035
5979.18672055480478-2.18672055480478
60159.790330333368275.20966966663173
6199.91519991506453-0.915199915064533
621010.2265618496154-0.226561849615389
631210.22938527979831.77061472020167
641310.48872564582302.51127435417699
65108.41608687811781.58391312188221
661111.8428133001595-0.842813300159467
67813.6015868713492-5.6015868713492
6899.13257018067962-0.132570180679624
69138.66061798656884.3393820134312
701110.43277448055180.56722551944818
71812.7569392870387-4.75693928703867
72910.7871768270365-1.78717682703654
73912.3531004172197-3.35310041721967
741512.50159928899712.49840071100287
75911.1790482555329-2.17904825553290
761011.5656486191227-1.56564861912273
77148.948907404122025.05109259587798
781210.96737862888251.03262137111751
791211.13690171867330.863098281326655
801111.5563104403333-0.556310440333316
811411.49566182735682.50433817264318
82611.5822967772443-5.58229677724426
831211.27265793190110.7273420680989
84810.0902354968231-2.09023549682314
851412.42666506193721.57333493806277
861110.83326236870610.166737631293862
87109.938842250288120.0611577497118831
881410.26750987488113.73249012511894
891212.0703882440690-0.0703882440690387
901011.0097065135456-1.00970651354563
911413.01201819272870.987981807271295
9259.03553738146481-4.03553738146481
931110.52329898313330.47670101686672
941010.2129764002312-0.212976400231175
95911.4995123315785-2.49951233157848
961011.4732522121774-1.47325221217737
971613.75831091665522.24168908334482
981312.82985989392190.170140106078073
99910.8288966342418-1.82889663424179
1001011.3862219908247-1.38622199082472
1011010.9965922733871-0.9965922733871
10279.50299179272843-2.50299179272843
10399.82353919762823-0.823539197628225
104810.2579389578854-2.25793895788538
1051412.91345243378851.08654756621148
1061411.63315992604232.36684007395765
107811.0958116562564-3.09581165625638
108911.5479859267525-2.54798592675245
1091411.83964077559362.16035922440638
1101410.76376375626443.23623624373556
11189.89181980729455-1.89181980729455
112813.7246293482616-5.72462934826161
113811.0186565149427-3.01865651494273
11478.59672109006802-1.59672109006802
11567.5583437455759-1.5583437455759
11689.46348840514807-1.46348840514807
11768.3305117942813-2.33051179428131
118119.924006094491281.07599390550872
1191411.88647602450552.11352397549451
1201111.1211527618446-0.121152761844630
1211112.0065792151989-1.00657921519892
122119.240391685464971.75960831453502
1231410.42618563964773.57381436035225
124810.4438890102675-2.4438890102675
1252011.55528173933268.44471826066744
1261110.36534755156010.634652448439868
12789.21395662788415-1.21395662788415
1281110.79351929520450.206480704795506
1291010.6938068211101-0.693806821110145
1301413.51230940872770.487690591272336
1311110.61981018897570.380189811024253
132910.6520758892231-1.65207588922305
13399.79291786424465-0.792917864244648
134810.2227534824305-2.22275348243046
1351012.1161961158982-2.11619611589821
1361310.76991096924172.23008903075835
1371310.16514352417872.83485647582134
138129.338714652093392.66128534790662
139810.4486817159249-2.44868171592491
1401311.08062108532371.91937891467633
1411412.47523920127921.52476079872079
1421211.74040951246730.259590487532716
1431410.95040326072413.04959673927593
1441511.38126808573153.61873191426848
1451310.59292971216012.40707028783991
1461611.9344513402244.065548659776
147912.0412791436863-3.04127914368626
148910.5511480018923-1.55114800189227
149911.0524282560510-2.05242825605105
150811.3635933521282-3.36359335212824
151710.1350992827678-3.13509928276784
1521612.01966381964343.9803361803566
1531113.4097102544819-2.40971025448192
154910.0445020094602-1.04450200946020
155119.914920685995861.08507931400414
15699.94122107111783-0.941221071117826
1571412.57085576631341.42914423368665
1581311.10944719664841.89055280335164
1591614.5269346664881.47306533351201


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.08580381579864380.1716076315972880.914196184201356
120.03113883286837600.06227766573675210.968861167131624
130.3046256974956130.6092513949912250.695374302504387
140.4923297378644510.9846594757289010.50767026213555
150.6526147455364120.6947705089271770.347385254463588
160.5813832403284330.8372335193431330.418616759671567
170.4886059104635220.9772118209270440.511394089536478
180.4154336943552050.830867388710410.584566305644795
190.3816733446978040.7633466893956080.618326655302196
200.5691465470068410.8617069059863190.430853452993159
210.6553792034170380.6892415931659250.344620796582962
220.6408459417851080.7183081164297850.359154058214892
230.6084197818606230.7831604362787540.391580218139377
240.5348406396008050.930318720798390.465159360399195
250.4697521420479220.9395042840958440.530247857952078
260.4030814577475740.8061629154951480.596918542252426
270.342195188723640.684390377447280.65780481127636
280.2997471879255880.5994943758511760.700252812074412
290.2448708246821790.4897416493643590.75512917531782
300.2079108207846770.4158216415693540.792089179215323
310.1703614319490540.3407228638981080.829638568050946
320.2830672456745590.5661344913491180.716932754325441
330.2703166370948230.5406332741896460.729683362905177
340.25714934320610.51429868641220.7428506567939
350.2167652279223840.4335304558447680.783234772077616
360.2519866462501780.5039732925003560.748013353749822
370.2379295540256350.475859108051270.762070445974365
380.6504416509583410.6991166980833170.349558349041659
390.60170839862210.79658320275580.3982916013779
400.5611003176081910.8777993647836170.438899682391808
410.515216170134440.969567659731120.48478382986556
420.4923969832886790.9847939665773570.507603016711321
430.4503069196402150.900613839280430.549693080359785
440.3976073762911240.7952147525822490.602392623708876
450.3463192237548780.6926384475097550.653680776245122
460.3170797340352080.6341594680704160.682920265964792
470.2959815273309420.5919630546618840.704018472669058
480.2681170899100550.536234179820110.731882910089945
490.2825920353494950.5651840706989910.717407964650504
500.3367758965008940.6735517930017890.663224103499106
510.3707927697773420.7415855395546840.629207230222658
520.3611047078239100.7222094156478210.63889529217609
530.3474128125695080.6948256251390160.652587187430492
540.3752392240312390.7504784480624790.62476077596876
550.3943361618008940.7886723236017880.605663838199106
560.3490410812269480.6980821624538970.650958918773052
570.3084749798905970.6169499597811940.691525020109403
580.2698391987521620.5396783975043240.730160801247838
590.2536070936671850.5072141873343710.746392906332815
600.4025064868306770.8050129736613540.597493513169323
610.3584644368916290.7169288737832590.641535563108371
620.3158734462670940.6317468925341880.684126553732906
630.2938597719202270.5877195438404550.706140228079773
640.3029823309266610.6059646618533230.697017669073339
650.2771946678587650.554389335717530.722805332141235
660.2451835985576360.4903671971152720.754816401442364
670.4288113116987680.8576226233975360.571188688301232
680.3827452788256470.7654905576512930.617254721174354
690.4799033552152080.9598067104304160.520096644784792
700.4374782218571400.8749564437142810.56252177814286
710.5505966822829950.898806635434010.449403317717005
720.522113926781180.955772146437640.47788607321882
730.5420699758046890.9158600483906210.457930024195311
740.5536433633536340.8927132732927310.446356636646366
750.5327621220103080.9344757559793840.467237877989692
760.4977920590694830.9955841181389660.502207940930517
770.6634979453396060.6730041093207880.336502054660394
780.6325103221340640.7349793557318720.367489677865936
790.5960795873565660.8078408252868680.403920412643434
800.5500565574044410.8998868851911180.449943442595559
810.5599259380251810.8801481239496370.440074061974819
820.7116070748256960.5767858503486080.288392925174304
830.6779322377752370.6441355244495270.322067762224763
840.6534354677360990.6931290645278030.346564532263901
850.630926994169840.7381460116603210.369073005830160
860.5898804838935290.8202390322129420.410119516106471
870.5463379909761190.9073240180477630.453662009023881
880.6327332529503520.7345334940992960.367266747049648
890.5874481408753350.8251037182493290.412551859124665
900.5439685378602840.9120629242794320.456031462139716
910.5112576399088370.9774847201823250.488742360091163
920.5544851587381850.891029682523630.445514841261815
930.517222957388730.965554085222540.48277704261127
940.4726537107342020.9453074214684030.527346289265798
950.4545134964082010.9090269928164030.545486503591799
960.4124357550549850.8248715101099710.587564244945015
970.4137204103214250.827440820642850.586279589678575
980.3698917187571210.7397834375142410.63010828124288
990.3356073549317750.671214709863550.664392645068225
1000.2965779981959540.5931559963919080.703422001804046
1010.2564536480917510.5129072961835020.743546351908249
1020.2375561041875640.4751122083751280.762443895812436
1030.2009429984850370.4018859969700730.799057001514963
1040.1815954776228720.3631909552457440.818404522377128
1050.1587075506477050.3174151012954090.841292449352295
1060.1670467751989660.3340935503979310.832953224801034
1070.1663803967068540.3327607934137070.833619603293146
1080.1588475984833070.3176951969666130.841152401516693
1090.1563990771648690.3127981543297390.84360092283513
1100.1996304606006140.3992609212012280.800369539399386
1110.1715219143280500.3430438286561010.82847808567195
1120.3457643201148150.6915286402296290.654235679885185
1130.4054654606024070.8109309212048150.594534539397593
1140.3743301800672510.7486603601345020.625669819932749
1150.3678887380574060.7357774761148120.632111261942594
1160.3272469722859510.6544939445719030.672753027714049
1170.3290086733212880.6580173466425750.670991326678712
1180.2878775954673730.5757551909347450.712122404532627
1190.2602830965402810.5205661930805630.739716903459719
1200.2170126605120340.4340253210240680.782987339487966
1210.2031006830369670.4062013660739340.796899316963033
1220.1812409765747640.3624819531495280.818759023425236
1230.1850904435962850.370180887192570.814909556403715
1240.2002090679418510.4004181358837020.799790932058149
1250.7239474852809830.5521050294380340.276052514719017
1260.6809296922531620.6381406154936760.319070307746838
1270.6252750715562670.7494498568874660.374724928443733
1280.5623480108547030.8753039782905950.437651989145298
1290.4977166021821550.995433204364310.502283397817845
1300.4343199897081590.8686399794163170.565680010291841
1310.3791341147369020.7582682294738040.620865885263098
1320.3268602363354120.6537204726708240.673139763664588
1330.2695209404957520.5390418809915040.730479059504248
1340.2386437136351370.4772874272702740.761356286364863
1350.2388293507338640.4776587014677270.761170649266136
1360.1978876201918670.3957752403837330.802112379808133
1370.2039718287444080.4079436574888160.796028171255592
1380.2083358994386850.4166717988773710.791664100561315
1390.2320376306596430.4640752613192870.767962369340357
1400.1771798642142740.3543597284285490.822820135785726
1410.1299250008573030.2598500017146060.870074999142697
1420.09495521245913570.1899104249182710.905044787540864
1430.09669682069728370.1933936413945670.903303179302716
1440.08692160717633630.1738432143526730.913078392823664
1450.0959863740849670.1919727481699340.904013625915033
1460.3058678267941560.6117356535883130.694132173205844
1470.2029982055430340.4059964110860670.797001794456966
1480.1229806359533690.2459612719067380.877019364046631


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level00OK
10% type I error level10.0072463768115942OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/19/t1290172888vetvfnevkvj9n0j/1053u51290172895.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t1290172888vetvfnevkvj9n0j/1053u51290172895.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t1290172888vetvfnevkvj9n0j/1y2fb1290172895.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t1290172888vetvfnevkvj9n0j/1y2fb1290172895.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t1290172888vetvfnevkvj9n0j/2rtfw1290172895.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t1290172888vetvfnevkvj9n0j/2rtfw1290172895.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t1290172888vetvfnevkvj9n0j/3rtfw1290172895.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t1290172888vetvfnevkvj9n0j/3rtfw1290172895.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t1290172888vetvfnevkvj9n0j/4rtfw1290172895.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t1290172888vetvfnevkvj9n0j/4rtfw1290172895.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t1290172888vetvfnevkvj9n0j/512wh1290172895.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t1290172888vetvfnevkvj9n0j/512wh1290172895.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t1290172888vetvfnevkvj9n0j/612wh1290172895.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t1290172888vetvfnevkvj9n0j/612wh1290172895.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t1290172888vetvfnevkvj9n0j/7cuvk1290172895.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t1290172888vetvfnevkvj9n0j/7cuvk1290172895.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t1290172888vetvfnevkvj9n0j/8cuvk1290172895.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t1290172888vetvfnevkvj9n0j/8cuvk1290172895.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/19/t1290172888vetvfnevkvj9n0j/953u51290172895.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/19/t1290172888vetvfnevkvj9n0j/953u51290172895.ps (open in new window)


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