Home » date » 2010 » Nov » 22 »

WS7 Tutorial Popularity 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: Mon, 22 Nov 2010 10:55:52 +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/t1290423305qig4gczb8mce8s4.htm/, Retrieved Mon, 22 Nov 2010 11:55:27 +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/t1290423305qig4gczb8mce8s4.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 13 13 14 13 3 1 1 0 9 12 12 8 13 5 1 0 0 9 15 10 12 16 6 0 0 0 9 12 9 7 12 6 2 0 1 9 10 10 10 11 5 0 1 2 9 12 12 7 12 3 0 0 1 9 15 13 16 18 8 1 1 1 9 9 12 11 11 4 1 0 0 9 12 12 14 14 4 4 0 0 9 11 6 6 9 4 0 0 0 9 11 5 16 14 6 0 2 1 9 11 12 11 12 6 2 0 0 9 15 11 16 11 5 0 2 2 9 7 14 12 12 4 1 1 1 9 11 14 7 13 6 0 1 0 9 11 12 13 11 4 0 0 1 9 10 12 11 12 6 1 1 0 9 14 11 15 16 6 2 0 1 9 10 11 7 9 4 1 0 0 9 6 7 9 11 4 1 0 0 9 11 9 7 13 2 0 1 1 9 15 11 14 15 7 1 2 0 9 11 11 15 10 5 1 2 1 9 12 12 7 11 4 2 0 0 9 14 12 15 13 6 1 0 0 9 15 11 17 16 6 1 1 0 9 9 11 15 15 7 1 1 0 9 13 8 14 14 5 2 2 0 9 13 9 14 14 6 0 0 2 9 16 12 8 14 4 1 1 1 9 13 10 8 8 4 0 1 2 9 12 10 14 13 7 1 1 1 9 14 12 14 15 7 1 2 1 9 11 8 8 13 4 0 2 0 9 9 12 11 11 4 1 1 0 9 16 11 16 15 6 2 2 0 9 12 12 10 15 6 1 1 1 9 10 7 8 9 5 1 1 2 9 13 11 14 13 6 1 0 1 9 16 11 16 16 7 1 3 1 9 14 12 13 13 6 0 1 2 9 15 9 5 11 3 1 0 0 9 5 15 8 12 3 1 0 0 9 8 11 10 12 4 1 0 0 9 11 11 8 12 6 0 1 1 9 16 11 13 14 7 2 0 1 9 1 etc...
 
Output produced by software:

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


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


Multiple Linear Regression - Estimated Regression Equation
Popularity[t] = + 0.291123164546368 -0.0511359771771675month[t] + 0.100278815914936FindingFriends[t] + 0.211899695274710KnowingPeople[t] + 0.384406986575042Liked[t] + 0.591650456104061Celebrity[t] + 0.312334530791981bestfriend[t] -0.0295870251376916secondbestfriend[t] + 0.409233788979355thirdbestfriend[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)0.2911231645463683.5635910.08170.9350010.467501
month-0.05113597717716750.35484-0.14410.8856110.442805
FindingFriends0.1002788159149360.0970161.03360.3030070.151504
KnowingPeople0.2118996952747100.0638393.31930.0011380.000569
Liked0.3844069865750420.0986793.89550.0001487.4e-05
Celebrity0.5916504561040610.1561153.78980.0002190.00011
bestfriend0.3123345307919810.2105761.48320.1401520.070076
secondbestfriend-0.02958702513769160.201438-0.14690.8834290.441714
thirdbestfriend0.4092337889793550.2137521.91450.0574960.028748


