Home » date » 2010 » Dec » 14 »

WS 10 - MR: Parental Criticism

*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, 14 Dec 2010 15:58:01 +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/14/t1292342192zhf8z80kzw7c7z2.htm/, Retrieved Tue, 14 Dec 2010 16:56:35 +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/14/t1292342192zhf8z80kzw7c7z2.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 25 11 7 8 25 23 0 17 6 17 8 30 25 0 18 8 12 9 22 19 0 16 10 12 7 22 29 0 20 10 11 4 25 25 0 16 11 11 11 23 21 0 18 16 12 7 17 22 0 17 11 13 7 21 25 0 30 12 16 10 19 18 0 23 8 11 10 15 22 0 18 12 10 8 16 15 0 21 9 9 9 22 20 0 31 14 17 11 23 20 0 27 15 11 9 23 21 0 21 9 14 13 19 21 0 16 8 15 9 23 24 0 20 9 15 6 25 24 0 17 9 13 6 22 23 0 25 16 18 16 26 24 0 26 11 18 5 29 18 0 25 8 12 7 32 25 0 17 9 17 9 25 21 0 32 12 18 12 28 22 0 22 9 14 9 25 23 0 17 9 16 5 25 23 0 20 14 14 10 18 24 0 29 10 12 8 25 23 0 23 14 17 7 25 21 0 20 10 12 8 20 28 0 11 6 6 4 15 16 0 26 13 12 8 24 29 0 22 10 12 8 26 27 0 14 15 13 8 14 16 0 19 12 14 7 24 28 0 20 11 11 8 25 25 0 28 8 12 7 20 22 0 19 9 9 7 21 23 0 30 9 15 9 27 26 0 29 15 18 11 23 23 0 26 9 15 6 25 25 0 23 10 12 8 20 21 0 21 12 14 9 22 24 0 28 11 13 6 25 22 0 23 14 13 10 25 27 0 18 6 11 8 17 26 0 20 8 16 10 25 24 0 21 10 11 5 26 24 0 28 12 16 14 27 22 0 10 5 8 6 19 24 0 22 10 15 6 22 20 0 31 10 21 12 32 26 0 29 13 18 12 21 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 time8 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
PC[t] = + 2.61515355647915 -0.186727876789125Gender[t] + 0.0419567686003162CM[t] + 0.115537660006242D[t] + 0.416737645843195PE[t] + 0.00686726142762619PS[t] -0.0890820950933585O[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.615153556479151.4511091.80220.0734990.03675
Gender-0.1867278767891250.379455-0.49210.6233620.311681
CM0.04195676860031620.0387031.08410.2800460.140023
D0.1155376600062420.0703191.6430.102440.05122
PE0.4167376458431950.0552117.548100
PS0.006867261427626190.0511580.13420.8933940.446697
O-0.08908209509335850.050809-1.75330.081570.040785


Multiple Linear Regression - Regression Statistics
Multiple R0.627923982678522
R-squared0.394288528022856
Adjusted R-squared0.370378864655337
F-TEST (value)16.4907603240661
F-TEST (DF numerator)6
F-TEST (DF denominator)152
p-value1.37667655053519e-14
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.14801385679095
Sum Squared Residuals701.322456402819


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
185.974943901001482.02505609899852
289.0851500275511-1.0851500275511
397.754048366087071.24595163391293
477.01038919796534-0.0103891979653377
547.13840879117972-3.13840879117972
6117.428713234302883.57128676569712
778.3767670537188-1.3767670537188
877.9340823913609-0.934082391360898
91010.4551111234991-0.455111123499092
10107.2317774479722.768222552028
1187.697848526233330.302151473766673
1296.656161299271322.34383870072868
131110.99418571347890.00581428652112604
1498.352388328931320.647611671068675
15138.630165649111064.36983435088894
1698.481804552376860.518195447623143
1768.77890380963962-2.77890380963962
1867.88803852296276-1.88803852296276
191611.05453147164214.9454685283579
20511.0738942950542-6.07389429505424
2177.5819257900054-0.581925790005396
2299.75375508080513-0.753755080805132
231211.07797692486130.922023075138685
2498.535161796090410.464838203909588
2559.15885324477522-4.15885324477522
26108.891783633834251.10821636616575
2788.11092154461248-0.110921544612478
28710.5831839924382-3.58318399243824
2987.253563844604710.746436155395291
3044.9480252460999-0.9480252460999
3187.790304386842480.209695613157522
3287.467763045464460.532236954535543
3389.02403075143176-1.02403075143176
3478.30362673341377-1.30362673341377
3587.253946451185960.746053548814037
3677.8926352439549-0.892635243954906
3776.298134215362990.701865784637014
3899.03404182831131-0.0340418283113137
391111.1753011968476-0.175301196847603
4068.94156232614815-2.94156232614815
4188.00300881605917-0.0030088160591673
4298.730134128132590.269865871867416
4368.69032217695496-2.69032217695496
44108.381740838505311.61825916149469
4586.448324427439751.55167557256025
46109.080103795476570.919896204523431
4757.27631491630102-2.27631491630102
481410.0698072973463.93019270265396
4964.938818394143371.06118160585663
5069.31408160293704-3.31408160293704
511211.72629843911520.27370156088483
521211.10865554416660.891344455833416
5388.5422193606335-0.54221936063351
54109.273823537871630.72617646212837
551011.1241748466211-1.12417484662113
56108.730147756908951.26985224309105
5758.64622613371884-3.64622613371884
5877.19713852467784-0.197138524677844
59108.873790879628961.12620912037104
60119.81302045366961.1869795463304
6177.48932643166448-0.489326431664481
62129.367687114285722.63231288571428
631110.70007255008810.299927449911931
64115.170153994918925.82984600508108
6557.63459473783522-2.63459473783522
66810.1146303036405-2.11463030364055
6746.23872033192373-2.23872033192373
6878.16574424984648-1.16574424984648
69119.469178476495051.53082152350495
7064.579525091811551.42047490818845
7146.34929229313294-2.34929229313294
7287.157997094664980.842002905335022
7398.188157050704810.81184294929519
7488.15286468443642-0.152864684436425
75118.788042684298872.21195731570113
7687.566304730140210.433695269859793
7746.03612446527292-2.03612446527292
7868.22205278674204-2.22205278674204
7999.16056196108776-0.160561961087758
80138.855892120892984.14410787910702
8198.152820348693150.847179651306848
82109.750717711558720.249282288441275
832014.49473828225745.50526171774264
841110.28091617728280.719083822717247
8568.31206228656863-2.31206228656863
86910.5193140313963-1.51931403139628
8777.44081256092977-0.440812560929767
8898.237757922321320.762242077678682
89108.652534114226121.34746588577388
9097.06590935786871.9340906421313
91810.3331919629014-2.33319196290141
92711.8476854097607-4.84768540976067
9369.4738612735516-3.4738612735516
941311.44312847781391.55687152218612
9568.0456009288666-2.0456009288666
96109.482530392769050.517469607230946
971612.0175327566123.98246724338801
98127.485709272295844.51429072770416
9986.819065672980211.18093432701979
100128.722255664267453.27774433573255
10187.110946493820080.88905350617992
10247.33623962649857-3.33623962649857
10387.59334911188630.406650888113696
10479.28951178024776-2.28951178024776
1051111.5674065854911-0.567406585491123
10687.588711723369180.41128827663082
10786.723679213378311.27632078662168
10897.759453841198661.24054615880134
10999.17504194956005-0.175041949560051
11065.929704316732040.0702956832679627
11167.2532997565626-1.2532997565626
11267.06702934407751-1.06702934407751
11357.9802553339281-2.98025533392809
11478.01491095914508-1.01491095914508
1151010.2700627786816-0.270062778681604
11689.17183484560572-1.17183484560572
11786.719974720161741.28002527983826
11886.938636084263371.06136391573663
11967.26294717962003-1.26294717962003
12045.47156918320888-1.47156918320888
12187.230580412409770.76941958759023
1222012.95359592174717.0464040782529
12368.1053272499592-2.1053272499592
12444.31461513263361-0.314615132633609
12597.120143332998971.87985666700103
12667.90932780834303-1.90932780834303
12796.046382253344842.95361774665516
12856.6690738500084-1.66907385000839
12956.20714729321226-1.20714729321226
13087.250610359792070.749389640207929
13187.997724680699110.00227531930088638
13266.37882822539689-0.378828225396891
13367.92614042018923-1.92614042018923
13486.353998916730881.64600108326912
13588.2842310114041-0.284231011404103
13656.07012116393445-1.07012116393445
13779.24760936016835-2.24760936016835
13886.00050951649891.99949048350109
13977.6278520805859-0.627852080585899
14088.9499291072194-0.949929107219393
14156.18914230707489-1.18914230707489
142106.588553249886823.41144675011318
14399.3291752208506-0.329175220850604
14477.51918168200728-0.519181682007283
14567.12714654902116-1.12714654902116
146107.149037172704952.85096282729505
14767.99235466055498-1.99235466055498
148116.36763028533124.63236971466879
14966.60802924033152-0.60802924033152
15099.3590462916004-0.359046291600403
15146.80358364085604-2.80358364085604
15276.773684239757360.226315760242644
15389.71833959393222-1.71833959393222
15456.6074563306348-1.60745633063479
15587.526734166172190.473265833827812
1561011.5747868653077-1.57478686530767
15797.073085983803211.92691401619679
15855.9659884490322-0.965988449032196
15987.831700536883830.168299463116175


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.7315093312713650.536981337457270.268490668728635
110.7222510821600550.555497835679890.277748917839945
120.6011988494564430.7976023010871140.398801150543557
130.5423722938551220.9152554122897560.457627706144878
140.4304784927086220.8609569854172450.569521507291378
150.6051728091644360.7896543816711280.394827190835564
160.5058784263296180.9882431473407640.494121573670382
170.5405677193260420.9188645613479150.459432280673958
180.5380500884448410.9238998231103180.461949911555159
190.9103805598026380.1792388803947250.0896194401973624
200.982697535763350.03460492847330080.0173024642366504
210.9732929468617260.05341410627654720.0267070531382736
220.9609119470164840.07817610596703210.0390880529835161
230.94943334966860.1011333006628010.0505666503314006
240.9294088767457240.1411822465085510.0705911232542757
250.951123583063770.09775283387246030.0488764169362301
260.9328760896805520.1342478206388960.0671239103194481
270.9134221718568980.1731556562862040.086577828143102
280.9266768932070950.146646213585810.0733231067929051
290.9051879659175780.1896240681648450.0948120340824223
300.8889414825939870.2221170348120270.111058517406013
310.865801738849250.26839652230150.13419826115075
320.830712284354480.3385754312910410.16928771564552
330.7950244909997770.4099510180004450.204975509000223
340.7655473614808630.4689052770382740.234452638519137
350.7231370524769480.5537258950461050.276862947523052
360.7160880451862780.5678239096274430.283911954813722
370.6667849426845160.6664301146309680.333215057315484
380.6134994757167070.7730010485665850.386500524283293
390.5581246536530040.8837506926939920.441875346346996
400.5980562723631990.8038874552736020.401943727636801
410.5444423400170170.9111153199659660.455557659982983
420.4900199151970050.980039830394010.509980084802995
430.5222591476551880.9554817046896250.477740852344812
440.4879697507119530.9759395014239060.512030249288047
450.4488008969134620.8976017938269250.551199103086538
460.430055546131510.860111092263020.56994445386849
470.4313197214723370.8626394429446750.568680278527663
480.5937384052152280.8125231895695440.406261594784772
490.55414714605910.89170570788180.4458528539409
500.5995341425952420.8009317148095160.400465857404758
510.5677766838799090.8644466322401820.432223316120091
520.5245708916191250.950858216761750.475429108380875
530.477605211448420.955210422896840.52239478855158
540.4387861227480060.8775722454960120.561213877251994
550.3978287231909770.7956574463819540.602171276809023
560.3747236774044460.7494473548088920.625276322595554
570.4646185861040590.9292371722081170.535381413895941
580.4156474213672820.8312948427345640.584352578632718
590.3923117692900390.7846235385800780.607688230709961
600.3610733561363330.7221467122726650.638926643863667
610.318455601472540.636911202945080.68154439852746
620.3220791804209620.6441583608419240.677920819579038
630.3263265413996480.6526530827992960.673673458600352
640.6386815064735390.7226369870529210.361318493526461
650.6577954791999470.6844090416001060.342204520800053
660.6465065902463360.7069868195073270.353493409753664
670.6633394839472960.6733210321054080.336660516052704
680.629289550724410.7414208985511810.370710449275591
690.6120732900088390.7758534199823230.387926709991161
700.5874364795560480.8251270408879040.412563520443952
710.5982898496090130.8034203007819740.401710150390987
720.5584982566516970.8830034866966050.441501743348303
730.5196956300604560.9606087398790870.480304369939544
740.4748088823873470.9496177647746950.525191117612653
750.4826097746730430.9652195493460870.517390225326957
760.440723741585620.881447483171240.55927625841438
770.4326986574318030.8653973148636060.567301342568197
780.4310992402250430.8621984804500870.568900759774957
790.3910395549377280.7820791098754560.608960445062272
800.5110096377946390.9779807244107220.488990362205361
810.4701041269895920.9402082539791850.529895873010408
820.4240789121578440.8481578243156880.575921087842156
830.6808373478282730.6383253043434540.319162652171727
840.6467566766199090.7064866467601830.353243323380091
850.6432997615890710.7134004768218580.356700238410929
860.6162413088958930.7675173822082140.383758691104107
870.5713276741729380.8573446516541230.428672325827062
880.5359285385838220.9281429228323570.464071461416178
890.5147388525926850.970522294814630.485261147407315
900.5264336518001670.9471326963996670.473566348199833
910.5163500095710110.9672999808579780.483649990428989
920.7239873559985040.5520252880029920.276012644001496
930.7852420667759270.4295158664481460.214757933224073
940.758001885518150.4839962289637010.241998114481851
950.7916464559694220.4167070880611560.208353544030578
960.7878619857475340.4242760285049320.212138014252466
970.794293012298910.411413975402180.20570698770109
980.8585704736748810.2828590526502370.141429526325119
990.8529538221373150.294092355725370.147046177862685
1000.8801764134189140.2396471731621720.119823586581086
1010.8669142969636880.2661714060726250.133085703036312
1020.943520088839830.1129598223203410.0564799111601703
1030.9360334880349720.1279330239300560.0639665119650282
1040.952328444467610.09534311106477970.0476715555323899
1050.9401905665157710.1196188669684570.0598094334842287
1060.9286952354532730.1426095290934530.0713047645467266
1070.9130135795636420.1739728408727160.086986420436358
1080.8958023928015540.2083952143968910.104197607198445
1090.8734735686302380.2530528627395240.126526431369762
1100.8476523372615660.3046953254768670.152347662738434
1110.8280300438365830.3439399123268350.171969956163418
1120.8081459445425120.3837081109149770.191854055457488
1130.8165965136564160.3668069726871680.183403486343584
1140.7986017526129930.4027964947740140.201398247387007
1150.7709684069364990.4580631861270010.229031593063501
1160.7312103099792540.5375793800414920.268789690020746
1170.6930706793926120.6138586412147750.306929320607388
1180.6587424841626710.6825150316746590.341257515837329
1190.6663937463880450.6672125072239090.333606253611954
1200.6402137832791630.7195724334416740.359786216720837
1210.5901214962574180.8197570074851640.409878503742582
1220.9598552509492530.0802894981014940.040144749050747
1230.9573670963223640.08526580735527160.0426329036776358
1240.9573918956693510.08521620866129730.0426081043306487
1250.9507790953055040.09844180938899130.0492209046944956
1260.951446256903380.0971074861932410.0485537430966205
1270.962915262674570.07416947465085890.0370847373254294
1280.9565464832840210.08690703343195810.0434535167159791
1290.9912948573391880.01741028532162370.00870514266081184
1300.9897545406151980.0204909187696050.0102454593848025
1310.9844697125409780.0310605749180430.0155302874590215
1320.9769140711322330.04617185773553470.0230859288677673
1330.9667489783044420.06650204339111560.0332510216955578
1340.9509923306289860.09801533874202770.0490076693710138
1350.9306954108035730.1386091783928550.0693045891964274
1360.9515971977001420.09680560459971690.0484028022998584
1370.9420426197112180.1159147605775650.0579573802887823
1380.9181549789886720.1636900420226560.0818450210113282
1390.8794740969724020.2410518060551960.120525903027598
1400.8292144600089770.3415710799820460.170785539991023
1410.7890496303498950.421900739300210.210950369650105
1420.7668300171259390.4663399657481220.233169982874061
1430.6928166230637830.6143667538724340.307183376936217
1440.5940401541483040.8119196917033920.405959845851696
1450.4993660931463760.9987321862927510.500633906853624
1460.4700577602375610.9401155204751230.529942239762439
1470.3538617285872680.7077234571745360.646138271412732
1480.6976773757288750.604645248542250.302322624271125
1490.5878066781617130.8243866436765740.412193321838287


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level50.0357142857142857OK
10% type I error level190.135714285714286NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342192zhf8z80kzw7c7z2/1094wx1292342268.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342192zhf8z80kzw7c7z2/1094wx1292342268.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342192zhf8z80kzw7c7z2/12lz41292342268.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342192zhf8z80kzw7c7z2/12lz41292342268.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342192zhf8z80kzw7c7z2/22lz41292342268.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342192zhf8z80kzw7c7z2/22lz41292342268.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342192zhf8z80kzw7c7z2/3duy71292342268.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342192zhf8z80kzw7c7z2/3duy71292342268.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342192zhf8z80kzw7c7z2/4duy71292342268.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342192zhf8z80kzw7c7z2/4duy71292342268.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342192zhf8z80kzw7c7z2/5duy71292342268.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342192zhf8z80kzw7c7z2/5duy71292342268.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342192zhf8z80kzw7c7z2/654xs1292342268.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342192zhf8z80kzw7c7z2/654xs1292342268.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342192zhf8z80kzw7c7z2/7gvec1292342268.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342192zhf8z80kzw7c7z2/7gvec1292342268.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342192zhf8z80kzw7c7z2/8gvec1292342268.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342192zhf8z80kzw7c7z2/8gvec1292342268.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342192zhf8z80kzw7c7z2/9gvec1292342268.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342192zhf8z80kzw7c7z2/9gvec1292342268.ps (open in new window)


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