Home » date » 2010 » Nov » 23 »

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: Tue, 23 Nov 2010 16:58:34 +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/23/t1290531434cvydnijgponfw8d.htm/, Retrieved Tue, 23 Nov 2010 17:57:24 +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/23/t1290531434cvydnijgponfw8d.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 9 12 12 8 13 5 9 15 10 12 16 6 9 12 9 7 12 6 9 10 10 10 11 5 9 12 12 7 12 3 9 15 13 16 18 8 9 9 12 11 11 4 9 12 12 14 14 4 9 11 6 6 9 4 9 11 5 16 14 6 9 11 12 11 12 6 9 15 11 16 11 5 9 7 14 12 12 4 9 11 14 7 13 6 9 11 12 13 11 4 9 10 12 11 12 6 9 14 11 15 16 6 9 10 11 7 9 4 9 6 7 9 11 4 9 11 9 7 13 2 9 15 11 14 15 7 9 11 11 15 10 5 9 12 12 7 11 4 9 14 12 15 13 6 9 15 11 17 16 6 9 9 11 15 15 7 9 13 8 14 14 5 9 13 9 14 14 6 9 16 12 8 14 4 9 13 10 8 8 4 9 12 10 14 13 7 9 14 12 14 15 7 9 11 8 8 13 4 9 9 12 11 11 4 9 16 11 16 15 6 9 12 12 10 15 6 9 10 7 8 9 5 9 13 11 14 13 6 9 16 11 16 16 7 9 14 12 13 13 6 9 15 9 5 11 3 9 5 15 8 12 3 9 8 11 10 12 4 9 11 11 8 12 6 9 16 11 13 14 7 9 17 11 15 14 5 9 9 15 6 8 4 9 9 11 12 13 5 9 13 12 16 16 6 9 10 12 5 13 6 10 6 9 15 11 6 10 12 12 12 14 5 10 8 12 8 13 4 10 14 13 13 13 5 10 12 11 14 13 5 10 11 9 12 12 4 10 16 9 16 16 6 10 8 11 10 15 2 10 15 11 15 15 8 10 7 12 8 12 3 10 16 12 16 14 6 10 14 9 19 etc...
 
Output produced by software:

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


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time9 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Popularity[t] = + 5.48495180027817 -0.566537820428668Tijd[t] + 0.0888510006565018FindingFriends[t] + 0.246617500855063KnowingPeople[t] + 0.354441237808493Liked[t] + 0.614549687191414Celebrity[t] + 0.00409598796722313t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)5.484951800278175.8726120.9340.3518210.17591
Tijd-0.5665378204286680.62376-0.90830.3652060.182603
FindingFriends0.08885100065650180.097080.91520.3615470.180774
KnowingPeople0.2466175008550630.0617553.99350.0001025.1e-05
Liked0.3544412378084930.0977723.62520.0003960.000198
Celebrity0.6145496871914140.1573033.90680.0001417.1e-05
t0.004095987967223130.0065470.62560.5325030.266251