Multiple Linear Regression - Regression Statistics
Multiple R0.718941993490984
R-squared0.51687759000479
Adjusted R-squared0.490585213950629
F-TEST (value)19.6588390847615
F-TEST (DF numerator)8
F-TEST (DF denominator)147
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.09596780395353
Sum Squared Residuals645.782912175841


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11311.15610941013391.84389058986607
21210.99732035991661.00267964008338
31513.07689839422281.92310160577722
41211.41339600619740.586603993802554
51010.9282941675151-0.928294167515113
6129.314612024046112.68538797595389
71516.8694298030583-1.86942980305829
8910.2725550164866-1.27255501648660
91212.9984786544118-0.998478654411798
10117.530235140681363.46976485931864
111113.0043488613008-2.00434886130083
121112.1525974460617-1.15259744606174
131512.27038412994062.72961587005938
14711.4490660940079-4.44906609400788
151111.2357071966462-0.235707196646161
161110.79325366522340.206746334776610
171011.8106758901321-1.81067589013207
181414.8467791465252-0.84677914652517
19108.555863446322731.44413655367727
2069.34736154636249-3.34736154636249
21118.776945081634592.22305491836541
221514.06138055073280.93861944926724
231111.5771781899035-0.577178189903492
24129.737290766179742.26270923382026
251413.07226868294360.927731317056356
261514.51942319216560.480576807834437
27914.3028672711452-5.30286727114516
281312.50517073499680.494829265003233
291313.4500725736659-0.450072573665895
301611.16972365422934.83027634577075
31138.75962336113654.2403766388635
321213.6311085757848-1.63110857578479
331414.5708931556271-0.570893155627051
34119.633046059085441.36695394091456
35910.2429679913489-1.24296799134890
361614.20586401597011.7941359840299
371213.1612309435618-1.16123094356184
38109.747178886862780.252821113137221
391313.1693239607334-0.169323960733352
401615.24923369169890.750766308301114
411413.12501531442330.87498468557674
42158.108669940989466.89133005901054
4359.73044890887825-4.73044890887825
44810.3447834918720-2.34478349187199
451111.1715972465804-0.171597246580375
461614.24581623892971.75418376107027
471714.28333345286632.71666654713366
4898.048337497340740.951662502659255
49911.4323057943085-2.43230579430853
501314.8466231269228-1.84662312692284
511010.9236847050589-0.92368470505885
52612.0403434699607-6.04034346996074
531211.88740457166080.112595428339179
54810.4729821368622-2.47298213686223
551411.84476312141312.15523687858688
561212.9277332433333-0.927733243333263
571111.0230223205811-0.0230223205810992
581614.09355509579581.90644490420420
59810.2043935119364-2.20439351193644
601514.56063424441780.439365755582235
6179.0661419531643-2.06614195316430
621613.87059986813282.12940013186717
631412.84156649661581.15843350338421
641613.57466742591432.42533257408571
65910.1872012965741-1.18720129657414
661412.31801738990501.68198261009502
671113.2318077556377-2.23180775563770
681310.34987770088972.65012229911031
691512.94739305392102.05260694607897
7055.76127050334993-0.761270503349934
711512.87659726615612.12340273384390
721311.91692178369991.08307821630008
731112.9968137479744-1.99681374797437
741114.0952478000063-3.09524780000629
751212.1930141708868-0.193014170886771
761213.4007794696081-1.40077946960814
771212.7519219616863-0.751921961686308
781212.0811136174823-0.0811136174822852
791411.05127544400242.94872455599760
8067.97861965072775-1.97861965072775
8179.41630568885595-2.41630568885595
821412.61556925857801.38443074142198
831414.0003351977312-0.00033519773121668
841010.9673318250210-0.967331825020967
85139.367446459716113.63255354028389
861212.4136399800742-0.41363998007422
8799.07144712585763-0.0714471258576263
881212.3554364093057-0.355436409305704
891615.07030286891440.929697131085609
901010.8033161391914-0.803316139191449
911412.98498934806541.01501065193458
921013.6455152362939-3.64551523629387
931614.98604199964471.01395800035533
941513.31522227486561.68477772513440
951211.47684442991530.523155570084742
96109.273385422693310.726614577306685
97810.2857412363574-2.28574123635735
9888.46845460630873-0.468454606308727
991112.5556942387404-1.55569423874035
1001312.99200150262630.0079984973736558
1011615.87840524905120.121594750948834
1021615.17047768784160.82952231215836
1031415.6644239192084-1.66442391920835
104118.9939389859272.00606101407300
10547.37908943075277-3.37908943075277
1061414.6811824228954-0.681182422895399
107910.5776716883672-1.57767168836724
1081415.2526155390514-1.25261553905141
109810.0286106598962-2.02861065989624
110810.4919319595558-2.49193195955582
1111111.9776325185835-0.977632518583453
1121213.2116678982108-1.21166789821079
1131111.0136006127768-0.0136006127768117
1141413.02422573243750.975774267562534
1151514.41305254142580.586947458574178
1161613.37610868680622.62389131319384
1171612.88130546627483.11869453372517
1181112.6614687734309-1.66146877343094
1191413.38409084997810.615909150021876
1201411.02978143603622.97021856396378
1211211.58177947157590.418220528424115
1221413.07206297859320.92793702140677
123810.8410413471034-2.84104134710344
1241314.2946990610775-1.29469906107747
1251614.53634180109221.46365819890779
1261210.59445744797311.40554255202692
1271615.86732320219640.132676797803649
1281212.7087981749745-0.708798174974494
1291111.3236884710665-0.323688471066468
13045.75762186245885-1.75762186245885
1311616.1204836827130-0.120483682712950
1321513.10362238198611.89637761801388
1331011.1658333304308-1.16583333043083
1341314.3080532885827-1.30805328858271
1351512.61023172072472.38976827927527
1361210.22451206598041.77548793401958
1371412.90416527022151.09583472977847
138710.4379749603298-3.43797496032983
1391913.76035965377895.23964034622113
1401213.0934132037665-1.09341320376652
1411211.94945267291810.0505473270818735
1421313.2609522301165-0.260952230116489
1431512.46681852721682.53318147278321
14488.98814186294263-0.988141862942634
1451211.18756710616420.812432893835844
1461010.4485933177299-0.448593317729926
147811.3305913693145-3.33059136931448
1481014.3439436071780-4.34394360717797
1491514.23872889147260.761271108527372
1501614.02521397450861.97478602549143
1511313.2564520239731-0.256452023973133
1521615.04875162725000.951248372750046
15399.76941328862813-0.769413288628131
1541413.36292375024190.637076249758089
1551413.42576229161480.574237708385213
1561210.06147324577381.93852675422620


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
120.2678513345002960.5357026690005920.732148665499704
130.7315296066593030.5369407866813930.268470393340697
140.9142176081100610.1715647837798780.085782391889939
150.866476907794970.2670461844100600.133523092205030
160.809325610501750.3813487789965000.190674389498250
170.7396762307510420.5206475384979170.260323769248958
180.653738513018350.6925229739633010.346261486981651
190.5735676834704780.8528646330590440.426432316529522
200.7980922531473420.4038154937053160.201907746852658
210.7415994501696420.5168010996607170.258400549830358
220.7398475105646740.5203049788706520.260152489435326
230.6738257356869080.6523485286261850.326174264313092
240.6681044889121870.6637910221756260.331895511087813
250.6320021330011760.7359957339976490.367997866998824
260.5711288379068880.8577423241862240.428871162093112
270.782043545414310.4359129091713810.217956454585690
280.741339637825130.5173207243497410.258660362174870
290.6832311636062760.6335376727874480.316768836393724
300.7894184284235510.4211631431528970.210581571576449
310.8471088776428070.3057822447143850.152891122357193
320.8128608530515020.3742782938969970.187139146948498
330.7686127680653280.4627744638693440.231387231934672
340.7318356037058850.536328792588230.268164396294115
350.706367759331850.5872644813362990.293632240668150
360.7354872440465790.5290255119068420.264512755953421
370.7124346299322570.5751307401354870.287565370067743
380.6666289978551480.6667420042897050.333371002144852
390.6176513638903460.7646972722193070.382348636109653
400.5752149597017590.8495700805964830.424785040298241
410.5279938500366200.944012299926760.47200614996338
420.8612217805111670.2775564389776660.138778219488833
430.9665833104382970.06683337912340580.0334166895617029
440.968195765983340.06360846803331810.0318042340166591
450.959256047933050.08148790413390190.0407439520669509
460.9647205182928310.07055896341433750.0352794817071687
470.9717868031831920.05642639363361630.0282131968168081
480.968360992512940.06327801497412170.0316390074870608
490.9646124249083240.0707751501833520.035387575091676
500.9555286995619040.08894260087619240.0444713004380962
510.9493328443042320.1013343113915360.0506671556957681
520.9900909833618450.01981803327631050.00990901663815524
530.9864360035328250.02712799293434910.0135639964671746
540.9910223060725720.01795538785485600.00897769392742801
550.9930041335620150.01399173287596970.00699586643798484
560.9908837337966130.01823253240677310.00911626620338653
570.9874740424208530.02505191515829300.0125259575791465
580.9871492056746050.02570158865079020.0128507943253951
590.990200165216620.01959966956675940.0097998347833797
600.9890189551237470.02196208975250500.0109810448762525
610.988863729907920.02227254018415810.0111362700920791
620.990426082140180.01914783571963880.00957391785981939
630.9888803808176050.02223923836478990.0111196191823949
640.9892955367363910.02140892652721720.0107044632636086
650.9887657389000370.02246852219992600.0112342610999630
660.986713682394570.02657263521086170.0132863176054308
670.9884284032135680.02314319357286320.0115715967864316
680.9898264183192030.02034716336159370.0101735816807968
690.9892063818901250.02158723621975060.0107936181098753
700.9863757381272550.02724852374549050.0136242618727453
710.9864624439497350.02707511210052910.0135375560502646
720.9829212683772070.03415746324558660.0170787316227933
730.9841504936372280.03169901272554330.0158495063627716
740.9894996134871930.02100077302561450.0105003865128073
750.9859931529239940.02801369415201260.0140068470760063
760.9837312215888440.03253755682231220.0162687784111561
770.9790275260196430.04194494796071370.0209724739803568
780.9727438300408540.0545123399182930.0272561699591465
790.9789046939270370.04219061214592530.0210953060729627
800.9786668339147240.04266633217055130.0213331660852757
810.9802987951330930.03940240973381480.0197012048669074
820.9780726521365580.04385469572688340.0219273478634417
830.9708758887860570.05824822242788530.0291241112139427
840.9636129145806250.07277417083875080.0363870854193754
850.9844686979080290.03106260418394280.0155313020919714
860.9795301760248670.04093964795026590.0204698239751329
870.972941769530300.05411646093939820.0270582304696991
880.9653188183054410.06936236338911840.0346811816945592
890.9565035496042840.08699290079143180.0434964503957159
900.9456790051839530.1086419896320940.0543209948160468
910.9360495390388550.1279009219222900.0639504609611449
920.9631666497959860.07366670040802800.0368333502040140
930.9539761038777330.09204779224453340.0460238961222667
940.948960354309090.1020792913818190.0510396456909093
950.9363909376317440.1272181247365130.0636090623682564
960.9214250050037870.1571499899924260.0785749949962131
970.917424809309990.1651503813800180.0825751906900092
980.897594806931740.2048103861365220.102405193068261
990.888133783090760.2237324338184810.111866216909240
1000.861792857181190.2764142856376210.138207142818810
1010.832625671896550.3347486562068990.167374328103450
1020.8018491369719110.3963017260561770.198150863028089
1030.830250346198640.3394993076027190.169749653801360
1040.8725282875519130.2549434248961740.127471712448087
1050.8794083399137970.2411833201724050.120591660086203
1060.8524915602195250.2950168795609490.147508439780475
1070.8286865565190890.3426268869618230.171313443480911
1080.8225860546060120.3548278907879760.177413945393988
1090.8125769717782440.3748460564435120.187423028221756
1100.8347472123309760.3305055753380480.165252787669024
1110.8205409284868470.3589181430263060.179459071513153
1120.8675319755252580.2649360489494830.132468024474742
1130.8344548966231930.3310902067536140.165545103376807
1140.8010761977835750.3978476044328490.198923802216425
1150.7600172246084920.4799655507830150.239982775391508
1160.7723196136389310.4553607727221380.227680386361069
1170.782083959981740.4358320800365180.217916040018259
1180.7622000186412860.4755999627174280.237799981358714
1190.7165573747786850.5668852504426290.283442625221315
1200.8021962436530250.3956075126939500.197803756346975
1210.7680665521219130.4638668957561740.231933447878087
1220.7181076494505730.5637847010988530.281892350549427
1230.7167784968328570.5664430063342870.283221503167144
1240.681936715058390.6361265698832210.318063284941610
1250.6551771566105570.6896456867788850.344822843389443
1260.6366249755225130.7267500489549740.363375024477487
1270.5703123004906650.859375399018670.429687699509335
1280.5529379248307320.8941241503385360.447062075169268
1290.5415609757494840.9168780485010310.458439024250516
1300.5273171683015330.9453656633969330.472682831698467
1310.4582107475922270.9164214951844530.541789252407773
1320.4275904170900050.855180834180010.572409582909995
1330.3913229988154910.7826459976309820.608677001184509
1340.3463124146818660.6926248293637330.653687585318134
1350.2987739248101240.5975478496202480.701226075189876
1360.2741180170187510.5482360340375020.725881982981249
1370.2413305637247180.4826611274494360.758669436275282
1380.2642179808010550.528435961602110.735782019198945
1390.6435463020351730.7129073959296530.356453697964826
1400.6332558716228390.7334882567543220.366744128377161
1410.5260238330694660.9479523338610670.473976166930534
1420.512125676302660.975748647394680.48787432369734
1430.3780826783545200.7561653567090390.62191732164548
1440.2578906186196720.5157812372393440.742109381380328


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level320.240601503759398NOK
10% type I error level480.360902255639098NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290423305qig4gczb8mce8s4/106fpl1290423340.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290423305qig4gczb8mce8s4/106fpl1290423340.ps (open in new window)


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


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


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290423305qig4gczb8mce8s4/3zesr1290423340.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290423305qig4gczb8mce8s4/3zesr1290423340.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290423305qig4gczb8mce8s4/4an9c1290423340.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290423305qig4gczb8mce8s4/4an9c1290423340.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290423305qig4gczb8mce8s4/5an9c1290423340.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290423305qig4gczb8mce8s4/5an9c1290423340.ps (open in new window)


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


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


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


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


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





Copyright

Creative Commons License

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

Software written by Ed van Stee & Patrick Wessa


Disclaimer

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


Privacy Policy

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

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

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

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

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

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

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

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

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


FreeStatistics.org is powered by