Home » date » 2010 » Nov » 21 »

Ws 7 - 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: Sun, 21 Nov 2010 15:54:23 +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/21/t1290354848mb1qxhmqno0jkz4.htm/, Retrieved Sun, 21 Nov 2010 16:54:08 +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/21/t1290354848mb1qxhmqno0jkz4.htm/},
    year = {2010},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2010},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
13 13 14 13 3 1 12 12 8 13 5 1 15 10 12 16 6 1 12 9 7 12 6 1 10 10 10 11 5 1 12 12 7 12 3 1 15 13 16 18 8 1 9 12 11 11 4 1 12 12 14 14 4 1 11 6 6 9 4 1 11 5 16 14 6 1 11 12 11 12 6 1 15 11 16 11 5 1 7 14 12 12 4 1 11 14 7 13 6 1 11 12 13 11 4 1 10 12 11 12 6 1 14 11 15 16 6 1 10 11 7 9 4 2 6 7 9 11 4 2 11 9 7 13 2 2 15 11 14 15 7 2 11 11 15 10 5 2 12 12 7 11 4 2 14 12 15 13 6 2 15 11 17 16 6 2 9 11 15 15 7 2 13 8 14 14 5 2 13 9 14 14 6 2 16 12 8 14 4 2 13 10 8 8 4 2 12 10 14 13 7 2 14 12 14 15 7 2 11 8 8 13 4 3 9 12 11 11 4 3 16 11 16 15 6 3 12 12 10 15 6 3 10 7 8 9 5 3 13 11 14 13 6 3 16 11 16 16 7 3 14 12 13 13 6 3 15 9 5 11 3 3 5 15 8 12 3 3 8 11 10 12 4 3 11 11 8 12 6 3 16 11 13 14 7 3 17 11 15 14 5 3 9 15 6 8 4 3 9 11 12 13 5 3 13 12 16 16 6 3 10 12 5 13 6 3 6 9 15 11 6 4 12 12 12 14 5 4 8 12 8 13 4 4 14 13 13 13 5 4 12 11 14 13 5 4 11 9 12 12 4 4 16 9 16 16 6 4 8 11 10 15 2 4 15 11 15 15 8 4 7 12 8 12 3 4 16 12 16 14 6 4 14 9 19 12 6 4 16 11 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 time8 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24
R Framework
error message
The field 'Names of X columns' contains a hard return which cannot be interpreted.
Please, resubmit your request without hard returns in the 'Names of X columns'.


Multiple Linear Regression - Estimated Regression Equation
Popularity[t] = + 0.184727929928006 + 0.102458915938333FindingFriends[t] + 0.241835431638645KnowingPeople[t] + 0.349828593066031Liked[t] + 0.637259261836313Celebrity[t] + 0.0988008593457305`Date `[t] -0.00641272300843145t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)0.1847279299280061.4561140.12690.8992190.44961
FindingFriends0.1024589159383330.0977071.04860.2960430.148022
KnowingPeople0.2418354316386450.0618463.91030.000147e-05
Liked0.3498285930660310.097953.57150.0004780.000239
Celebrity0.6372592618363130.1581234.03028.9e-054.4e-05
`Date `0.09880085934573050.1967060.50230.6162150.308107
t-0.006412723008431450.011948-0.53670.5922470.296123