Multiple Linear Regression - Regression Statistics
Multiple R0.708574818609038
R-squared0.502078273566831
Adjusted R-squared0.482027734247374
F-TEST (value)25.0406368411062
F-TEST (DF numerator)6
F-TEST (DF denominator)149
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.11349919739364
Sum Squared Residuals665.564949750152


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11311.44930057797741.55069942202258
21211.11393993454060.886060065459391
31513.60467732523201.39532267476802
41210.86906985703341.13093014296659
51010.7328784232224-0.732878423222412
6129.300165773363132.69983422663687
71516.8120661324904-1.81206613249044
8910.5549362021007-1.55493620210074
91212.3622084060586-0.362208406058635
10118.088052194203882.91194780579612
111113.4707777534905-2.47077775349052
121112.1548607661610-1.15486076616096
131512.33420233274712.66579766725292
14711.3582728698806-4.35827286988064
151111.7128219657639-0.712821965763871
161111.0809391075487-0.080939107548653
171012.1753407059971-2.17534070599707
181414.4948206479620-0.494820647962019
19108.815788590046461.18421140995354
2069.66659805271479-3.66659805271479
21118.834944141519052.16505585848095
221514.52469554835880.475304451641231
231111.7741034737558-0.774103473755758
24129.634002006156062.36599799384394
251413.54901985096360.450980149036398
261515.0208235534099-0.0208235534099302
27914.7917929890499-5.79179298904995
281312.69917786200130.300822137998718
291313.4066745378164-0.40667453781642
301610.96851914823995.03148085176006
31138.66826570804324.3317342919568
321213.7679219517575-1.76792195175751
331414.6586024166547-0.658602416654726
341110.27505785967430.724942140325664
35910.6655278772158-1.66552787721577
361614.46072469441861.53927530558140
371213.0739666779120-1.07396667791195
38109.399375546844170.600624453155834
391313.2708951809932-0.270895180993161
401615.44609957128740.553900428712596
411413.12132065672900.878679343270954
42158.333392098695036.66660790130497
4359.96488783097495-4.96488783097495
44810.7213645052177-2.72136450521770
451111.4613248658576-0.46132486585763
461614.02194052090861.97805947909143
471713.29017213620313.70982786379691
4898.688917505058380.311082494941622
49912.2040703717639-3.20407037176385
501314.9613607644247-1.96136076442472
511011.1893405295608-1.18934052956077
52612.1176382280635-6.11763822806347
531212.0972087416691-0.097208741669074
54810.1458438012161-2.14584380121614
551412.08642798130661.91357201869341
561212.1594394688159-0.159439468815874
571110.52360752876010.47639247123994
581614.16103784576431.83896215423566
59810.0504908433400-2.05049084334004
601514.97497245873110.0250275412689427
6179.2055247919868-2.20552479198679
621613.73509232398572.26490767601425
631413.50360533693170.496394663068334
641613.51563953536212.48436046463794
6599.69122011455888-0.691220114558882
661412.04263284828951.95736715171046
671112.8000722873498-1.80007228734981
681310.21667858128512.78332141871488
691512.66947049938262.33052950061737
7055.33798232973368-0.337982329733683
711512.22087928832422.77912071167578
721312.06720877609290.932791223907117
731111.8436599995020-0.843659999501972
741113.8212268873688-2.82122688736877
751212.2697269250179-0.2697269250179
761213.1913774168633-1.19137741686331
771212.0687159796321-0.0687159796320693
781211.73638070127020.263619298729785
791410.60268473820523.39731526179479
8067.821122636654-1.821122636654
8179.6553767376676-2.65537673766761
821411.83517110120902.16482889879098
831413.70128704369270.298712956307269
841011.0909823908679-1.09098239086794
85138.563976000634964.43602399936504
861212.2268945568184-0.226894556818366
8799.12883669005252-0.128836690052520
881211.90413705419280.0958629458071936
891614.84713860892551.15286139107453
901010.0966246304262-0.096624630426239
911412.99420244486531.00579755513467
921013.3837096975892-3.38370969758925
931615.18550011377810.814499886221934
941513.33402069981541.66597930018461
951211.22488925916390.775110740836106
96109.608992820222520.391007179777477
97810.1203456514868-2.1203456514868
9888.4904273709585-0.4904273709585
991112.7778964250540-1.77789642505395
1001312.30321112465640.696788875343581
1011615.37603451771440.623965482285588
1021614.62130526681951.37869473318048
1031415.7451122840439-1.74511228404394
104118.818539008507692.18146099149231
10546.89814409500296-2.89814409500296
1061414.4624436400695-0.462443640069505
107910.3105319775397-1.31053197753974
1081415.1715798811578-1.17157988115777
109810.4265476904276-2.42654769042761
110810.8864641005702-2.88646410057018
1111112.1570740424550-1.15707404245501
1121213.5979786682488-1.59797866824875
1131111.3699889648101-0.369988964810069
1141413.56267243352470.437327566475344
1151514.28914184563670.710858154363276
1161613.37418967184922.62581032815083
1171613.46713666047292.53286333952711
1181112.7004101189267-1.70041011892673
1191413.72194613726240.278053862737596
1201410.95935677200813.04064322799188
1211211.40674499844030.59325500155966
1221412.56856843855421.43143156144577
123810.2317922333446-2.2317922333446
1241313.8312770777550-0.831277077755021
1251613.74652206506572.25347793493426
1261210.91651085814601.08348914185401
1271615.44607839014490.553921609855059
1281213.4043687911589-1.40436879115892
1291111.5598648228419-0.5598648228419
13046.41852874211252-2.41852874211252
1311615.46246234201380.537537657986166
1321512.59204923980612.40795076019388
1331011.5327505640522-1.53275056405225
1341313.2402081918155-0.240208191815495
1351513.29424694302781.70575305697215
1361210.72833231538351.2716676846165
1371413.70682292001590.293177079984082
138710.7540033697383-3.75400336973829
1391914.15830713441544.84169286558464
1401212.7690926952146-0.76909269521461
1411212.3862837605486-0.386283760548553
1421313.5695363596535-0.569536359653473
1431513.05341544885491.94658455114514
14488.34892705400389-0.348927054003887
1451211.01181370794360.98818629205643
1461010.8541550658197-0.854155065819745
147811.4957616071678-3.4957616071678
1481014.4617240280899-4.46172402808988
1491514.00259227647770.997407723522341
1501614.69260987387251.30739012612755
1511313.2844226983748-0.284422698374774
1521615.18054590298920.819454097010831
153910.3546718723613-1.35467187236130
1541413.30219245004550.697807549954485
1551412.82505072695391.17494927304612
1561210.33997793920731.66002206079275


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.07417121716676250.1483424343335250.925828782833238
110.1122023010958710.2244046021917420.887797698904129
120.07412444808922570.1482488961784510.925875551910774
130.5511403375665690.8977193248668620.448859662433431
140.7218482202483420.5563035595033150.278151779751658
150.6557151830666840.6885696338666330.344284816933316
160.5800824504840220.8398350990319560.419917549515978
170.4940467172223210.9880934344446410.505953282777679
180.4571641186305520.9143282372611040.542835881369448
190.3987026918064480.7974053836128960.601297308193552
200.5276460118003720.9447079763992570.472353988199628
210.5273106489480940.9453787021038130.472689351051906
220.5663798065828690.8672403868342630.433620193417131
230.5035245191475380.9929509617049230.496475480852462
240.5178150591124320.9643698817751370.482184940887568
250.4911739057811730.9823478115623470.508826094218827
260.4341742033785950.868348406757190.565825796621405
270.6655067744017320.6689864511965360.334493225598268
280.6172996889752760.7654006220494470.382700311024724
290.5622103705493150.8755792589013710.437789629450685
300.7248560603992480.5502878792015050.275143939600752
310.8152721359705780.3694557280588450.184727864029422
320.7818493363755040.4363013272489930.218150663624496
330.737130176216580.525739647566840.26286982378342
340.7009914968246090.5980170063507820.299008503175391
350.707547669971870.584904660056260.29245233002813
360.7114112761260.5771774477479990.288588723873999
370.6806683066251270.6386633867497460.319331693374873
380.6299609019455930.7400781961088140.370039098054407
390.5767641390131120.8464717219737750.423235860986888
400.5463279395592650.907344120881470.453672060440735
410.5034265958100070.9931468083799860.496573404189993
420.7601932574063620.4796134851872770.239806742593638
430.9551996772490640.08960064550187130.0448003227509357
440.9661719149353650.06765617012926930.0338280850646347
450.9556735797909980.08865284041800450.0443264202090022
460.9602831656391540.07943366872169190.0397168343608460
470.982494630975230.03501073804953890.0175053690247694
480.9786262687705660.04274746245886760.0213737312294338
490.98304558522710.0339088295457990.0169544147728995
500.9788791527059560.04224169458808710.0211208472940435
510.974301773954000.05139645209199770.0256982260459989
520.9899254021436150.02014919571277030.0100745978563851
530.9925198808385650.01496023832286940.00748011916143468
540.9911645926096550.01767081478068990.00883540739034496
550.9949086778933440.01018264421331220.00509132210665612
560.9934707209821950.01305855803561000.00652927901780498
570.9912116450674730.01757670986505370.00878835493252685
580.9915089427781040.01698211444379130.00849105722189564
590.9926132997217030.01477340055659430.00738670027829715
600.991227803683890.01754439263222150.00877219631611077
610.9914934439364620.01701311212707690.00850655606353845
620.993312761365890.01337447726822050.00668723863411024
630.9913973781344130.01720524373117330.00860262186558665
640.9924502401363250.01509951972734930.00754975986367465
650.9900963620287060.01980727594258780.0099036379712939
660.9895663904319260.02086721913614730.0104336095680737
670.9892654192380580.02146916152388440.0107345807619422
680.9912610340791850.01747793184162950.00873896592081476
690.991583911758560.01683217648287850.00841608824143925
700.9886356189045620.02272876219087530.0113643810954376
710.990453385023670.01909322995265860.0095466149763293
720.987482074285650.02503585142869880.0125179257143494
730.9842259205031060.03154815899378880.0157740794968944
740.9884802712483610.02303945750327760.0115197287516388
750.984467948343420.0310641033131590.0155320516565795
760.9817631381901980.03647372361960370.0182368618098018
770.9760394763310060.04792104733798880.0239605236689944
780.9684749979174520.06305000416509650.0315250020825482
790.9799115288360390.04017694232792250.0200884711639613
800.9790510454909350.04189790901812910.0209489545090645
810.9824418849882680.03511623002346340.0175581150117317
820.9833104381310750.03337912373785040.0166895618689252
830.9776912301262220.04461753974755630.0223087698737782
840.9726822213813890.05463555723722180.0273177786186109
850.9925967947421240.01480641051575280.0074032052578764
860.9897973920711490.02040521585770290.0102026079288514
870.986284777930780.02743044413843860.0137152220692193
880.982183672268760.03563265546248040.0178163277312402
890.9778854666487290.04422906670254280.0221145333512714
900.9711913991521960.05761720169560740.0288086008478037
910.9660931465691960.06781370686160840.0339068534308042
920.9792565304945480.04148693901090420.0207434695054521
930.9731767660430850.05364646791382950.0268232339569148
940.969630954797080.06073809040583850.0303690452029192
950.9624747827297180.07505043454056340.0375252172702817
960.9539529278562770.09209414428744630.0460470721437232
970.9498200909923170.1003598180153650.0501799090076827
980.9370888208350080.1258223583299840.0629111791649919
990.9319701416553470.1360597166893060.0680298583446528
1000.9180714410693070.1638571178613850.0819285589306927
1010.8983299285772230.2033401428455550.101670071422777
1020.8841235458746210.2317529082507570.115876454125379
1030.886166657967140.227666684065720.11383334203286
1040.9244745433134840.1510509133730330.0755254566865163
1050.9215458759765430.1569082480469140.0784541240234568
1060.9006786255034640.1986427489930720.0993213744965358
1070.8796565373895740.2406869252208520.120343462610426
1080.8700548085907350.2598903828185300.129945191409265
1090.8659980935327280.2680038129345440.134001906467272
1100.8893644763032960.2212710473934090.110635523696704
1110.8789539465912960.2420921068174080.121046053408704
1120.9167537046373180.1664925907253650.0832462953626823
1130.893010235247970.2139795295040590.106989764752029
1140.8671853722209870.2656292555580260.132814627779013
1150.8368677953645460.3262644092709080.163132204635454
1160.8308796877500820.3382406244998360.169120312249918
1170.8346854766893810.3306290466212380.165314523310619
1180.8276514000845350.344697199830930.172348599915465
1190.7893421187360390.4213157625279230.210657881263961
1200.8380351143385670.3239297713228660.161964885661433
1210.8074636553157660.3850726893684690.192536344684234
1220.7816338394766930.4367323210466150.218366160523307
1230.7678367475293150.464326504941370.232163252470685
1240.7231502167006390.5536995665987230.276849783299361
1250.7229661625218970.5540676749562060.277033837478103
1260.7111750560429090.5776498879141820.288824943957091
1270.652207296122980.695585407754040.34779270387702
1280.6130905217658750.773818956468250.386909478234125
1290.6271419080399790.7457161839200410.372858091960021
1300.6285834442282520.7428331115434970.371416555771748
1310.5727478292826120.8545043414347770.427252170717388
1320.5403232342543510.9193535314912970.459676765745649
1330.5259145131376710.9481709737246570.474085486862329
1340.4491458955153480.8982917910306970.550854104484652
1350.4040580681158260.8081161362316510.595941931884174
1360.3906446110898120.7812892221796240.609355388910188
1370.3168926890019830.6337853780039670.683107310998017
1380.38277004944650.7655400988930.6172299505535
1390.7522045405239780.4955909189520440.247795459476022
1400.7559265798175250.488146840364950.244073420182475
1410.7072734008816920.5854531982366160.292726599118308
1420.6213856052397510.7572287895204980.378614394760249
1430.5440975862764020.9118048274471950.455902413723598
1440.4174598484335080.8349196968670160.582540151566492
1450.4773766848508010.9547533697016020.522623315149199
1460.6172899210745380.7654201578509240.382710078925462


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level410.299270072992701NOK
10% type I error level540.394160583941606NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290531434cvydnijgponfw8d/10ks7s1290531503.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290531434cvydnijgponfw8d/10ks7s1290531503.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290531434cvydnijgponfw8d/1drsy1290531503.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290531434cvydnijgponfw8d/1drsy1290531503.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290531434cvydnijgponfw8d/2drsy1290531503.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290531434cvydnijgponfw8d/2drsy1290531503.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290531434cvydnijgponfw8d/3drsy1290531503.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290531434cvydnijgponfw8d/3drsy1290531503.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290531434cvydnijgponfw8d/46i911290531503.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290531434cvydnijgponfw8d/46i911290531503.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290531434cvydnijgponfw8d/56i911290531503.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290531434cvydnijgponfw8d/56i911290531503.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290531434cvydnijgponfw8d/6g9qm1290531503.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290531434cvydnijgponfw8d/6g9qm1290531503.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290531434cvydnijgponfw8d/791p71290531503.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290531434cvydnijgponfw8d/791p71290531503.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290531434cvydnijgponfw8d/891p71290531503.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290531434cvydnijgponfw8d/891p71290531503.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290531434cvydnijgponfw8d/991p71290531503.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290531434cvydnijgponfw8d/991p71290531503.ps (open in new window)


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