Home » date » 2010 » Dec » 21 »

*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, 21 Dec 2010 11:27:06 +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/21/t1292930786zjpyk17ne9h0fhg.htm/, Retrieved Tue, 21 Dec 2010 12:26:29 +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/21/t1292930786zjpyk17ne9h0fhg.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 «
14 11 23 8 1 6 7 22 24 4 2 5 22 23 24 7 2 20 12 21 21 4 2 12 15 19 21 4 2 11 9 12 19 5 2 12 20 24 12 15 1 11 10 21 21 5 1 9 12 21 25 7 2 13 23 26 27 4 2 9 10 18 21 4 1 14 11 21 27 7 1 12 20 22 20 8 1 18 11 26 16 4 2 9 22 20 26 8 1 15 19 20 24 4 2 12 20 26 25 5 2 12 16 27 25 16 1 12 12 27 27 7 1 15 14 16 23 4 2 11 14 26 22 6 1 13 9 20 10 4 1 10 19 25 25 5 2 17 17 16 18 4 1 13 14 20 21 4 1 17 19 20 20 6 1 15 20 24 18 4 1 13 20 24 25 4 1 17 9 22 28 4 1 21 10 18 27 8 1 12 6 21 20 5 2 12 15 17 20 4 1 15 9 15 20 10 2 8 24 28 27 4 2 15 11 23 23 4 1 16 4 19 23 4 2 9 12 15 22 5 2 13 22 26 26 5 1 11 16 20 21 4 1 9 14 11 17 6 1 15 13 17 27 4 2 9 13 16 16 4 2 15 10 21 26 4 1 14 12 18 17 4 1 8 13 17 24 4 2 11 16 21 23 4 2 14 18 18 20 6 1 14 10 16 10 4 1 12 12 13 21 5 1 15 9 28 25 4 1 11 7 25 28 4 1 11 16 24 25 5 2 9 12 15 20 10 2 8 15 21 20 10 1 13 15 11 27 4 1 12 8 27 26 4 1 24 14 23 19 4 2 11 13 21 26 8 1 11 18 16 20 4 2 16 11 20 22 14 1 12 12 21 19 4 2 18 12 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 time6 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
E/Introjected[t] = + 11.8039719005893 + 0.195575908788545`I/Exp.Stimulation`[t] + 0.137257998942528`E/Ext.Regulation`[t] + 0.0608353917791318Amotivation[t] + 0.774431983252936gender[t] + 0.11210461946675PE[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)11.80397190058933.1700923.72350.0002830.000141
`I/Exp.Stimulation`0.1955759087885450.0752132.60030.0102990.00515
`E/Ext.Regulation`0.1372579989425280.0979681.4010.1633810.081691
Amotivation0.06083539177913180.1292750.47060.6386560.319328
gender0.7744319832529360.7389911.0480.2964380.148219
PE0.112104619466750.1062091.05550.2929850.146492


