Home » date » 2010 » Nov » 22 »

WS7 verschillende interactie effecten

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Mon, 22 Nov 2010 22:30:04 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Nov/22/t1290465009md9labtbg5em06u.htm/, Retrieved Mon, 22 Nov 2010 23:30:09 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Nov/22/t1290465009md9labtbg5em06u.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 «
0 41 25 0 15 0 9 0 3 0 0 38 25 0 15 0 9 0 4 0 0 37 19 0 14 0 9 0 4 0 1 36 18 18 10 10 14 14 2 2 1 42 18 18 10 10 8 8 4 4 0 44 23 0 9 0 14 0 4 0 0 40 23 0 18 0 15 0 3 0 0 43 25 0 14 0 9 0 4 0 0 40 23 0 11 0 11 0 4 0 0 45 24 0 11 0 14 0 4 0 1 47 32 32 9 9 14 14 4 4 0 45 30 0 17 0 6 0 5 0 0 45 32 0 21 0 10 0 4 0 1 40 24 24 16 16 9 9 4 4 0 49 17 0 14 0 14 0 4 0 1 48 30 30 24 24 8 8 5 5 0 44 25 0 7 0 11 0 4 0 1 29 25 25 9 9 10 10 4 4 0 42 26 0 18 0 16 0 4 0 0 45 23 0 11 0 11 0 5 0 1 32 25 25 13 13 11 11 5 5 1 32 25 25 13 13 11 11 5 5 0 41 35 0 18 0 7 0 4 0 1 29 19 19 14 14 13 13 2 2 0 38 20 0 12 0 10 0 4 0 0 41 21 0 12 0 9 0 4 0 1 38 21 21 9 9 9 9 4 4 1 24 23 23 11 11 15 15 3 3 1 34 24 24 8 8 13 13 2 2 0 38 23 0 5 0 16 0 2 0 1 37 19 19 10 10 12 12 3 3 0 46 17 0 11 0 6 0 5 0 1 48 27 27 15 15 4 4 5 5 0 42 27 0 16 0 12 0 4 0 0 46 25 0 12 0 10 0 4 0 1 43 18 18 14 14 14 14 5 5 0 38 22 0 13 0 9 0 4 0 1 39 26 26 10 10 10 10 4 4 0 34 26 0 18 0 14 0 4 0 0 39 23 0 17 0 14 0 4 0 0 35 1 etc...
 
Output produced by software:

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


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
Career[t] = + 32.4711075468022 -1.86339575161424G[t] + 0.191031539247891PersonalStandards[t] -0.0540144402593811PeG[t] -0.173665001512474ParentalExpectations[t] + 0.534242117931472PaG[t] -0.248653021388442Doubts[t] + 0.140966318180626DoG[t] + 2.38392162985542LeadershipPreference[t] -1.98395184485659LeaderG[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)32.47110754680224.1933137.743500
G-1.863395751614246.397871-0.29130.7713020.385651
PersonalStandards0.1910315392478910.1444571.32240.1882510.094125
PeG-0.05401444025938110.204208-0.26450.791790.395895
ParentalExpectations-0.1736650015124740.168811-1.02880.3054230.152711
PaG0.5342421179314720.2498072.13860.0342540.017127
Doubts-0.2486530213884420.215297-1.15490.2501450.125072
DoG0.1409663181806260.3003140.46940.6395380.319769
LeadershipPreference2.383921629855420.7187953.31660.0011690.000584
LeaderG-1.983951844856590.949644-2.08920.0385570.019279


