Home » date » 2010 » Nov » 23 »

ws 7 Model 2: tijd

*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 11:08:59 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Nov/23/t1290510479ovo0541jws8oizd.htm/, Retrieved Tue, 23 Nov 2010 12:07:59 +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/t1290510479ovo0541jws8oizd.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 time10 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
Popularity[t] = + 2.6093942753828 -0.24986593522325Tijd[t] + 0.0962642440224116FindingFriends[t] + 0.243936452579795KnowingPeople[t] + 0.357484705624815Liked[t] + 0.622809523303693Celebrity[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)2.60939427538283.6481510.71530.4755570.237779
Tijd-0.249865935223250.363799-0.68680.4932540.246627
FindingFriends0.09626424402241160.0961591.00110.3183910.159196
KnowingPeople0.2439364525797950.0614813.96760.0001125.6e-05
Liked0.3574847056248150.0974533.66830.0003390.000169
Celebrity0.6228095233036930.156433.98140.0001065.3e-05


Multiple Linear Regression - Regression Statistics
Multiple R0.707651177863378
R-squared0.500770189531427
Adjusted R-squared0.484129195849141
F-TEST (value)30.0925653294667
F-TEST (DF numerator)5
F-TEST (DF denominator)150
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.10920750873077
Sum Squared Residuals667.313447232938


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11311.54287610981571.45712389018429
21211.22861219692190.771387803078095
31513.70709315937441.29290684062560
41210.96120782995371.03879217004625
51010.8089872027870-0.808987202787039
6129.38157199210992.61842800789009
71516.9322201596178-1.93222015961783
8910.6226426201080-1.62264262010796
91212.4269060947218-0.426906094721793
10118.110405481824892.88959451817511
111113.4865483383319-2.48654833833189
121112.2257463723402-1.22574637234017
131512.36887016228822.63112983771178
14711.4165922663574-4.4165922663574
151111.8000137556906-0.800013755690625
161111.1105155252676-0.110515525267554
171012.2257463723402-2.22574637234016
181414.5351667611362-0.535166761136192
19108.835663154516741.16433684548326
2069.65344849483632-3.65344849483632
21118.82745444236382.17254555763621
221514.55655512623530.443444873764725
231111.7674490040836-0.76744900408361
24129.646896809788792.35310319021121
251413.55897688828420.441023111715841
261515.0230396662958-0.0230396662957811
27914.8004915788151-5.80049157881507
281312.66465864193580.33534135806416
291313.3837324092619-0.383732409261944
301610.96328737924305.03671262075697
31138.625850657449314.37414934255069
321213.7453214709632-1.74532147096323
331414.6528193702577-0.652819370257688
341110.22074569752860.779254302471436
35910.6226426201080-1.62264262010796
361614.42161850809121.57838149190883
371213.0542640366348-1.05426403663482
38109.317352154310590.682647845689415
391313.2187761916820-0.218776191681953
401615.40191273701970.59808726298032
411413.07110398312460.92889601687543
42158.247421649258276.75257835074173
4359.91430117675694-4.91430117675694
44810.6399266291306-2.63992662913057
451111.3976727705784-0.39767277057837
461613.95513396803072.04486603196933
471713.19738782658293.80261217341713
4898.619298972401780.38070102759822
49912.1080937632187-3.10809376321867
501314.8753674577384-1.87536745773840
511011.1196123624862-1.11961236248621
52612.3053488097440-6.30534880974405
531212.3119767776426-0.311976777642647
54810.3559367383950-2.35593673839496
551412.29469276862001.70530723137996
561212.346100733155-0.346100733155009
571110.68540511102210.314594888977911
581614.33670879044791.66329120955209
59810.2168957641744-2.21689576417438
601515.1734351668955-0.173435166895513
6179.37564250946645-2.37564250946645
621613.91053211126552.08946788873448
631413.63857932568800.361420674311962
641613.68387966770832.31612033229167
6599.84459591884701-0.844595918847013
661412.19842852459761.80157147540237
671112.9516262474361-1.95162624743609
681310.37732510349402.62267489650596
691512.82123804790132.17876195209868
7055.4672227245147-0.467222724514699
711512.3461007331552.65389926684499
721312.19842852459760.801571475402373
731111.9717760810404-0.97177608104044
741113.9175278588459-2.91752785884590
751212.3847731072767-0.384773107276702
761213.3091109530609-1.30911095306091
771212.1811445155750-0.181144515575018
781211.81337154850800.18662845149202
791410.71342144401983.28657855598023
8067.90747537537835-1.90747537537835
8179.75451558019035-2.75451558019035
821411.88616787814202.11383212185797
831413.79742792075340.202572079246647
841011.1605424257684-1.1605424257684
85138.643833151727074.35616684827293
861212.3160811337191-0.316081133719121
8799.1872183774981-0.187218377498103
881211.94420381057560.0557961894243915
891614.92949871431571.07050128568428
901010.1461242413275-0.146124241327528
911413.06561856301400.934381436986031
921013.4399432151285-3.43994321512854
931615.24831104581880.751688954181159
941513.36051891759591.63948108240412
951211.25680666979080.74319333020919
96109.640967327145330.35903267285467
97810.1444887545711-2.14448875457111
9888.51300088965944-0.513000889659439
991112.7722774123374-1.77227741233740
1001312.33336514274170.66663485725827
1011615.39598325437620.604016745623776
1021614.64688988761421.35311011238577
1031415.7769358743894-1.77693587438940
104118.808789369307062.19121063069294
10546.86958927654913-2.86958927654913
1061414.5037660976662-0.503766097666178
107910.2724080847858-1.27240808478583
1081415.1734351668955-1.17343516689551
109810.3859563378308-2.38595633783085
110810.8335213821123-2.83352138211233
1111112.1194482895978-1.11944828959782
1121213.5468635002750-1.54686350027496
1131111.3576193324226-0.357619332422551
1141413.53620745915090.463792540849051
1151514.27256523549970.727434764500338
1161613.32639496208352.67360503791648
1171613.42265920610592.57734079389407
1181112.6740099018768-1.67400990187679
1191413.66659565868570.333404341314276
1201410.87793359906693.12206640093309
1211211.33168254871410.668317451285861
1221412.47648893268981.52351106731022
123810.1461242413275-2.14612424132753
1241313.7628599027081-0.762859902708136
1251613.66659565868572.33340434131428
1261210.84835806216391.15164193783612
1271615.38324766396290.616752336037055
1281213.3091109530609-1.30911095306091
1291111.4390468963934-0.439046896393411
13046.26564450652239-2.26564450652239
1311615.38324766396290.616752336037055
1321512.48103735129912.51896264870089
1331011.4283908552694-1.42839085526940
1341313.1445987980138-0.144598798013771
1351513.17872275352611.82127724647387
1361210.59987319097481.40012680902525
1371413.57033141466330.429668585336687
138710.5953247723654-3.59532477236542
1391914.02408036431054.97591963568946
1401212.6073211947574-0.607321194757413
1411212.2111641150109-0.211164115010906
1421313.4226592061059-0.422659206105929
1431512.89200957074822.10799042925183
14488.14888821613602-0.148888216136022
1451210.84380964355451.15619035644545
1461010.7220742187056-0.722074218705579
147811.3362309673235-3.33623096732347
1481014.3128730963778-4.31287309637777
1491513.81426786724311.18573213275689
1501614.53789005317851.46210994682146
1511313.1038468746028-0.103846874602806
1521615.00437459323900.995625406760954
153910.1461242413275-1.14612424132753
1541413.09974251852630.900257481473668
1551412.61142555083391.38857444916611
1561210.10334751112941.89665248887064


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.1099066623509470.2198133247018940.890093337649053
100.0478060903171790.0956121806343580.952193909682821
110.07272965627741940.1454593125548390.92727034372258
120.03807835479920440.07615670959840870.961921645200796
130.4402804947073120.8805609894146240.559719505292688
140.7624254754877040.4751490490245920.237574524512296
150.6820338784022580.6359322431954840.317966121597742
160.592928156773980.814143686452040.40707184322602
170.5347173537571110.9305652924857780.465282646242889
180.447716309952050.89543261990410.55228369004795
190.3704081811435480.7408163622870960.629591818856452
200.6651752712083690.6696494575832620.334824728791631
210.6005542563600740.7988914872798530.399445743639926
220.5668068985383640.8663862029232720.433193101461636
230.4960293306347260.9920586612694520.503970669365274
240.4768823910699050.953764782139810.523117608930095
250.4388901476241530.8777802952483060.561109852375847
260.3808077455838490.7616154911676980.619192254416151
270.6484716296833410.7030567406333180.351528370316659
280.5907580991174080.8184838017651840.409241900882592
290.5306221849362960.9387556301274080.469377815063704
300.6885644145274270.6228711709451470.311435585472573
310.8056357689663110.3887284620673780.194364231033689
320.7697890445274520.4604219109450950.230210955472548
330.7292910483586630.5414179032826730.270708951641337
340.6847424958502050.630515008299590.315257504149795
350.6785749979456770.6428500041086460.321425002054323
360.6960467251368910.6079065497262180.303953274863109
370.6574614965524840.6850770068950310.342538503447516
380.606977509602480.786044980795040.39302249039752
390.5567306883698310.8865386232603390.443269311630169
400.5386054479975950.922789104004810.461394552002405
410.5083116329504590.9833767340990810.491688367049541
420.8102366364284850.379526727143030.189763363571515
430.951972892758120.09605421448376150.0480271072418808
440.9618133467347730.07637330653045340.0381866532652267
450.950286168996270.09942766200746180.0497138310037309
460.9565562163797780.08688756724044440.0434437836202222
470.9829906472953390.03401870540932230.0170093527046611
480.9795070278899090.04098594422018280.0204929721100914
490.9819640752683030.0360718494633950.0180359247316975
500.9771810494243310.0456379011513380.022818950575669
510.9719506318467680.05609873630646370.0280493681532319
520.9892137702466850.02157245950662940.0107862297533147
530.9920212114723850.01595757705522910.00797878852761455
540.9905176915695320.01896461686093600.00948230843046798
550.9946171284903560.01076574301928820.0053828715096441
560.9931225613106920.01375487737861510.00687743868930756
570.9908312326145180.01833753477096330.00916876738548164
580.9912809637711850.01743807245763040.00871903622881522
590.9923122652969820.01537546940603610.00768773470301807
600.9908551757936650.01828964841266920.00914482420633459
610.9909179120658960.01816417586820760.00908208793410379
620.9930652395366390.01386952092672290.00693476046336143
630.9911493175366920.01770136492661600.00885068246330802
640.9924600908068720.01507981838625640.00753990919312822
650.9900936903760820.01981261924783510.00990630962391757
660.9897506989631020.0204986020737960.010249301036898
670.9893141572535140.02137168549297230.0106858427464862
680.991537703948250.01692459210350050.00846229605175024
690.9919567187235160.01608656255296810.00804328127648406
700.9891203551131850.02175928977363030.0108796448868151
710.9909247665167610.01815046696647790.00907523348323894
720.9880729446947450.02385411061051070.0119270553052554
730.9849736849417860.03005263011642850.0150263150582142
740.988942857971290.02211428405741870.0110571420287093
750.9851146151012980.02977076979740290.0148853848987015
760.9825681226349240.03486375473015240.0174318773650762
770.9770907852489850.0458184295020310.0229092147510155
780.9698799788324630.06024004233507360.0301200211675368
790.9811415111250370.03771697774992690.0188584888749634
800.9801820372753510.0396359254492980.019817962724649
810.983345826020420.03330834795916120.0166541739795806
820.9844042362590040.03119152748199180.0155957637409959
830.9791748897514770.04165022049704680.0208251102485234
840.9743694222538040.05126115549239180.0256305777461959
850.9930124347279430.01397513054411370.00698756527205687
860.9905124542516320.01897509149673560.00948754574836781
870.9870793503403380.02584129931932400.0129206496596620
880.9830038099664860.03399238006702840.0169961900335142
890.9787683241927180.04246335161456310.0212316758072815
900.9719509099069260.05609818018614820.0280490900930741
910.9660621139042020.06787577219159550.0339378860957977
920.9806406500348980.03871869993020350.0193593499651018
930.9750596757098820.04988064858023550.0249403242901177
940.9714017513117680.05719649737646410.0285982486882320
950.9638365157515850.07232696849683070.0361634842484154
960.9540942427849840.09181151443003160.0459057572150158
970.9501294057082440.0997411885835120.049870594291756
980.9364481276853280.1271037446293440.063551872314672
990.9329778885908070.1340442228183860.067022111409193
1000.9173365462304340.1653269075391310.0826634537695656
1010.89829316333170.2034136733366010.101706836668301
1020.8813895629904970.2372208740190060.118610437009503
1030.892570926890470.2148581462190590.107429073109529
1040.923850564182780.1522988716344380.0761494358172192
1050.9223812776734840.1552374446530320.0776187223265161
1060.9033704685831870.1932590628336270.0966295314168133
1070.8848548682414920.2302902635170160.115145131758508
1080.8801693977777620.2396612044444760.119830602222238
1090.8796348675985160.2407302648029670.120365132401484
1100.9032255540609570.1935488918780860.096774445939043
1110.8933949157284470.2132101685431060.106605084271553
1120.923330193122960.1533396137540810.0766698068770406
1130.9021429525452480.1957140949095030.0978570474547515
1140.8765923549612360.2468152900775290.123407645038764
1150.8469762029181960.3060475941636070.153023797081804
1160.8466477473406690.3067045053186620.153352252659331
1170.8549623914266050.290075217146790.145037608573395
1180.8446589688113860.3106820623772290.155341031188614
1190.8077191387550450.384561722489910.192280861244955
1200.861421152136840.2771576957263200.138578847863160
1210.8342800578682960.3314398842634080.165719942131704
1220.8097727134829670.3804545730340660.190227286517033
1230.7996999638079390.4006000723841230.200300036192061
1240.7586675696704620.4826648606590750.241332430329538
1250.7585078826617580.4829842346764840.241492117338242
1260.7399295199602950.520140960079410.260070480039705
1270.6869399817418380.6261200365163240.313060018258162
1280.6583975916486630.6832048167026730.341602408351337
1290.675586953089330.648826093821340.32441304691067
1300.6673301440094470.6653397119811060.332669855990553
1310.6066842399992140.7866315200015730.393315760000786
1320.594035835994940.8119283280101190.405964164005059
1330.5644061612960730.8711876774078550.435593838703927
1340.4899443981336520.9798887962673040.510055601866348
1350.4634216768889270.9268433537778540.536578323111073
1360.4569622371714050.913924474342810.543037762828595
1370.3833521541245690.7667043082491380.616647845875431
1380.4461766697664550.892353339532910.553823330233545
1390.7943971110752750.411205777849450.205602888924725
1400.8245348828376440.3509302343247130.175465117162356
1410.7790238156470740.4419523687058520.220976184352926
1420.6942859943340670.6114280113318650.305714005665933
1430.6553363809922170.6893272380155660.344663619007783
1440.5406140261899650.918771947620070.459385973810035
1450.5186404750468310.9627190499063370.481359524953169
1460.6332466981542050.733506603691590.366753301845795
1470.5705968111263920.8588063777472160.429403188873608


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level420.302158273381295NOK
10% type I error level570.410071942446043NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290510479ovo0541jws8oizd/10gs971290510525.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290510479ovo0541jws8oizd/10gs971290510525.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290510479ovo0541jws8oizd/199ud1290510525.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290510479ovo0541jws8oizd/199ud1290510525.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290510479ovo0541jws8oizd/210cy1290510525.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290510479ovo0541jws8oizd/210cy1290510525.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290510479ovo0541jws8oizd/310cy1290510525.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290510479ovo0541jws8oizd/310cy1290510525.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290510479ovo0541jws8oizd/410cy1290510525.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290510479ovo0541jws8oizd/410cy1290510525.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290510479ovo0541jws8oizd/5cat11290510525.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290510479ovo0541jws8oizd/5cat11290510525.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290510479ovo0541jws8oizd/75ja41290510525.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290510479ovo0541jws8oizd/75ja41290510525.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290510479ovo0541jws8oizd/85ja41290510525.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290510479ovo0541jws8oizd/85ja41290510525.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290510479ovo0541jws8oizd/9gs971290510525.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290510479ovo0541jws8oizd/9gs971290510525.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