Multiple Linear Regression - Regression Statistics
Multiple R0.707225438473912
R-squared0.500167820824617
Adjusted R-squared0.480040350522252
F-TEST (value)24.8500091323379
F-TEST (DF numerator)6
F-TEST (DF denominator)149
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.11754990906277
Sum Squared Residuals668.118624988388


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11311.45432751177201.54567248822798
21211.1689618066660.83103819333401
31513.61171801936991.38828198063012
41210.89435484996581.10564515003424
51010.7288194829093-0.72881948290926
6129.277128366254972.72287163374504
71516.8349613115104-1.83496131151042
8910.5190753155630-1.51907531556296
91212.2876546666686-0.287654666668562
10117.982662029590823.01733797040918
111113.3158061960333-2.31580619603328
121112.1177715402679-1.11777154026790
131512.23098920461202.76901079538799
14711.2771808340937-4.27718083409372
151111.6859380696307-0.685938069630715
161110.95144439477280.0485556052271954
171012.0857079252257-2.08570792522574
181414.3434923850977-0.343492385097677
19108.777878393190971.22212160680903
2069.54495805583856-3.54495805583856
21118.684930963888942.31506903611106
221514.46223758954130.537762410458682
231111.6739988091688-0.673998809168755
24129.547930880219212.45206911978079
251413.45037732012460.549622679875371
261514.87466232365320.125337676346754
27914.6720094061378-5.67200940613781
281312.49203738693710.507962613062925
291313.2253428417033-0.225342841703290
301610.80077575300545.19922424699464
31138.490473639724084.50952636027592
321213.5959942573866-1.59599425738661
331414.4941565523869-0.494156552386905
341110.1142614634980.885738536501998
35910.5435335130268-1.54353351302678
361614.317671928211.68232807179001
371212.9627055313080-0.962705531308016
38109.224096545098130.775903454901866
391313.1151057097753-0.115105709775341
401615.27910889107860.720891108921397
411412.96290374805821.03709625194183
42158.102995852484576.89700414751543
4359.7866715130881-4.78667151308811
44810.4913532514399-2.49135325143995
451111.2757881888268-0.275788188826849
461613.81546907198002.18453092801998
471713.01820868857633.98179131142375
4898.508881924340850.491118075659152
49911.9300483545774-2.93004835457742
501314.6801813150963-1.68018131509631
511010.9640930648647-0.964093064864687
52612.4678015836414-6.46780158364138
531212.4554858308938-0.455485830893791
54810.4946435264284-2.49464352642843
551412.43712613938791.56287386061212
561212.4676310161414-0.467631016141424
571110.78554174307670.214458256923307
581614.42030364255961.57969635744041
59810.2689305211847-2.26893052118467
601515.2952505273873-0.295250527387342
6179.46266661046707-2.46266661046707
621614.00237231220881.9976276877912
631413.71443195016920.285568049830753
641613.75324568004232.24675431995765
6599.92048663101368-0.92048663101368
661412.26412727035681.73587272964320
671113.0288160793959-2.02881607939594
681310.45046064144202.54953935855797
691512.98094922251352.01905077748645
7055.65526965476048-0.655269654760477
711512.47024103036072.52975896963932
721312.32445179165190.675548208348061
731112.0817378824939-1.08173788249391
741113.9752819157442-2.97528191574416
751212.4957196209476-0.495719620947646
761213.4197310247318-1.41973102473182
771212.2868539311207-0.286853931120729
781211.87613978984800.123860210151982
791410.78295490362943.21704509637059
8067.96886701447297-1.96886701447297
8179.82863683984184-2.82863683984184
821411.93300173470792.06699826529209
831413.83819796365530.161802036344736
841011.2090818273308-1.20908182733077
85138.68205582269454.31794417730549
861212.3827278226039-0.382727822603868
8799.32868069070523-0.328680690705233
881212.0243408260259-0.0243408260258715
891615.06504784719560.934952152804355
901010.2509351394506-0.250935139450645
911413.16019074401760.839809255982394
921013.5294557228591-3.52945572285908
931615.33809606560730.661903934392739
941513.44002046968781.55997953031224
951211.33980164952210.660198350477909
96109.723253692633710.276746307366287
97810.2113803731837-2.21138037318372
9888.5839638760142-0.583963876014194
991112.7817660837874-1.78176608378739
1001312.39728480532060.60271519467939
1011615.42617079724010.573829202759878
1021614.68871753382671.31128246617330
1031415.783120023334-1.78312002333401
104118.80392570606942.19607429393059
10546.86893251038793-2.86893251038793
1061414.5434362544404-0.543436254440425
107910.3345009862217-1.33450098622172
1081415.2838424010198-1.28384240101982
109810.4296687016322-2.42966870163224
110810.8611316540725-2.86113165407251
1111112.1750326425653-1.17503264256529
1121213.6138983132027-1.61389831320273
1131111.4453785390021-0.44537853900215
1141413.58963559195770.410364408042348
1151514.32847529221290.671524707787082
1161613.36635806857512.63364193142493
1171613.46240426150502.53759573849503
1181112.7046361347967-1.70463613479673
1191413.69141424712680.308585752873245
1201410.88286060345943.11713939654063
1211211.32873538945530.6712646105447
1221412.47463614583341.5253638541666
123810.1381161395181-2.13811613951814
1241313.7618095480229-0.76180954802293
1251613.65293790907622.34706209092383
1261210.83274703948361.16725296051639
1271615.37245274122530.627547258774656
1281213.2838711469848-1.28387114698484
1291111.3710149332596-0.371014933259570
13046.26171529119994-2.26171529119994
1311615.34680184919160.653198150808382
1321512.43025504409682.56974495590315
1331011.3339267659976-1.33392676599763
1341313.0801691844501-0.080169184450065
1351513.10513981571461.89486018428544
1361210.50703824941291.49296175058711
1371413.47352631703670.526473682963344
138710.573267534394-3.573267534394
1391914.01178923936994.98821076063011
1401212.5715353979438-0.571535397943801
1411212.1641645992487-0.164164599248650
1421313.4008870456399-0.400887045639917
1431512.81961298509092.18038701490908
14488.14265477299094-0.142654772990937
1451210.78996003332141.21003996667861
1461010.7095121600920-0.709512160092038
147811.2805515789296-3.28055157892957
1481014.261451480109-4.261451480109
1491513.73720993191991.26279006808015
1501614.58906237437961.41093762562044
1511313.2420751468102-0.242075146810153
1521615.11311341385410.886886586145918
153910.6373404646853-1.63734046468531
1541413.57797942352520.422020576474805
1551413.10821070053430.891789299465703
1561210.52691182139671.47308817860326


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.07385393424063830.1477078684812770.926146065759362
110.1114121685982570.2228243371965150.888587831401742
120.07345787413724110.1469157482744820.926542125862759
130.548827345484510.902345309030980.45117265451549
140.7186992086308220.5626015827383550.281300791369178
150.6520904123102270.6958191753795450.347909587689773
160.5761124921378220.8477750157243560.423887507862178
170.489204168649930.978408337299860.51079583135007
180.4518794925294620.9037589850589240.548120507470538
190.3660004165063060.7320008330126130.633999583493694
200.5100387405013020.9799225189973950.489961259498698
210.5164266747214230.9671466505571550.483573325278577
220.5458465860458270.9083068279083460.454153413954173
230.4723615361310510.9447230722621030.527638463868949
240.4779454316082220.9558908632164440.522054568391778
250.4347313659746490.8694627319492980.565268634025351
260.3743861511192360.7487723022384720.625613848880764
270.620073597970520.7598528040589610.379926402029481
280.5749546427581560.8500907144836880.425045357241844
290.519760536276080.960478927447840.48023946372392
300.711763970133490.5764720597330210.288236029866510
310.8125705987111380.3748588025777250.187429401288862
320.7768257167972970.4463485664054060.223174283202703
330.7307830950400270.5384338099199460.269216904959973
340.6978619859844210.6042760280311580.302138014015579
350.6957508716689190.6084982566621620.304249128331081
360.7084453286808880.5831093426382250.291554671319112
370.6753947060822270.6492105878355450.324605293917773
380.6263349167561520.7473301664876960.373665083243848
390.572897411380090.854205177239820.42710258861991
400.543550964821020.912898070357960.45644903517898
410.502091559029740.9958168819405190.497908440970259
420.7575288156648840.4849423686702320.242471184335116
430.9563070475383710.08738590492325790.0436929524616289
440.9666834209797180.06663315804056340.0333165790202817
450.9562902741612520.08741945167749640.0437097258387482
460.9612254468567140.07754910628657160.0387745531432858
470.9806509822552610.03869803548947720.0193490177447386
480.9742165254578690.05156694908426240.0257834745421312
490.9821366416463710.03572671670725690.0178633583536285
500.9792101509228930.04157969815421440.0207898490771072
510.974466745752570.05106650849486090.0255332542474305
520.9975974613516140.004805077296772060.00240253864838603
530.9965345544845240.006930891030952370.00346544551547619
540.9971213461018360.005757307796328190.00287865389816409
550.997104513935850.005790972128298660.00289548606414933
560.9959130703232510.008173859353497090.00408692967674855
570.9942292340735850.01154153185282970.00577076592641486
580.9935649807290860.01287003854182850.00643501927091427
590.995147676804760.009704646390480430.00485232319524021
600.9936622767108020.01267544657839700.00633772328919849
610.9944867805419110.01102643891617780.00551321945808889
620.9950416877703480.009916624459304080.00495831222965204
630.9933549103728010.01329017925439760.00664508962719878
640.9937154061575680.01256918768486370.00628459384243185
650.9920741012968070.01585179740638680.00792589870319338
660.9912330134799510.01753397304009720.0087669865200486
670.9911936554924380.01761268901512390.00880634450756193
680.992408603297750.01518279340450080.0075913967022504
690.9926229890072310.01475402198553780.00737701099276888
700.9900354594781920.01992908104361640.0099645405218082
710.9915123445940230.01697531081195300.00848765540597649
720.9887447120094480.02251057598110490.0112552879905525
730.9858755355293720.02824892894125620.0141244644706281
740.989683954110710.02063209177857830.0103160458892892
750.9860649847109670.02787003057806640.0139350152890332
760.9838140106574780.03237197868504470.0161859893425223
770.9787572305813250.04248553883735090.0212427694186755
780.971898413430230.05620317313953930.0281015865697696
790.9819288397198150.0361423205603690.0180711602801845
800.9811711890934850.03765762181302950.0188288109065148
810.9844656187665860.03106876246682740.0155343812334137
820.9855315805793760.02893683884124820.0144684194206241
830.9805481128186120.03890377436277620.0194518871813881
840.9760251948548720.04794961029025640.0239748051451282
850.9936147428220520.01277051435589670.00638525717794835
860.9911861584938160.01762768301236880.00881384150618442
870.9879374134762950.02412517304741040.0120625865237052
880.9841687718519260.03166245629614760.0158312281480738
890.9802669954503850.03946600909922930.0197330045496146
900.9739334460187760.05213310796244730.0260665539812236
910.968947376731810.06210524653638010.0310526232681900
920.9814832067207420.03703358655851680.0185167932792584
930.9760770990135980.04784580197280370.0239229009864018
940.9728246090977620.05435078180447610.0271753909022380
950.9659790355635590.0680419288728820.034020964436441
960.9575439971121530.08491200577569460.0424560028878473
970.9535973701117680.09280525977646310.0464026298882316
980.9410287167714980.1179425664570030.0589712832285017
990.9353320342401170.1293359315197650.0646679657598827
1000.9214983733308720.1570032533382570.0785016266691284
1010.9026602897059450.1946794205881100.0973397102940552
1020.8886871692377960.2226256615244080.111312830762204
1030.8918904622524010.2162190754951980.108109537747599
1040.9289292049938920.1421415900122150.0710707950061076
1050.9254569164493070.1490861671013870.0745430835506933
1060.905625300271350.1887493994573010.0943746997286505
1070.8852309097028210.2295381805943580.114769090297179
1080.8795482157603150.2409035684793700.120451784239685
1090.8769714482726470.2460571034547060.123028551727353
1100.8967147050313450.2065705899373110.103285294968655
1110.8888188319459750.2223623361080500.111181168054025
1120.9265296027254040.1469407945491920.0734703972745962
1130.9048660085096630.1902679829806740.095133991490337
1140.8827618407216510.2344763185566970.117238159278349
1150.8565786521910780.2868426956178440.143421347808922
1160.8473604826302380.3052790347395250.152639517369762
1170.8451600678784480.3096798642431040.154839932121552
1180.8462139050526980.3075721898946030.153786094947302
1190.8140406528364660.3719186943270680.185959347163534
1200.8513210199907520.2973579600184960.148678980009248
1210.8189905159203930.3620189681592140.181009484079607
1220.790452367248020.4190952655039610.209547632751980
1230.7825107808871980.4349784382256030.217489219112802
1240.7467063561374270.5065872877251460.253293643862573
1250.7341309093665230.5317381812669550.265869090633477
1260.7153981521943160.5692036956113670.284601847805683
1270.6572114164685910.6855771670628170.342788583531409
1280.6292789849081650.741442030183670.370721015091835
1290.6362651289010080.7274697421979830.363734871098992
1300.6400845547008650.7198308905982710.359915445299135
1310.5945461467446810.8109077065106390.405453853255319
1320.5531033495610240.8937933008779530.446896650438976
1330.5436999016228740.9126001967542530.456300098377126
1340.4713467827983630.9426935655967250.528653217201637
1350.4143155955371650.828631191074330.585684404462835
1360.3937028356181140.7874056712362290.606297164381886
1370.3207904510305660.6415809020611320.679209548969434
1380.4116151689132420.8232303378264840.588384831086758
1390.7713645714642730.4572708570714550.228635428535727
1400.763775101199090.4724497976018210.236224898800910
1410.7096114088818370.5807771822363260.290388591118163
1420.6233492404007710.7533015191984570.376650759599229
1430.5599515552341190.8800968895317610.440048444765881
1440.4346622858536370.8693245717072750.565337714146363
1450.6995806556277830.6008386887444330.300419344372217
1460.8492485876772450.301502824645510.150751412322755


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level70.0510948905109489NOK
5% type I error level420.306569343065693NOK
10% type I error level550.401459854014599NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290354848mb1qxhmqno0jkz4/10c2a41290354851.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290354848mb1qxhmqno0jkz4/10c2a41290354851.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290354848mb1qxhmqno0jkz4/1drtg1290354850.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290354848mb1qxhmqno0jkz4/1drtg1290354850.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290354848mb1qxhmqno0jkz4/2drtg1290354850.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290354848mb1qxhmqno0jkz4/2drtg1290354850.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290354848mb1qxhmqno0jkz4/3n0s01290354850.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290354848mb1qxhmqno0jkz4/3n0s01290354850.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290354848mb1qxhmqno0jkz4/4n0s01290354850.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290354848mb1qxhmqno0jkz4/4n0s01290354850.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290354848mb1qxhmqno0jkz4/5n0s01290354850.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290354848mb1qxhmqno0jkz4/5n0s01290354850.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290354848mb1qxhmqno0jkz4/6ya9l1290354850.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290354848mb1qxhmqno0jkz4/6ya9l1290354850.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290354848mb1qxhmqno0jkz4/7jtb11290354851.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290354848mb1qxhmqno0jkz4/7jtb11290354851.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290354848mb1qxhmqno0jkz4/8jtb11290354851.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290354848mb1qxhmqno0jkz4/8jtb11290354851.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290354848mb1qxhmqno0jkz4/9jtb11290354851.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290354848mb1qxhmqno0jkz4/9jtb11290354851.ps (open in new window)


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