Multiple Linear Regression - Regression Statistics
Multiple R0.473114760725264
R-squared0.223837576816124
Adjusted R-squared0.172473887046603
F-TEST (value)4.35789519445598
F-TEST (DF numerator)9
F-TEST (DF denominator)136
p-value5.2233134229529e-05
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation4.80633728614537
Sum Squared Residuals3141.71942271400


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
14139.55580870238271.44419129761735
23841.9397303322381-3.93973033223809
33740.9672060982632-3.96720609826321
43635.97211646625940.0278835337406244
54237.41817625550394.58182374449607
64441.35639215587492.64360784412506
74037.16083249101882.83916750898119
84342.11339533375060.88660466624944
94041.7550212170153-1.75502121701532
104541.20009369209793.79990630790212
114738.32971830567728.67028169432282
124545.6774387194733-0.677438719473339
134541.986308076513.01369192348996
144040.2960548447412-0.296054844741168
154939.34187791282529.65812208717478
164844.51043085823093.48956914176914
174442.8317443015611.16825569843900
182937.8013454255889-8.80134542558888
194239.86919571722952.13080428277054
204544.13894284687070.861057153129264
213239.5359369730559-7.53593697305588
223239.5359369730559-7.53593697305588
234143.8263567629565-2.82635676295646
242937.6591287341317-8.6591287341317
253841.2569146191476-3.25691461914761
264141.6965991797839-0.696599179783944
273837.36096373284260.639036267157348
282437.3100621594119-13.3100621594119
293436.1807515305603-2.18075153056026
303836.78590285943711.21409714056288
313736.72447675666230.275523243337651
324644.23601871832561.76398128167440
334841.28493232632566.71506767367439
344241.40216934505610.59783065494393
354642.21207231538713.78792768461293
364338.61433428693194.38566571306814
373841.7139657175194-3.71396571751936
383938.29893964099640.701060359003616
393440.3665017600063-6.36650176000635
403939.9670721437751-0.967072143775147
413535.7249452024452-0.724945202445207
424139.22540500745091.77459499254913
434038.41293729343481.58706270656523
444337.23068497596895.76931502403111
453736.37302784006490.626972159935151
464141.7542206619245-0.754220661924494
474642.40310385463503.59689614536504
482637.3576398021583-11.3576398021583
494137.63167400013533.36832599986472
503740.0247040937138-3.02470409371384
513940.7936490601487-1.79364906014868
524444.0694770717708-0.0694770717707643
533936.30516279930482.69483720069517
543640.490284466391-4.49028446639096
553836.87113443793261.12886556206745
563838.4576907341857-0.457690734185748
573841.3563921558749-3.35639215587494
583238.5157613163121-6.51576131631212
593337.8845644133465-4.88456441334646
604637.67251493761528.32748506238478
614242.2696937975276-0.269693797527617
624235.89941075904856.1005892409515
634341.58215677059371.41784322940633
644136.39809271635454.60190728364549
654942.79621067099936.20378932900066
664536.592230220418.40776977959003
673941.8473757746267-2.8473757746267
684538.92246944342576.0775305565743
693137.2760754552999-6.27607545529991
703037.2760754552999-7.27607545529991
714543.05750891627971.94249108372028
724845.42326345330892.5767365466911
732839.3071448373544-11.3071448373544
743537.1024209215856-2.10242092158558
753841.3090142323539-3.30901423235386
763938.27779585623050.722204143769454
774039.05616261172980.943837388270175
783838.4100423924829-0.410042392482929
794240.36570082907381.63429917092617
803634.42405861336241.57594138663755
814947.04939219383771.95060780616228
824142.1370842955111-1.1370842955111
831835.5749691626933-17.5749691626933
843638.5493519480278-2.54935194802778
854239.85524575911082.14475424088924
864140.83304172872850.166958271271491
874341.02562813549461.97437186450541
884639.42239864527536.57760135472467
893738.326821767877-1.32682176787697
903837.98406450553940.0159354944605742
914340.26782477836982.73217522163016
924144.3986399819695-3.39863998196947
933534.7418591131630.258140886837005
943942.831744301561-3.831744301561
954239.83446264175862.16553735824137
963641.1819265992716-5.18192659927164
973538.880181873894-3.88018187389403
983334.821887119412-1.821887119412
993637.7394489776968-1.73944897769678
1004840.60803142643727.39196857356285
1014141.2569146191476-0.256914619147610
1024741.83121717808975.16878282191029
1034138.73406106325062.26593893674945
1043137.5570690162767-6.55706901627673
1053641.2422173639098-5.24221736390976
1064640.79364906014875.20635093985132
1073937.14081976369091.85918023630911
1084441.4242571966352.57574280336504
1094337.35047406715935.64952593284066
1103242.4788924296017-10.4788924296017
1114038.13788385629021.86211614370981
1124039.02296902904410.977030970955874
1134637.47895128750728.52104871249278
1144539.5613305713175.43866942868303
1153942.4836137434452-3.48361374344522
1164443.32272792031280.677272079687243
1173541.2395480814122-6.23954808141219
1183838.5722403546975-0.572240354697498
1193835.66732372030472.33267627969534
1203635.78794911740870.212050882591279
1214238.29989837154853.70010162845148
1223942.3383590175368-3.33835901753677
1234140.74649881028650.253501189713468
1244140.39491203561040.605087964389639
1254737.94704649958939.05295350041073
1263938.48620859695290.513791403047067
1274039.28790924017520.712090759824831
1284440.67749757737883.32250242262119
1294240.97272796719751.02727203280249
1303539.1326432573727-4.13264325737266
1314644.34181905491971.65818094508025
1324337.00669756565425.99330243434577
1334037.7032936022962.29670639770398
1344441.27508171197382.72491828802615
1353738.9989500890685-1.99895008906854
1364638.35615216365777.64384783634233
1374444.1389428468707-0.138942846870735
1383538.7569494699203-3.75694946992027
1393938.17786673430500.822133265694958
1404038.50909700362261.49090299637735
1414239.85524575911082.14475424088924
1423737.6821481806818-0.682148180681815
1432939.1230100143061-10.1230100143061
1443338.1110193317288-5.1110193317288
1453537.0575991390849-2.05759913908494
1464236.13556742322845.86443257677163


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
130.1385971623880210.2771943247760420.861402837611979
140.05457686149449160.1091537229889830.945423138505508
150.3243429905713690.6486859811427380.675657009428631
160.2116165831975290.4232331663950590.78838341680247
170.1444039101419930.2888078202839860.855596089858007
180.1618673755376690.3237347510753380.838132624462331
190.1636082177177230.3272164354354450.836391782282277
200.1067167462529570.2134334925059150.893283253747043
210.6591106890224680.6817786219550650.340889310977532
220.6102881654629730.7794236690740540.389711834537027
230.5339220552849880.9321558894300240.466077944715012
240.6743336334211520.6513327331576950.325666366578848
250.6323062216237720.7353875567524560.367693778376228
260.5579212942317960.8841574115364070.442078705768204
270.4890561775051780.9781123550103550.510943822494822
280.6151985049181220.7696029901637560.384801495081878
290.6056288013030890.7887423973938210.394371198696911
300.5412303803861760.9175392392276470.458769619613824
310.5476264380424940.9047471239150110.452373561957506
320.5105990742170970.9788018515658060.489400925782903
330.4865418879917320.9730837759834630.513458112008268
340.4241775029655080.8483550059310170.575822497034492
350.4029577398349350.805915479669870.597042260165065
360.6628223320643160.6743553358713680.337177667935684
370.6363797582886420.7272404834227170.363620241711358
380.5786926589087370.8426146821825260.421307341091263
390.6794138243806310.6411723512387390.320586175619369
400.6359313710752820.7281372578494350.364068628924718
410.5797496569076530.8405006861846940.420250343092347
420.5300344435831070.9399311128337850.469965556416893
430.5113315936796310.9773368126407370.488668406320369
440.5253276224391850.949344755121630.474672377560815
450.4732100806521980.9464201613043950.526789919347802
460.4183358972051980.8366717944103970.581664102794802
470.3928045549604120.7856091099208250.607195445039588
480.6138369877955490.7723260244089030.386163012204451
490.6002858881972020.7994282236055960.399714111802798
500.5667736792032940.8664526415934130.433226320796706
510.5189371175497220.9621257649005550.481062882450277
520.465375737717210.930751475434420.53462426228279
530.4275304894768550.855060978953710.572469510523145
540.4138415084771740.8276830169543490.586158491522826
550.366829173032840.733658346065680.63317082696716
560.3217576384552910.6435152769105830.678242361544709
570.3106667948610790.6213335897221580.689333205138921
580.3672397691270140.7344795382540280.632760230872986
590.3566722223126530.7133444446253060.643327777687347
600.4779699041089950.955939808217990.522030095891005
610.4270997747616990.8541995495233970.572900225238301
620.4566545159948740.9133090319897480.543345484005126
630.4155052873725660.8310105747451310.584494712627434
640.4649134384868980.9298268769737960.535086561513102
650.5047105870704790.9905788258590420.495289412929521
660.5716605325475440.8566789349049120.428339467452456
670.5405083574789570.9189832850420860.459491642521043
680.5711601919936930.8576796160126140.428839808006307
690.6156440483833650.768711903233270.384355951616635
700.6886498289055630.6227003421888730.311350171094436
710.6624328701102730.6751342597794530.337567129889727
720.6341623112995320.7316753774009360.365837688700468
730.8176958884364670.3646082231270650.182304111563533
740.7860728623670280.4278542752659440.213927137632972
750.7763745957261350.4472508085477290.223625404273865
760.7383096031858420.5233807936283150.261690396814158
770.6983591630440770.6032816739118460.301640836955923
780.6582770517756180.6834458964487640.341722948224382
790.6234254345273440.7531491309453120.376574565472656
800.5925364328341560.8149271343316880.407463567165844
810.579964967284150.8400700654316990.420035032715850
820.5351905336683870.9296189326632260.464809466331613
830.950910465248740.0981790695025190.0490895347512595
840.9406664090258550.1186671819482910.0593335909741454
850.930171640374990.1396567192500190.0698283596250095
860.9131449707169230.1737100585661550.0868550292830775
870.8949078282946580.2101843434106850.105092171705342
880.9171568362610130.1656863274779730.0828431637389866
890.8969019181254210.2061961637491580.103098081874579
900.871013588217580.2579728235648380.128986411782419
910.8481193912995440.3037612174009130.151880608700456
920.8370202210347970.3259595579304060.162979778965203
930.8232554929240530.3534890141518940.176744507075947
940.803735220289360.392529559421280.19626477971064
950.7669739961931530.4660520076136950.233026003806847
960.7739984769710190.4520030460579630.226001523028981
970.7523934302741160.4952131394517680.247606569725884
980.7931666889518020.4136666220963960.206833311048198
990.7947053800488250.4105892399023510.205294619951175
1000.8185124777619550.3629750444760890.181487522238045
1010.7790979798978690.4418040402042630.220902020102131
1020.7891973187454280.4216053625091440.210802681254572
1030.7503196155789450.499360768842110.249680384421055
1040.7869402024722440.4261195950555110.213059797527756
1050.7799834174863470.4400331650273060.220016582513653
1060.8237675148904540.3524649702190920.176232485109546
1070.7837710495099420.4324579009801150.216228950490058
1080.7403243744938050.519351251012390.259675625506195
1090.7311247327111830.5377505345776350.268875267288817
1100.8659611773902490.2680776452195030.134038822609751
1110.830759263132390.3384814737352200.169240736867610
1120.790811413401380.418377173197240.20918858659862
1130.8586807604834720.2826384790330560.141319239516528
1140.8549799677338350.2900400645323290.145020032266165
1150.8226064097148130.3547871805703750.177393590285187
1160.7826953835184740.4346092329630520.217304616481526
1170.8249054287110780.3501891425778440.175094571288922
1180.7722611052709160.4554777894581690.227738894729084
1190.7139602342333190.5720795315333620.286039765766681
1200.6748699396096510.6502601207806980.325130060390349
1210.623569448759810.752861102480380.37643055124019
1220.5792246351151380.8415507297697240.420775364884862
1230.5583923238326020.8832153523347960.441607676167398
1240.5692620572258960.8614758855482070.430737942774104
1250.5472518465760690.9054963068478630.452748153423931
1260.464397396604280.928794793208560.53560260339572
1270.4227853647796190.8455707295592380.577214635220381
1280.3353262984224620.6706525968449230.664673701577538
1290.2443565383271400.4887130766542810.75564346167286
1300.1707642734558460.3415285469116920.829235726544154
1310.1060343739075080.2120687478150160.893965626092492
1320.07183819733074190.1436763946614840.928161802669258
1330.03520121675123030.07040243350246070.96479878324877


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level00OK
10% type I error level20.0165289256198347OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290465009md9labtbg5em06u/10lx4b1290464993.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290465009md9labtbg5em06u/10lx4b1290464993.ps (open in new window)


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


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


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


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290465009md9labtbg5em06u/40fnn1290464993.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290465009md9labtbg5em06u/40fnn1290464993.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290465009md9labtbg5em06u/50fnn1290464993.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290465009md9labtbg5em06u/50fnn1290464993.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290465009md9labtbg5em06u/60fnn1290464993.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290465009md9labtbg5em06u/60fnn1290464993.ps (open in new window)


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


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


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


 
Parameters (Session):
par1 = 3 ; 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