Home » date » 2010 » Dec » 10 »

Meervoudige regressie: inclusief lineaire 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: Fri, 10 Dec 2010 18:05:35 +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/Dec/10/t1292004445ubyrax6rausrfha.htm/, Retrieved Fri, 10 Dec 2010 19:07:37 +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/Dec/10/t1292004445ubyrax6rausrfha.htm/},
    year = {2010},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2010},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
13 13 14 13 3 2 12 12 8 13 5 1 15 10 12 16 6 0 12 9 7 12 6 3 10 10 10 11 5 3 12 12 7 12 3 1 15 13 16 18 8 3 9 12 11 11 4 1 12 12 14 14 4 4 11 6 6 9 4 0 11 5 16 14 6 3 11 12 11 12 6 2 15 11 16 11 5 4 7 14 12 12 4 3 11 14 7 13 6 1 11 12 13 11 4 1 10 12 11 12 6 2 14 11 15 16 6 3 10 11 7 9 4 1 6 7 9 11 4 1 11 9 7 13 2 2 15 11 14 15 7 3 11 11 15 10 5 4 12 12 7 11 4 2 14 12 15 13 6 1 15 11 17 16 6 2 9 11 15 15 7 2 13 8 14 14 5 4 13 9 14 14 6 2 16 12 8 14 4 3 13 10 8 8 4 3 12 10 14 13 7 3 14 12 14 15 7 4 11 8 8 13 4 2 9 12 11 11 4 2 16 11 16 15 6 4 12 12 10 15 6 3 10 7 8 9 5 4 13 11 14 13 6 2 16 11 16 16 7 5 14 12 13 13 6 3 15 9 5 11 3 1 5 15 8 12 3 1 8 11 10 12 4 1 11 11 8 12 6 2 16 11 13 14 7 3 17 11 15 14 5 9 9 15 6 8 4 0 9 11 12 13 5 0 13 12 16 16 6 2 10 12 5 13 6 2 6 9 15 11 6 3 12 12 12 14 5 1 8 12 8 13 4 2 14 13 13 13 5 0 12 11 14 13 5 5 11 9 12 12 4 2 16 9 16 16 6 4 8 11 10 15 2 3 15 11 15 15 8 0 7 12 8 12 3 0 16 12 16 14 6 4 14 9 19 12 6 1 16 11 etc...
 
Output produced by software:

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


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


Multiple Linear Regression - Estimated Regression Equation
Popularity[t] = + 0.0422788742601457 + 0.107901800776091FindingFriends[t] + 0.211040385215400KnowingPeople[t] + 0.359974774820001Liked[t] + 0.606491671344046Celebrity[t] + 0.212457917682306SumFriends[t] -0.000685171025765t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)0.04227887426014571.4285840.02960.976430.488215
FindingFriends0.1079018007760910.0962341.12120.2639870.131993
KnowingPeople0.2110403852154000.0638723.30410.0011930.000597
Liked0.3599747748200010.0970993.70730.0002950.000147
Celebrity0.6064916713440460.1559243.88970.0001517.5e-05
SumFriends0.2124579176823060.1204221.76430.0797330.039867
t-0.0006851710257650.003797-0.18040.8570550.428527