Multiple Linear Regression - Regression Statistics
Multiple R0.271412626295825
R-squared0.0736648137127972
Adjusted R-squared0.0410473775759239
F-TEST (value)2.2584489290843
F-TEST (DF numerator)5
F-TEST (DF denominator)142
p-value0.0517919950824309
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation4.21458781831377
Sum Squared Residuals2522.31056791559


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11119.6327114335936-8.63271143359357
22218.8199238676863.18007613231404
32323.6176379668528-0.617637966852778
42120.17076175106830.829238248931653
51920.6453848579672-1.64538485796723
61219.3703534185968-7.37035341859679
72420.28269973774473.71730026225528
82118.72969948361722.2703005163828
92121.0144045416426-0.0144045416426038
102622.80933088299733.19066911700274
111819.2293871891718-1.22938718917182
122120.20680802801940.793191971980572
132221.73964832309830.260351676901728
142618.95258198916697.04741801083309
152022.6180342759303-2.61803427593028
162021.9515671094157-1.95156710941575
172622.3452364089263.65476359107405
182721.45769010008935.54230989991071
192720.73869779520826.26130220479178
201620.7243249470637-4.72432494706374
212620.158514987365.84148501263996
222017.07555481414852.92444518585153
232522.71018359747122.28981640252884
241620.0745399343973-4.0745399343973
252020.3480046827263-0.348004682726251
262021.0860877723512-1.08608777235121
272420.66126766076293.33873233923706
282422.07049213122761.92950786877237
292220.77934960924821.22065039075178
301820.07206751101-2.07206751101001
312118.92088369117372.07911630882632
321720.1821133536388-3.18211335363877
331519.363369898568-4.36336989856797
342823.67753450858634.32246549141369
352319.92368833477893.07631166522108
361918.54435662024480.455643379755209
371520.4809597612568-5.48095976125676
382621.98710962272594.01289037727411
392019.84231954456930.157680455430658
401119.6964342315809-8.6964342315809
411720.8535717951118-3.85357179511181
421620.0163615235445-4.0163615235445
432119.91567718388451.08432281611554
441818.3988792941783-0.3988792941783
451720.6660070372177-3.66600703721772
462121.4517906230411-0.451790623041083
471820.7784072440959-2.77840724409592
481617.4953399618705-1.49533996187051
491319.7934790179948-6.7934790179948
502819.24652941775318.75347058224686
512519.26715159700365.73284840299637
522421.22661891537152.77338108462848
531519.9500976249336-4.95009762493361
542120.32291646538010.67708353461994
551120.8066054878362-9.80660548783622
562720.64557156097496.35442843902513
572320.17529295129362.82470704870637
582120.40943261896640.590567381033627
591621.6553776827241-5.65537768272409
602019.94636577576070.0536342242392888
612120.56887346998380.431126530016209
621020.5061131407325-10.5061131407325
631823.7026878880621-5.70268788806208
642020.8042038862059-0.804203886205856
652120.97053381680470.0294661831953035
662419.52550793862724.47449206137281
672619.30736480953236.69263519046773
682321.56574584311631.43425415688367
692221.41690796179010.583092038209885
701320.0619975832776-7.06199758327756
712723.10563833546033.89436166453973
722420.93248826551793.06751173448214
731921.0535394051324-2.05353940513242
741717.7791265364356-0.779126536435641
751621.0127100294523-5.01271002945234
762021.2137796072022-1.21377960720223
77819.5234741167513-11.5234741167513
781620.542846402592-4.542846402592
791720.9408186225142-3.94081862251422
802322.98218211342310.0178178865769025
811820.3837754758496-2.38377547584965
822421.62555360402982.37444639597019
831719.622094019946-2.62209401994596
842019.55874114623370.441258853766283
852221.18386460221930.816135397780691
862219.37612257138582.62387742861418
872019.04493245767180.955067542328159
881820.4400796674035-2.4400796674035
892120.25423304039010.745766959609858
902320.77840724409592.22159275590408
912820.90261912827787.09738087172224
921920.1434551543072-1.14345515430718
932219.79251654925872.20748345074127
941721.1989480539626-4.19894805396263
952521.28589929395363.7141007060464
962220.30000859911641.69999140088359
972119.99431817046281.00568182953717
981520.7904908901205-5.79049089012055
992018.57633040206571.42366959793429
1002520.67353586432664.32646413567339
1012120.03789545335790.962104546642113
1022421.44911002342432.55088997657571
1032321.61619210106111.3838078989389
1042220.64872530964321.35127469035681
1051420.0895796638664-6.0895796638664
1061119.5863232268226-8.58632322682256
1072219.89056534784782.10943465215219
1082220.41641613899521.58358386100481
109620.5432106672397-14.5432106672397
1101517.9415379148539-2.94153791485395
1112621.20027478734644.79972521265358
1122621.26513761570994.73486238429011
1132021.5556558118001-1.55565581180011
1142620.68690118518925.3130988148108
1151519.5958893909141-4.59588939091408
1162520.49105330767974.50894669232033
1172221.18084335664530.81915664335475
1182021.4699841011785-1.46998410117851
1191820.5119238369607-2.51192383696069
1202320.21490795973392.78509204026606
1212219.67098526469372.32901473530632
1222319.9830574941813.01694250581895
1231721.7673428031976-4.76734280319762
1242019.25705805058070.742941949419287
1252120.69768171652050.3023182834795
1262320.56873397099062.43126602900943
1272518.84395732036936.15604267963066
1282518.45740538025386.54259461974618
1292120.33864317975750.66135682024246
1302220.29167687248191.70832312751806
1311819.9498929638108-1.94989296381081
1321820.9845533291512-2.98455332915117
1331821.1531724952364-3.15317249523636
1342121.1260053974684-0.12600539746841
1352117.95756021664293.04243978335713
1362520.60768912737174.39231087262829
1372421.006712596852.99328740314996
1382420.29829046823573.70170953176431
1392821.89430044912586.10569955087416
1402423.05111743691670.948882563083262
1412220.94958543555341.05041456444665
1422219.75779700569142.24220299430856
1432020.1906282681742-0.190628268174174
1442519.67684319830285.32315680169724
1451319.4511677269923-6.45116772699225
1462120.33049252986990.669507470130138
1472320.41135755643852.5886424435615
1481821.7585086825603-3.75850868256032


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.9530700177150750.09385996456984920.0469299822849246
100.9194488014642120.1611023970715750.0805511985357877
110.8681070418022750.2637859163954510.131892958197725
120.8147773785873820.3704452428252370.185222621412619
130.7305509442139770.5388981115720460.269449055786023
140.795175648564020.4096487028719590.20482435143598
150.7268043654072870.5463912691854270.273195634592713
160.6709358854157610.6581282291684770.329064114584239
170.6322904611519260.7354190776961480.367709538848074
180.664028859434250.67194228113150.33597114056575
190.7540255378552990.4919489242894020.245974462144701
200.7637754990508530.4724490018982940.236224500949147
210.7970246341700580.4059507316598830.202975365829942
220.7550487822861970.4899024354276060.244951217713803
230.7086683898300580.5826632203398830.291331610169942
240.6998081495787070.6003837008425870.300191850421293
250.6360131813769970.7279736372460060.363986818623003
260.572687152507550.85462569498490.42731284749245
270.5559628788635750.888074242272850.444037121136425
280.5030390523842830.9939218952314340.496960947615717
290.4387532252288580.8775064504577160.561246774771142
300.4044866097726120.8089732195452230.595513390227388
310.3502793984014110.7005587968028230.649720601598589
320.3289180000357660.6578360000715330.671081999964234
330.3616248052016140.7232496104032280.638375194798386
340.3536735374295730.7073470748591450.646326462570427
350.3221255065610750.644251013122150.677874493438925
360.2712489223737710.5424978447475420.728751077626229
370.3124591281722830.6249182563445660.687540871827717
380.2914018993842680.5828037987685360.708598100615732
390.2442627080979770.4885254161959540.755737291902023
400.4149234031927020.8298468063854050.585076596807298
410.4100285484740260.8200570969480530.589971451525974
420.3887054109728720.7774108219457440.611294589027128
430.3387490518289130.6774981036578260.661250948171087
440.2902835378405530.5805670756811050.709716462159447
450.2747829387890580.5495658775781170.725217061210942
460.2313930428254930.4627860856509850.768606957174508
470.2122548029842950.4245096059685910.787745197015705
480.1796436628403570.3592873256807140.820356337159643
490.2387391037649750.477478207529950.761260896235025
500.3802091199602880.7604182399205770.619790880039712
510.4008714955851980.8017429911703970.599128504414802
520.3699548619882360.7399097239764720.630045138011764
530.3802281713599060.7604563427198110.619771828640094
540.3331633596244820.6663267192489630.666836640375518
550.5903529367430030.8192941265139940.409647063256997
560.6429369204615930.7141261590768140.357063079538407
570.6240845880411060.7518308239177880.375915411958894
580.5771776319287170.8456447361425660.422822368071283
590.6067667613695380.7864664772609250.393233238630462
600.5586957210423870.8826085579152260.441304278957613
610.5127624719498820.9744750561002360.487237528050118
620.7401907309080780.5196185381838440.259809269091922
630.7675533012746140.4648933974507710.232446698725386
640.731366953542410.537266092915180.26863304645759
650.689480232126690.6210395357466190.31051976787331
660.6939995208320720.6120009583358570.306000479167928
670.7532739372754610.4934521254490790.246726062724539
680.7167890183443780.5664219633112440.283210981655622
690.675053895028270.6498922099434590.324946104971729
700.7534494344644430.4931011310711140.246550565535557
710.744485471451580.5110290570968390.255514528548419
720.7271490504607660.5457018990784670.272850949539234
730.6947302007096860.6105395985806270.305269799290314
740.6615248312309380.6769503375381240.338475168769062
750.6793440405070570.6413119189858860.320655959492943
760.6389117181739410.7221765636521180.361088281826059
770.8766100541788360.2467798916423270.123389945821164
780.8857435353583030.2285129292833940.114256464641697
790.883136637230650.2337267255386980.116863362769349
800.8588459612009690.2823080775980620.141154038799031
810.8399139052792090.3201721894415810.160086094720791
820.8179426409989980.3641147180020040.182057359001002
830.7975954541302310.4048090917395380.202404545869769
840.7614024342050420.4771951315899170.238597565794958
850.7231422399112040.5537155201775920.276857760088796
860.6935972697875460.6128054604249080.306402730212454
870.6507372988306720.6985254023386560.349262701169328
880.6200657134298830.7598685731402340.379934286570117
890.5769255168763320.8461489662473350.423074483123668
900.5392021075333980.9215957849332040.460797892466602
910.6282886931417720.7434226137164550.371711306858228
920.5828168287985860.8343663424028270.417183171201414
930.546324708211730.907350583576540.45367529178827
940.5646689221242590.8706621557514830.435331077875741
950.5443196569385510.9113606861228980.455680343061449
960.4997979904157530.9995959808315060.500202009584247
970.4521765968340930.9043531936681860.547823403165907
980.4940501347150810.9881002694301610.505949865284919
990.4474452737571920.8948905475143840.552554726242808
1000.4416393782416780.8832787564833560.558360621758322
1010.391808271046640.783616542093280.60819172895336
1020.3617334472351420.7234668944702830.638266552764858
1030.3158976311941640.6317952623883290.684102368805836
1040.2737072850370670.5474145700741350.726292714962933
1050.3202515770788330.6405031541576670.679748422921167
1060.5158745620061910.9682508759876180.484125437993809
1070.4921442687021870.9842885374043740.507855731297813
1080.4395933642822430.8791867285644860.560406635717757
1090.934535795688820.130928408622360.0654642043111802
1100.95541335793320.08917328413360120.0445866420668006
1110.9573680926793160.08526381464136770.0426319073206839
1120.9664516863680850.06709662726382920.0335483136319146
1130.955810324600620.08837935079875980.0441896753993799
1140.9718261121052960.05634777578940770.0281738878947039
1150.987681998782460.02463600243508170.0123180012175409
1160.9831785267560680.03364294648786340.0168214732439317
1170.9748483384590220.0503033230819560.025151661540978
1180.9708057648418750.05838847031624930.0291942351581247
1190.9700095173096140.05998096538077160.0299904826903858
1200.9606495114827840.07870097703443220.0393504885172161
1210.947471347519730.1050573049605410.0525286524802706
1220.9417445291989870.1165109416020270.0582554708010135
1230.9393553464753720.1212893070492560.0606446535246282
1240.9204556253123130.1590887493753740.0795443746876868
1250.887243848691520.225512302616960.11275615130848
1260.8524550477032840.2950899045934320.147544952296716
1270.8809730196529240.2380539606941530.119026980347076
1280.8505900367544160.2988199264911670.149409963245584
1290.7995575828572050.400884834285590.200442417142795
1300.7435969938988240.5128060122023510.256403006101176
1310.697803609051220.6043927818975610.302196390948781
1320.6127851242071860.7744297515856280.387214875792814
1330.5625086285038420.8749827429923150.437491371496158
1340.4812004461617710.9624008923235430.518799553838229
1350.4917815831147570.9835631662295140.508218416885243
1360.3858926010737050.771785202147410.614107398926295
1370.2814682761920090.5629365523840190.718531723807991
1380.1968581397678260.3937162795356530.803141860232174
1390.2919082177526310.5838164355052610.708091782247369


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level20.0152671755725191OK
10% type I error level120.0916030534351145OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292930786zjpyk17ne9h0fhg/10ebn51292930815.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292930786zjpyk17ne9h0fhg/10ebn51292930815.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292930786zjpyk17ne9h0fhg/1psqt1292930815.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292930786zjpyk17ne9h0fhg/1psqt1292930815.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292930786zjpyk17ne9h0fhg/2psqt1292930815.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292930786zjpyk17ne9h0fhg/2psqt1292930815.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292930786zjpyk17ne9h0fhg/301pe1292930815.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292930786zjpyk17ne9h0fhg/301pe1292930815.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292930786zjpyk17ne9h0fhg/401pe1292930815.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292930786zjpyk17ne9h0fhg/401pe1292930815.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292930786zjpyk17ne9h0fhg/501pe1292930815.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292930786zjpyk17ne9h0fhg/501pe1292930815.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292930786zjpyk17ne9h0fhg/6atph1292930815.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292930786zjpyk17ne9h0fhg/6atph1292930815.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292930786zjpyk17ne9h0fhg/7lk6k1292930815.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292930786zjpyk17ne9h0fhg/7lk6k1292930815.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292930786zjpyk17ne9h0fhg/8lk6k1292930815.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292930786zjpyk17ne9h0fhg/8lk6k1292930815.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292930786zjpyk17ne9h0fhg/9lk6k1292930815.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292930786zjpyk17ne9h0fhg/9lk6k1292930815.ps (open in new window)


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





Copyright

Creative Commons License

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

Software written by Ed van Stee & Patrick Wessa


Disclaimer

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


Privacy Policy

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

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

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

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

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

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

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

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

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


FreeStatistics.org is powered by