Home » date » 2010 » Dec » 01 »

Workshop 7

*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: Wed, 01 Dec 2010 13:16:22 +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/01/t1291209824on7dsyob0441jjo.htm/, Retrieved Wed, 01 Dec 2010 14:23:55 +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/01/t1291209824on7dsyob0441jjo.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 «
2 5 2 3 3 4 4 2 4 2 4 3 4 4 4 4 2 4 2 5 4 2 4 2 2 2 2 4 3 2 2 2 3 2 4 4 5 1 3 2 4 5 3 5 1 2 1 4 4 3 4 3 3 3 4 3 3 3 2 3 2 4 4 2 4 1 3 2 2 4 4 4 4 3 3 3 4 4 2 2 4 2 4 4 3 3 3 2 2 3 4 3 3 2 2 2 4 2 4 4 1 1 3 4 3 4 5 1 1 1 4 4 3 4 2 3 3 4 3 3 2 2 2 2 2 2 3 4 2 2 3 4 4 4 4 2 3 4 4 3 2 4 1 4 2 4 3 5 4 2 4 3 3 4 4 4 4 3 5 2 3 2 4 2 2 2 4 3 3 5 2 3 2 2 4 4 4 2 4 3 3 4 4 4 2 3 2 4 4 3 4 2 2 2 3 4 4 4 3 1 2 4 4 4 4 2 3 2 4 4 1 4 1 2 3 4 5 4 4 4 4 4 4 4 5 2 1 4 1 4 4 2 4 2 5 3 4 4 4 4 2 2 3 4 3 3 5 2 4 2 5 4 2 5 2 4 1 4 3 4 4 2 2 1 2 4 5 3 2 4 2 4 4 4 4 2 4 2 4 3 4 5 2 2 2 5 5 4 4 2 3 1 4 4 3 4 2 2 2 2 3 4 5 2 4 1 4 3 2 4 2 3 2 4 3 2 5 1 1 2 4 4 4 4 2 2 4 2 4 2 4 1 5 2 5 4 4 4 2 2 2 4 4 4 3 1 4 2 4 4 1 4 1 4 1 4 4 4 4 2 2 2 4 4 2 4 2 2 2 4 5 1 2 1 2 1 3 3 4 3 5 4 5 5 3 3 5 2 3 2 4 5 2 4 2 4 2 4 5 4 4 1 2 2 4 4 3 5 1 3 1 4 4 2 3 2 2 3 2 3 2 5 2 2 1 4 4 3 4 1 3 1 4 4 2 5 1 2 2 4 5 1 4 2 3 3 4 4 3 4 1 2 2 3 4 2 5 1 4 2 4 5 3 4 2 2 2 2 4 3 4 1 5 4 4 3 3 5 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 time9 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
standards[t] = + 2.49017622287169 + 0.053821676528518organization[t] + 0.388162853859228punished[t] + 0.0571215682005039secondrate[t] -0.0518763478238547mistakes[t] -0.0793667772532387competent[t] -0.0329553449719052neat[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.490176222871690.5532054.50141.3e-057e-06
organization0.0538216765285180.0933520.57650.5650980.282549
punished0.3881628538592280.0856544.53171.2e-056e-06
secondrate0.05712156820050390.0775060.7370.4622590.23113
mistakes-0.05187634782385470.08718-0.5950.5526970.276348
competent-0.07936677725323870.096674-0.8210.4129490.206474
neat-0.03295534497190520.100045-0.32940.7423030.371151


Multiple Linear Regression - Regression Statistics
Multiple R0.376181546660612
R-squared0.14151255604797
Adjusted R-squared0.107624893786706
F-TEST (value)4.17593149261663
F-TEST (DF numerator)6
F-TEST (DF denominator)152
p-value0.000647212556059928
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.912678964976017
Sum Squared Residuals126.613399752674


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
123.10205748546204-1.10205748546204
223.10535737713409-1.10535737713409
343.07786694770470.922133052295299
423.20172414306341-1.20172414306341
533.04220444218252-0.0422044421825190
642.732815634454821.26718436554518
732.760525759050080.239474240949922
833.46935400776472-0.469354007764716
933.04629048022892-0.0462904802289185
1022.87068285740469-0.870682857404685
1143.903928293905280.0960717060947225
1243.049590371900900.950409628099096
1333.45669854314088-0.456698543140882
1433.05507960197223-0.0550796019722251
1542.578785163645251.42121483635475
1642.703404190849571.29659580915043
1733.08119115390549-0.0811911539054871
1833.15999147995018-0.159991479950184
1932.991114240733080.00888575926692188
2043.029314806081630.970685193918367
2122.80202621607062-0.802026216070617
2253.184724154387321.81527584561268
2343.912497720482710.087502279517288
2423.07594593352884-1.07594593352884
2533.31266738779243-0.312667387792432
2643.184724154387320.815275845612676
2743.100112156757440.899887843242563
2833.12235736581017-0.122357365810171
2943.374031874215660.625968125784343
3043.100112156757440.899887843242563
3112.56999604190194-1.56999604190194
3243.829806737028690.170193262971312
3352.713303865865532.28669613413447
3423.16247894533459-1.16247894533459
3543.024069585704980.975930414295017
3633.13168862423322-0.13168862423322
3723.29588709428222-1.29588709428222
3843.253600490887260.746399509112735
3953.103412048429421.89658795157058
4043.190189069929850.809810930070154
4142.984490142860311.01550985713969
4243.151988504581290.848011495418709
4333.23467948803532-0.234679488035315
4443.295887094282220.704112905717782
4523.13306750172934-1.13306750172934
4622.65152784302572-0.651527843025719
4743.09797144741570.9020285525843
4822.74682566204598-0.746825662045977
4943.042990588556930.957009411443068
5042.715249194570191.28475080542981
5112.82094721892257-1.82094721892257
5243.042990588556930.957009411443068
5323.01003524358503-1.01003524358503
5412.71138285168967-1.71138285168967
5544.06586013425421-0.0658601342542102
5633.12097848831405-0.120978488314049
5723.12427837998603-1.12427837998603
5842.654827734697701.34517226530230
5932.817647327250580.182352672749419
6023.12898146368294-1.12898146368294
6123.14868861290931-1.14868861290931
6232.763825650722060.236174349277937
6322.67569406625432-0.675694066254317
6413.04823580893358-2.04823580893358
6532.734194511950940.265805488049057
6622.78993720265532-0.789937202655325
6733.20172414306341-0.20172414306341
6832.755395088623410.244604911376588
6932.703404190849570.296595809150427
7023.10011215675744-1.10011215675744
7132.601006058169190.398993941830814
7222.65482773469770-0.654827734697704
7343.542096687145180.457903312854817
7443.678585032598930.321414967401074
7543.262931749310310.737068250689687
7623.07594593352884-1.07594593352884
7732.711949302898210.288050697101792
7843.632173600317590.367826399682408
7933.06385692011355-0.0638569201135457
8043.094866936380790.905133063619212
8123.07434736086684-1.07434736086684
8233.11494712156299-0.114947121562987
8332.796561300528100.203438699471904
8443.739949519022150.260050480977849
8522.8431924279753-0.843192427975301
8642.848437648351951.15156235164805
8722.71194930289821-0.711949302898208
8822.67044884587767-0.670448845877668
8943.876437864475890.123562135524106
9033.12782228135269-0.127822281352693
9143.042990588556930.957009411443068
9222.81572631307472-0.815726313074717
9322.65812762636969-0.65812762636969
9432.601006058169190.398993941830814
9533.49022033932133-0.490220339321328
9653.861383204504471.13861679549553
9723.92831421229975-1.92831421229975
9833.52647557596522-0.526475575965219
9943.286555835859170.71344416414083
10033.20718905860593-0.207189058605931
10143.600597132841810.399402867158191
10232.81902620474670.180973795253297
10333.44518778453612-0.445187784536117
10423.07594593352884-1.07594593352884
10533.27971204282053-0.279712042820527
10623.30386575512231-1.30386575512231
10733.18826805575398-0.188268055753982
10823.80174985639076-1.80174985639076
10943.573106703412420.426893296587575
11022.8432167425041-0.8432167425041
11142.623251267221921.37674873277808
11242.996359461109731.00364053889027
11312.69632819171824-1.69632819171824
11453.589062059708241.41093794029176
11523.05680523551102-1.05680523551102
11633.23135528183453-0.23135528183453
11743.058379493644210.94162050635579
11812.62460583018924-1.62460583018924
11953.56764178786991.43235821213010
12032.877526650443330.122473349556671
12132.796780995693970.203219004306032
12233.10149103425356-0.101491034253559
12333.52453024726056-0.524530247260556
12423.01744548783221-1.01744548783221
12522.60295138687385-0.60295138687385
12643.182778825682660.817221174317339
12742.933269341147711.06673065885229
12833.17947893401068-0.179478934010675
12932.791316080151450.208683919848553
13033.04823580893358-0.0482358089335819
13143.557485592232460.442514407767539
13233.12235736581017-0.122357365810171
13342.723484376031771.27651562396823
13442.84319242797531.15680757202470
13523.20172414306341-1.20172414306341
13643.100112156757440.899887843242563
13722.63396140314109-0.633961403141091
13843.089980275648790.910019724351206
13933.54015135844052-0.54015135844052
14033.69275194036640-0.692751940366404
14122.9787930212251-0.9787930212251
14223.88714800039506-1.88714800039506
14354.122439565774970.877560434225028
14422.70670408252156-0.706704082521559
14543.401497989116240.598502010883758
14633.10535737713409-0.105357377134086
14733.05700061614809-0.0570006161480889
14833.12895714915414-0.128957149154143
14932.629875365094690.370124634905308
15043.93355943267640.0664405673236026
15143.234655173506520.765344826493484
15243.100112156757440.899887843242563
15343.313586099814370.686413900185632
15442.692461848837721.30753815116228
15553.93358374720521.06641625279480
15633.15531271078208-0.155312710782077
15733.0207453795042-0.020745379504198
15843.876437864475890.123562135524106
15943.910552391778050.0894476082219515


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.5572928400481680.8854143199036640.442707159951832
110.4285779939096150.857155987819230.571422006090385
120.2934843222288890.5869686444577790.706515677771111
130.2975041935365400.5950083870730790.70249580646346
140.2680850502662990.5361701005325990.7319149497337
150.3256231789728690.6512463579457390.67437682102713
160.2510325016876830.5020650033753660.748967498312317
170.1826421316171350.365284263234270.817357868382865
180.1705861483510330.3411722967020660.829413851648967
190.1374332673550140.2748665347100270.862566732644986
200.1825691902052020.3651383804104050.817430809794798
210.1496630600603460.2993261201206930.850336939939654
220.5768100467792660.8463799064414680.423189953220734
230.5466291071430790.9067417857138420.453370892856921
240.5748447997261460.8503104005477080.425155200273854
250.5170683271636570.9658633456726870.482931672836343
260.4957463986506240.9914927973012470.504253601349376
270.4729568534725890.9459137069451780.527043146527411
280.4065111382306040.8130222764612080.593488861769396
290.358071480180370.716142960360740.64192851981963
300.3335607860143260.6671215720286530.666439213985674
310.6206622187760420.7586755624479160.379337781223958
320.5605348433481050.8789303133037910.439465156651896
330.710679370361250.5786412592775020.289320629638751
340.7708769929561830.4582460140876340.229123007043817
350.765544966532250.4689100669355000.234455033467750
360.7266452506024880.5467094987950240.273354749397512
370.7473581174781360.5052837650437280.252641882521864
380.7420120564035210.5159758871929570.257987943596479
390.8179994560403360.3640010879193280.182000543959664
400.805970189340180.3880596213196410.194029810659820
410.7923242587731870.4153514824536250.207675741226813
420.7699364682852330.4601270634295330.230063531714767
430.7295671022965580.5408657954068850.270432897703442
440.7121656963488970.5756686073022070.287834303651103
450.7496151486064660.5007697027870680.250384851393534
460.7308371470458080.5383257059083840.269162852954192
470.7459488267717730.5081023464564550.254051173228227
480.7530268453937880.4939463092124250.246973154606212
490.7406787407922050.5186425184155900.259321259207795
500.755623202591840.488753594816320.24437679740816
510.869028720988570.261942558022860.13097127901143
520.8623294845211480.2753410309577030.137670515478852
530.8892545244215010.2214909511569970.110745475578499
540.9451052954324810.1097894091350380.054894704567519
550.9346769497902810.1306461004194380.0653230502097192
560.918847691603230.1623046167935380.081152308396769
570.930550884179510.1388982316409790.0694491158204896
580.944111288998620.1117774220027590.0558887110013795
590.929906430029090.1401871399418190.0700935699709096
600.9369220657154330.1261558685691340.0630779342845668
610.9439895885079280.1120208229841440.056010411492072
620.9302448829269320.1395102341461350.0697551170730677
630.9232345957010380.1535308085979240.0767654042989621
640.9710611673430450.05787766531390970.0289388326569549
650.9631020460232530.07379590795349310.0368979539767465
660.9593699868548380.08126002629032430.0406300131451621
670.9488371808189950.1023256383620110.0511628191810053
680.9366631422174820.1266737155650360.063336857782518
690.922459175614660.1550816487706790.0775408243853397
700.929536206272980.1409275874540390.0704637937270194
710.9165124117403560.1669751765192870.0834875882596436
720.9075777253608620.1848445492782750.0924222746391377
730.8924987930674210.2150024138651570.107501206932579
740.874191028669880.2516179426602400.125808971330120
750.8653676592303350.2692646815393290.134632340769665
760.8741488171935280.2517023656129440.125851182806472
770.8512985279772680.2974029440454630.148701472022732
780.8271139498778470.3457721002443060.172886050122153
790.7953987305858420.4092025388283150.204601269414158
800.793676067291750.4126478654164990.206323932708249
810.8047317811359910.3905364377280170.195268218864009
820.7714930736567220.4570138526865570.228506926343278
830.7379342793215760.5241314413568470.262065720678424
840.7051534003503950.5896931992992090.294846599649605
850.6996550591054630.6006898817890740.300344940894537
860.7192402475718720.5615195048562560.280759752428128
870.7019988164167910.5960023671664190.298001183583209
880.6801675004889250.639664999022150.319832499511075
890.6376334468528710.7247331062942580.362366553147129
900.5932145383876480.8135709232247030.406785461612352
910.5974664303250370.8050671393499260.402533569674963
920.5911686608253140.8176626783493720.408831339174686
930.5684137362971990.8631725274056020.431586263702801
940.5322116200649930.9355767598700140.467788379935007
950.5014047783211810.9971904433576380.498595221678819
960.524419073698830.951161852602340.47558092630117
970.6891252710414380.6217494579171250.310874728958562
980.6593412427836020.6813175144327960.340658757216398
990.6360232379133080.7279535241733840.363976762086692
1000.595505316649590.808989366700820.40449468335041
1010.553109869514170.893780260971660.44689013048583
1020.5051878935781150.989624212843770.494812106421885
1030.4702314145277110.9404628290554210.529768585472289
1040.4956533914228980.9913067828457950.504346608577102
1050.4622397131746870.9244794263493750.537760286825313
1060.5170746648201750.965850670359650.482925335179825
1070.4801681366473060.9603362732946120.519831863352694
1080.6209369774632030.7581260450735950.379063022536797
1090.5774374165634460.8451251668731080.422562583436554
1100.6291300968531370.7417398062937250.370869903146863
1110.6921603291746840.6156793416506320.307839670825316
1120.7412669582451930.5174660835096150.258733041754807
1130.8148445027423720.3703109945152560.185155497257628
1140.85020555640860.2995888871827990.149794443591400
1150.8695671219489560.2608657561020890.130432878051044
1160.8492441005412060.3015117989175890.150755899458794
1170.8646693496156230.2706613007687540.135330650384377
1180.9190718464525060.1618563070949890.0809281535474943
1190.9387724807551070.1224550384897860.0612275192448929
1200.9333637727046790.1332724545906420.066636227295321
1210.9120201661410830.1759596677178340.0879798338589172
1220.894422480397110.2111550392057810.105577519602891
1230.8774956609133960.2450086781732070.122504339086604
1240.8751433377044540.2497133245910910.124856662295546
1250.8561484027085450.2877031945829100.143851597291455
1260.8446071426598020.3107857146803960.155392857340198
1270.8357498600227270.3285002799545470.164250139977273
1280.800545998799340.3989080024013210.199454001200660
1290.7516994052688470.4966011894623050.248300594731153
1300.6955331880421670.6089336239156660.304466811957833
1310.6537923713885990.6924152572228020.346207628611401
1320.6095797557379350.7808404885241290.390420244262065
1330.5828015534400620.8343968931198770.417198446559938
1340.595969020329530.808061959340940.40403097967047
1350.7874946183776670.4250107632446660.212505381622333
1360.7829803910574170.4340392178851650.217019608942583
1370.77723476117620.44553047764760.2227652388238
1380.7562010299624790.4875979400750420.243798970037521
1390.7257700020517510.5484599958964980.274229997948249
1400.7357312899121630.5285374201756730.264268710087837
1410.714846542771790.5703069144564190.285153457228210
1420.9433215994846920.1133568010306160.0566784005153082
1430.9091601403612170.1816797192775670.0908398596387835
1440.956381290070440.08723741985911840.0436187099295592
1450.940090783715530.1198184325689390.0599092162844693
1460.8891312802691290.2217374394617420.110868719730871
1470.8168152947813070.3663694104373870.183184705218693
1480.706759671887510.5864806562249810.293240328112490
1490.5555706427685930.8888587144628150.444429357231407


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 level40.0285714285714286OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291209824on7dsyob0441jjo/10dwa91291209371.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291209824on7dsyob0441jjo/10dwa91291209371.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291209824on7dsyob0441jjo/16dvf1291209371.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291209824on7dsyob0441jjo/16dvf1291209371.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291209824on7dsyob0441jjo/26dvf1291209371.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291209824on7dsyob0441jjo/26dvf1291209371.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291209824on7dsyob0441jjo/3z4c01291209371.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291209824on7dsyob0441jjo/3z4c01291209371.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291209824on7dsyob0441jjo/4rdc31291209371.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291209824on7dsyob0441jjo/4rdc31291209371.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291209824on7dsyob0441jjo/5rdc31291209371.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291209824on7dsyob0441jjo/5rdc31291209371.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291209824on7dsyob0441jjo/6rdc31291209371.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291209824on7dsyob0441jjo/6rdc31291209371.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291209824on7dsyob0441jjo/7kntn1291209371.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291209824on7dsyob0441jjo/7kntn1291209371.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291209824on7dsyob0441jjo/8kntn1291209371.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291209824on7dsyob0441jjo/8kntn1291209371.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291209824on7dsyob0441jjo/9kntn1291209371.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291209824on7dsyob0441jjo/9kntn1291209371.ps (open in new window)


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