Multiple Linear Regression - Regression Statistics
Multiple R0.713839592799361
R-squared0.509566964247958
Adjusted R-squared0.489817982942506
F-TEST (value)25.8021898125601
F-TEST (DF numerator)6
F-TEST (DF denominator)149
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.09754558153579
Sum Squared Residuals655.55492252643


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11311.32294542839591.67705457160413
21210.94864157030741.05135842969255
31513.05027241671281.94972758328717
41211.08395817260090.916041827399105
51010.8578295118334-0.857829511833381
6129.16190238348092.8380976165191
71516.7857053211747-1.78570532117466
8910.2512104788150-1.25121047881501
91212.6009445409424-0.600944540942367
10117.614819938707633.38518006129237
111113.2668677888948-2.26686778889479
121112.0338858299024-1.03388582990235
131512.43895017337812.56104982662194
14711.4588340496126-4.45883404961262
151111.5509892346533-0.550989234653334
161110.66780988103970.332190118960308
171012.0304599747735-2.03045997477353
181414.4183915607956-0.418391560795577
19108.57166070625391.42833929374609
2069.28139865219458-3.28139865219458
21118.793860436924412.20613956307559
221514.45112738800120.548872611998838
231111.861083303085-0.861083303085009
24129.608544119223482.39145588077652
251413.01665700456670.983342995433302
261514.62253304533790.37746695466205
27914.4462840004054-5.44628400040543
281312.76281075969250.237189240307485
291313.0516032254223-0.0516032254222731
301611.10785572042664.8921442795734
31138.731518298928654.26848170107135
321213.6164243273274-1.61642432732742
331414.7639502251761-0.763950225176144
341110.10107514071690.89892485928313
35910.4451687788017-1.44516877880166
361614.46958201040951.53041798959049
371213.0980984111851-1.09809841118513
38109.581941063266370.418058936733627
391312.90058034189680.0994196581031959
401615.64576569015280.354234309847196
411413.00852933308830.991470666911728
42158.031475278974296.96852472102571
4359.67129684307127-4.67129684307127
44810.2675769107160-2.26757691071598
451111.2702522296298-0.270252229629817
461613.86366812334742.13633187665260
471714.34682788615822.65317211384182
4898.199924871893380.80007512810662
49911.4402403544997-2.4402403544997
501314.5029503562803-1.50295035628028
511011.1008966234251-1.10089662342512
52612.3794182702674-6.37941827026738
531212.1178341636750-0.117834163675035
54810.5189789233059-2.51897892330593
551411.86297331511272.13702668488731
561212.9198145161617-0.919814516161673
571110.67740477394200.322595226058038
581614.59867942111051.40132057888950
59810.5491561624660-2.54915616246603
601514.60524919253460.394750807465382
6179.12280044459692-2.12280044459692
621614.19969458969571.80030541030429
631413.15110186930100.848898130699046
641613.39094269821042.60905730178963
65910.4370886011521-1.43708860115210
661412.17245046841781.82754953158221
671113.2652787997115-2.26527879971149
681310.33240512257162.66759487742844
691513.20180246204921.79819753795084
7055.78687670633618-0.78687670633618
711512.90953695077522.09046304922480
721312.59325527762780.406744722372182
731112.4225623102152-1.42256231021516
741114.2019052867592-3.20190528675919
751212.770847449127-0.770847449126987
761213.4066291176173-1.40662911761730
771212.3363389159882-0.336338915988176
781211.94507913068660.0549208693134415
791410.86182442248183.13817557751819
8067.93369289619485-1.93369289619485
8179.71700622789257-2.71700622789257
821412.39796757692001.60203242308003
831414.1642325913724-0.164232591372359
841011.1622582431510-1.16225824315104
85139.110608937379283.88939106262072
861212.3021253599872-0.302125359987231
8799.3085421542196-0.308542154219595
881211.91573648117970.0842635188202862
891614.79925468293661.20074531706335
901010.44993449368-0.449934493680007
911413.10071423215540.899285767844572
921013.5856333596382-3.58563335963817
931615.50489550888100.495104491118956
941513.38953282281671.61046717718326
951211.47508108032600.524918919673974
96109.345336355219190.654663644780811
97810.1063714494618-2.10637144946177
9888.69927681792892-0.699276817928916
991112.6492225563186-1.64922255631859
1001312.54602347213730.453976527862662
1011615.60255272511420.397447274885767
1021614.92771380961381.07228619038624
1031415.40097191064-1.40097191064001
104119.029303943475261.97069605652474
10547.13116239143005-3.13116239143005
1061414.7316815286915-0.731681528691532
107910.5059486593727-1.50594865937267
1081415.2097347363448-1.20973473634482
109810.2285968715611-2.22859687156112
110810.6596323591557-2.65963235915573
1111111.8622906426285-0.862290642628484
1121213.1319315935648-1.13193159356483
1131111.0555809548939-0.0555809548938764
1141413.25354556248280.746454437517184
1151514.43320228777030.56679771222969
1161613.42025486541522.57974513458479
1171612.89009774211863.10990225788139
1181112.7680356448051-1.76803564480507
1191414.1620573736940-0.162057373694014
1201410.85004260087093.14995739912905
1211211.52969192312360.470308076876418
1221412.51178338870741.48821661129263
123810.8522396851944-2.85223968519437
1241314.0540754016590-1.05407540165897
1251613.94548842985712.05451157014288
1261210.58911644981951.41088355018051
1271615.45355267723600.546447322764025
1281212.7336264712306-0.733626471230597
1291111.4245311098640-0.42453110986404
13045.94852914306801-1.94852914306801
1311616.0881857461798-0.0881857461798333
1321512.62723658375222.37276341624783
1331011.3323168190482-1.33231681904819
1341313.9879527607243-0.98795276072434
1351513.09164011380411.90835988619594
1361210.46137736672631.53862263327370
1371413.61690665908950.383093340910459
138710.3377021193723-3.33770211937232
1391913.87095497495185.1290450250482
1401212.9018752063590-0.901875206359016
1411211.82733240732920.172667592670824
1421313.2978843018391-0.297884301839101
1431512.37924950240062.62075049759937
14488.78114102917261-0.781141029172615
1451210.87870913039211.12129086960788
1461010.7202088738558-0.72020887385583
147811.2092665463915-3.20926654639153
1481014.6134096734128-4.6134096734128
1491513.81972499199581.18027500800424
1501614.01836444534571.98163555465434
1511313.2207100056067-0.220710005606677
1521615.04097211546320.959027884536796
15399.7693949660099-0.769394966009893
1541413.01175265236690.988247347633058
1551413.09849948113500.901500518865017
1561210.12130226567991.87869773432008


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.07692496860885930.1538499372177190.92307503139114
110.1134261846456910.2268523692913810.886573815354309
120.07023918137234680.1404783627446940.929760818627653
130.5635850634871470.8728298730257060.436414936512853
140.7293682488474530.5412635023050950.270631751152547
150.6594341301515930.6811317396968150.340565869848407
160.5690355740252440.8619288519495110.430964425974756
170.4826367165130750.965273433026150.517363283486925
180.4618848339404020.9237696678808040.538115166059598
190.4041557087083480.8083114174166960.595844291291652
200.5311432578409780.9377134843180440.468856742159022
210.5484347134001610.9031305731996790.451565286599839
220.5887859189617690.8224281620764620.411214081038231
230.5265389333737260.9469221332525490.473461066626274
240.5412073328098780.9175853343802430.458792667190122
250.5161478838346270.9677042323307450.483852116165373
260.4565707644092870.9131415288185730.543429235590713
270.6806815212940780.6386369574118440.319318478705922
280.633865654511010.7322686909779810.366134345488991
290.5782731664335210.8434536671329570.421726833566479
300.7308293553545670.5383412892908660.269170644645433
310.811762300269920.3764753994601590.188237699730080
320.7765869404986920.4468261190026160.223413059501308
330.7302616835211930.5394766329576150.269738316478807
340.6956037175886390.6087925648227220.304396282411361
350.6915790991498640.6168418017002720.308420900850136
360.6882884924933930.6234230150132140.311711507506607
370.6613007652821610.6773984694356790.338699234717839
380.6124188600630750.775162279873850.387581139936925
390.5631665730438470.8736668539123070.436833426956153
400.5200273545887860.9599452908224270.479972645411214
410.4811426982962690.9622853965925380.518857301703731
420.7700093333501570.4599813332996870.229990666649843
430.951019055593290.09796188881342170.0489809444067109
440.955249410734230.08950117853154030.0447505892657701
450.9418382040571460.1163235918857080.0581617959428539
460.9496832637702280.1006334724595450.0503167362297724
470.9492678606355030.1014642787289940.0507321393644971
480.938552443179280.1228951136414420.0614475568207209
490.9362411462954790.1275177074090430.0637588537045214
500.9245190387636730.1509619224726530.0754809612363267
510.9170678987264570.1658642025470860.0829321012735431
520.9868847552198670.02623048956026660.0131152447801333
530.9827642903245570.0344714193508850.0172357096754425
540.9864550173932670.02708996521346590.0135449826067330
550.9911568633768920.01768627324621610.00884313662310807
560.9883553364110870.02328932717782550.0116446635889127
570.9843220831682630.03135583366347370.0156779168317368
580.982507290276160.03498541944767820.0174927097238391
590.987983381668410.02403323666317840.0120166183315892
600.9870721944602960.02585561107940810.0129278055397041
610.986882320313710.02623535937258170.0131176796862908
620.9874568802259940.02508623954801240.0125431197740062
630.9860317967296630.02793640654067390.0139682032703370
640.988951014972470.02209797005506120.0110489850275306
650.9875936759663760.0248126480672470.0124063240336235
660.9870142911239160.02597141775216710.0129857088760836
670.9873879481012940.02522410379741170.0126120518987058
680.9900036574416510.01999268511669720.0099963425583486
690.9894659383065170.02106812338696520.0105340616934826
700.98627270321580.02745459356840060.0137272967842003
710.9868492462485840.02630150750283130.0131507537514156
720.9826174739897870.03476505202042520.0173825260102126
730.9794143018966970.04117139620660700.0205856981033035
740.9856785386577070.02864292268458630.0143214613422931
750.9811286026058130.0377427947883740.018871397394187
760.9777863517477420.04442729650451680.0222136482522584
770.9710438977505170.05791220449896620.0289561022494831
780.9622372636531050.075525472693790.037762736346895
790.9760279396759340.04794412064813210.0239720603240660
800.9739964704912190.05200705901756230.0260035295087812
810.9768064986695160.0463870026609670.0231935013304835
820.9763992402814360.04720151943712820.0236007597185641
830.9688380902935020.06232381941299670.0311619097064984
840.9615533860569010.07689322788619770.0384466139430989
850.9879561466513130.02408770669737310.0120438533486866
860.9837721628820180.03245567423596390.0162278371179820
870.9784931021661360.04301379566772810.0215068978338641
880.9723042145596550.05539157088068980.0276957854403449
890.9674070483237280.06518590335254390.0325929516762719
900.9583653478111570.0832693043776860.041634652188843
910.9519786628746770.09604267425064670.0480213371253233
920.9696098375768240.06078032484635250.0303901624231762
930.961216439845320.07756712030935830.0387835601546791
940.9579141407501170.08417171849976680.0420858592498834
950.9487184900386740.1025630199226510.0512815099613255
960.9386645771574520.1226708456850970.0613354228425485
970.9316859556401470.1366280887197070.0683140443598535
980.9155028261900570.1689943476198870.0844971738099434
990.9062081240379520.1875837519240960.093791875962048
1000.8885525459082630.2228949081834750.111447454091737
1010.8643145281185220.2713709437629550.135685471881478
1020.8463736043813710.3072527912372570.153626395618629
1030.8462474270166880.3075051459666240.153752572983312
1040.8974300541036970.2051398917926050.102569945896302
1050.8940705346918860.2118589306162280.105929465308114
1060.8685758159532680.2628483680934640.131424184046732
1070.8425842086713410.3148315826573170.157415791328659
1080.8309491366127410.3381017267745170.169050863387259
1090.8214704096290040.3570591807419920.178529590370996
1100.8445333362456180.3109333275087650.155466663754382
1110.8316613806925790.3366772386148430.168338619307421
1120.8850294845185340.2299410309629320.114970515481466
1130.8558817441202440.2882365117595120.144118255879756
1140.8295892906192830.3408214187614340.170410709380717
1150.7935467225356820.4129065549286360.206453277464318
1160.78834518010480.42330963979040.2116548198952
1170.7994379373184680.4011241253630640.200562062681532
1180.7925790791376570.4148418417246860.207420920862343
1190.7488486103157450.5023027793685090.251151389684255
1200.8076365640066850.3847268719866290.192363435993315
1210.774588829036060.4508223419278810.225411170963941
1220.7480182638965520.5039634722068950.251981736103448
1230.7404483904731040.5191032190537930.259551609526896
1240.694444692867750.6111106142645010.305555307132251
1250.693204855910710.613590288178580.30679514408929
1260.6853702160576840.6292595678846330.314629783942316
1270.6249614921181920.7500770157636160.375038507881808
1280.581352241282170.8372955174356610.418647758717830
1290.5950878629380560.8098242741238880.404912137061944
1300.6008667505203330.7982664989593340.399133249479667
1310.5376882095870140.9246235808259710.462311790412986
1320.5067543890746480.9864912218507040.493245610925352
1330.4886496641023520.9772993282047040.511350335897648
1340.4145809668421540.8291619336843090.585419033157846
1350.374277376096420.748554752192840.62572262390358
1360.3661850577883080.7323701155766170.633814942211692
1370.2939449410192530.5878898820385070.706055058980747
1380.3695836891537750.739167378307550.630416310846225
1390.7606529119281990.4786941761436020.239347088071801
1400.7422628616664880.5154742766670250.257737138333512
1410.6922436388581410.6155127222837190.307756361141860
1420.6051016132873180.7897967734253630.394898386712682
1430.5325656707997970.9348686584004070.467434329200204
1440.4073763768065610.8147527536131230.592623623193439
1450.4678453431590320.9356906863180630.532154656840968
1460.7212550471361290.5574899057277420.278744952863871


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level310.226277372262774NOK
10% type I error level450.328467153284672NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/10/t1292004445ubyrax6rausrfha/10a53h1292004313.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1292004445ubyrax6rausrfha/10a53h1292004313.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1292004445ubyrax6rausrfha/13mo61292004313.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1292004445ubyrax6rausrfha/13mo61292004313.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1292004445ubyrax6rausrfha/2ed591292004313.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1292004445ubyrax6rausrfha/2ed591292004313.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1292004445ubyrax6rausrfha/3ed591292004313.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1292004445ubyrax6rausrfha/3ed591292004313.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1292004445ubyrax6rausrfha/4ed591292004313.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1292004445ubyrax6rausrfha/4ed591292004313.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1292004445ubyrax6rausrfha/57m4c1292004313.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1292004445ubyrax6rausrfha/57m4c1292004313.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1292004445ubyrax6rausrfha/67m4c1292004313.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1292004445ubyrax6rausrfha/67m4c1292004313.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1292004445ubyrax6rausrfha/7zdlw1292004313.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1292004445ubyrax6rausrfha/7zdlw1292004313.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1292004445ubyrax6rausrfha/8zdlw1292004313.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1292004445ubyrax6rausrfha/8zdlw1292004313.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1292004445ubyrax6rausrfha/9a53h1292004313.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1292004445ubyrax6rausrfha/9a53h1292004313.ps (open in new window)


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





Copyright

Creative Commons License

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

Software written by Ed van Stee & Patrick Wessa


Disclaimer

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


Privacy Policy

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

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

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

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

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

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

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

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

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


FreeStatistics.org is powered by