Home » date » 2010 » Dec » 16 »

Multiple Regression Learning

*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: Thu, 16 Dec 2010 21:34:13 +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/16/t1292535162tcm8is9j4paksxt.htm/, Retrieved Thu, 16 Dec 2010 22:32:52 +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/16/t1292535162tcm8is9j4paksxt.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 13 26 9 15 25 25 0 16 20 9 15 25 24 0 19 21 9 14 19 21 1 15 31 14 10 18 23 0 14 21 8 10 18 17 0 13 18 8 12 22 19 0 19 26 11 18 29 18 0 15 22 10 12 26 27 0 14 22 9 14 25 23 0 15 29 15 18 23 23 1 16 15 14 9 23 29 0 16 16 11 11 23 21 1 16 24 14 11 24 26 0 17 17 6 17 30 25 1 15 19 20 8 19 25 1 15 22 9 16 24 23 0 20 31 10 21 32 26 1 18 28 8 24 30 20 0 16 38 11 21 29 29 1 16 26 14 14 17 24 0 19 25 11 7 25 23 0 16 25 16 18 26 24 1 17 29 14 18 26 30 0 17 28 11 13 25 22 1 16 15 11 11 23 22 0 15 18 12 13 21 13 1 14 21 9 13 19 24 0 15 25 7 18 35 17 1 12 23 13 14 19 24 0 14 23 10 12 20 21 0 16 19 9 9 21 23 1 14 18 9 12 21 24 1 10 26 16 5 23 24 1 14 18 12 10 19 23 0 16 18 6 11 17 26 1 16 28 14 11 24 24 1 16 17 14 12 15 21 0 14 29 10 12 25 23 1 20 12 4 15 27 28 1 14 25 12 12 29 23 0 14 28 12 16 27 22 0 11 20 14 14 18 24 0 15 17 9 17 25 21 0 16 17 9 13 22 23 1 14 20 10 10 26 23 0 16 31 14 17 23 20 1 14 21 10 12 16 23 1 12 19 9 13 27 21 0 16 23 14 13 25 27 1 9 15 8 11 14 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 time13 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Learning[t] = + 11.9745252985294 -0.250678126239298Gender[t] -0.00527530208529847Concern[t] -0.229925046900135Doubts[t] + 0.093052852418534Expectations[t] + 0.0350326972003534Standards[t] + 0.170810919044308Organization[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.97452529852941.3303069.001300
Gender-0.2506781262392980.351994-0.71220.4775380.238769
Concern-0.005275302085298470.034977-0.15080.880330.440165
Doubts-0.2299250469001350.064658-3.5560.0005130.000257
Expectations0.0930528524185340.0508981.82820.0696310.034815
Standards0.03503269720035340.0454650.77050.4422720.221136
Organization0.1708109190443080.0468873.6430.0003780.000189


Multiple Linear Regression - Regression Statistics
Multiple R0.471230317353798
R-squared0.222058011993361
Adjusted R-squared0.188954097610100
F-TEST (value)6.70790799609013
F-TEST (DF numerator)6
F-TEST (DF denominator)141
p-value2.88931438152673e-06
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.90311823362478
Sum Squared Residuals510.682120572871


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11316.3099252146050-3.30992521460496
21616.1707661080725-0.170766108072492
31915.34980901323363.65019098676638
41513.83113036285481.16886963714521
51414.4892462770820-0.48924627708203
61315.1729305150650-2.17293051506502
71915.07368803355163.9263119664484
81516.1985973540794-1.19859735407944
91415.8963517324391-1.89635173243905
101514.78202035171460.217979648285414
111615.02251134406860.977488655931356
121614.77730766140571.22269233859435
131614.68373927020551.31626072979455
141717.4084472649119-0.408447264911936
151512.70543253692952.29456746307054
161515.7967466138365-0.796746613836472
172017.02798057123642.97201942876363
181816.43720609364231.56279390635772
191617.168463075271-1.16846307527101
201614.36549650479941.63450349520063
211914.76930576545324.23069423454685
221614.84910552380101.15089447619899
231716.06204179728660.93795820271336
241715.14098605466421.85901394533585
251614.70271575629601.29728424370404
261513.28638496841681.71361503158318
271415.5185107917087-1.51851079170871
281516.0380487873953-1.03804878739525
291214.6813128523561-2.68131285235611
301414.9582603545262-0.95826035452617
311615.30678258780090.693217412199134
321415.5113492399468-1.51134923994678
331013.2783669224344-3.27836692243441
341414.3945920809643-0.394592080964290
351616.5602407037551-0.560240703755147
361614.32101622377561.67898377622436
371613.64437036719642.35562963280364
381415.4433938661048-1.44339386610476
392017.86522470359422.13477529640580
401414.8940976432078-0.894097643207803
411415.2602849594203-1.26028495942033
421114.6828591407508-3.68285914075081
431515.8602649620325-0.860264962032533
441615.72457729884600.275422701154047
451415.0891204509964-1.08912045099644
461614.39590918489271.60409081510733
471414.9196238817447-0.919623881744672
481215.2968902163492-3.29689021634921
491615.33164201961180.66835798038822
50913.3690874317501-4.3690874317501
511414.2160647402933-0.21606474029334
521615.56254485694430.437455143055744
531615.08498172722200.915018272778019
541514.88854308912750.111456910872505
551614.81883192369771.1811680763023
561213.6507087901974-1.65070879019740
571616.2310206419693-0.231020641969338
581616.4317402158784-0.43174021587843
591416.5111958867373-2.51119588673732
601612.63189615336383.36810384663616
611716.0895047522220.910495247777996
621814.64490127654073.35509872345932
631815.55431308194632.44568691805375
641214.7861941530335-2.78619415303346
651615.79253355267740.207466447322556
661014.5537665909205-4.55376659092046
671412.88491491278811.11508508721194
681815.58523942667492.41476057332514
691816.25586325754381.74413674245625
701615.46374923081030.536250769189659
711615.73944057054250.260559429457469
721614.83018321302551.16981678697447
731314.5968180999253-1.59681809992529
741614.86814423875921.13185576124076
751614.88012537492771.11987462507231
762015.92545384257594.07454615742413
771615.34251700338280.657482996617167
781512.50955544521162.49044455478844
791515.6452937454864-0.64529374548635
801616.0598298622116-0.0598298622116237
811414.1902116084183-0.19021160841833
821513.67079941099511.32920058900490
831214.9190454478887-2.91904544788869
841716.23651947453850.763480525461452
851615.50951552364240.490484476357604
861513.17368476324811.82631523675194
871314.6789879150201-1.67898791502007
881616.1088339477026-0.108833947702615
891615.57131634593390.428683654066055
901616.3517269689131-0.351726968913115
911615.61467520451990.385324795480149
921415.4045270884693-1.40452708846931
931614.57710851830731.42289148169266
941615.12741110292530.872588897074726
952016.49374400739123.50625599260884
961515.6013819706196-0.601381970619554
971614.37723351441131.62276648558866
981314.1196774365896-1.11967743658962
991716.16976269409220.830237305907778
1001614.38879558611491.61120441388509
1011213.3060316815757-1.30603168157571
1021615.14194868922350.85805131077653
1031615.46032215311660.539677846883446
1041715.44478889474971.55521110525026
1051313.4464977951823-0.446497795182297
1061215.9294891322532-3.92948913225319
1071815.83525892210292.16474107789714
1081414.2116670457304-0.211667045730435
1091414.7937953866117-0.793795386611682
1101314.0890181080076-1.08901810800760
1111615.43868053620450.561319463795501
1121312.80499310446960.195006895530407
1131615.45790390298730.542096097012691
1141314.9751802334197-1.97518023341971
1151615.99722771517150.00277228482849207
1161515.0202090907344-0.0202090907344012
1171615.75927744872570.240722551274252
1181514.98969744386550.0103025561345184
1191715.85670531170541.14329468829461
1201515.9518156513104-0.951815651310364
1211213.8166603395711-1.81666033957112
1221614.47194948521581.52805051478422
1231014.4055034480777-4.40550344807769
1241614.35372897141581.64627102858422
1251414.623585345027-0.623585345027007
1261516.5297003197088-1.52970031970883
1271314.4871138129197-1.48711381291969
1281515.3354018850243-0.335401885024273
1291114.0634828217611-3.06348282176115
1301214.2862291014697-2.28622910146967
1311616.2063127103063-0.206312710306301
1321515.0613165406223-0.0613165406222636
1331715.32070502895041.67929497104955
1341615.37285195236440.627148047635605
1351015.2267468972319-5.2267468972319
1361813.80723543974954.19276456025045
1371314.1707445408875-1.17074454088750
1381514.45436149379840.545638506201642
1391614.70271575629601.29728424370404
1401615.27756472126720.722435278732803
1411413.79957915086680.200420849133171
1421013.3189603960459-3.31896039604592
1431716.23651947453850.763480525461452
1441314.612426335268-1.61242633526800
1451515.9518156513104-0.951815651310364
1461616.0955558696753-0.0955558696753403
1471215.4474354493558-3.44743544935584
1481313.5082981916654-0.508298191665398


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.939371005114910.1212579897701780.0606289948850891
110.8858375276633510.2283249446732970.114162472336648
120.8264784604621770.3470430790756460.173521539537823
130.7392959523139430.5214080953721140.260704047686057
140.6383182138322330.7233635723355350.361681786167767
150.5648081475983090.8703837048033820.435191852401691
160.6390740135970930.7218519728058140.360925986402907
170.7161761178683430.5676477642633130.283823882131657
180.6581574376487650.6836851247024710.341842562351235
190.5866865537159770.8266268925680460.413313446284023
200.5188390978027950.962321804394410.481160902197205
210.7197209554522650.560558089095470.280279044547735
220.66814909708820.66370180582360.3318509029118
230.6098678567462980.7802642865074050.390132143253702
240.5499040038100220.9001919923799560.450095996189978
250.4828676887566950.965735377513390.517132311243305
260.4432570463966390.8865140927932780.556742953603361
270.3859642473158450.771928494631690.614035752684155
280.5008116621735460.9983766756529080.499188337826454
290.6019921238036170.7960157523927660.398007876196383
300.553438935718830.893122128562340.44656106428117
310.5061059743785310.9877880512429380.493894025621469
320.4584999310040290.9169998620080580.541500068995971
330.7370139741937170.5259720516125650.262986025806283
340.6861297745404150.627740450919170.313870225459585
350.6462764404742930.7074471190514150.353723559525707
360.6222300217346410.7555399565307190.377769978265359
370.6170020963734590.7659958072530820.382997903626541
380.5898445153688860.8203109692622280.410155484631114
390.6628385745134480.6743228509731050.337161425486552
400.6275992805463520.7448014389072960.372400719453648
410.6152760395140880.7694479209718240.384723960485912
420.78259735554060.4348052889187990.217402644459399
430.7561543354850980.4876913290298040.243845664514902
440.7128122744779710.5743754510440580.287187725522029
450.6843232394214580.6313535211570850.315676760578542
460.6576556256016290.6846887487967420.342344374398371
470.6155294256183580.7689411487632840.384470574381642
480.712335398606740.5753292027865210.287664601393260
490.6698670084854620.6602659830290760.330132991514538
500.8117191147523940.3765617704952130.188280885247606
510.7771626240600420.4456747518799160.222837375939958
520.7478290963383770.5043418073232460.252170903661623
530.71938589499920.5612282100015980.280614105000799
540.6809291970040820.6381416059918360.319070802995918
550.6560961338921610.6878077322156780.343903866107839
560.6447812360696390.7104375278607230.355218763930361
570.5981450572475730.8037098855048540.401854942752427
580.5518027695479110.8963944609041780.448197230452089
590.5776486475353160.8447027049293690.422351352464684
600.6611404768533370.6777190462933250.338859523146663
610.632852157655550.73429568468890.36714784234445
620.7195827045912470.5608345908175070.280417295408753
630.7530608079209290.4938783841581420.246939192079071
640.7991411507125040.4017176985749920.200858849287496
650.7644918362464470.4710163275071050.235508163753553
660.9025279640470640.1949440719058730.0974720359529364
670.8873726871412520.2252546257174950.112627312858748
680.9060579575098560.1878840849802890.0939420424901446
690.905824256785420.1883514864291600.09417574321458
700.8853585483559260.2292829032881490.114641451644074
710.8605330745075270.2789338509849470.139466925492473
720.8444041255265730.3111917489468540.155595874473427
730.8351556663522790.3296886672954430.164844333647721
740.8145906474939190.3708187050121630.185409352506081
750.7907975639051810.4184048721896370.209202436094819
760.891025183511690.217949632976620.10897481648831
770.8696561572236170.2606876855527670.130343842776384
780.8872378344429420.2255243311141160.112762165557058
790.8647280299005360.2705439401989290.135271970099464
800.8362011863056550.3275976273886910.163798813694345
810.8057010474740260.3885979050519470.194298952525974
820.7990473268467650.401905346306470.200952673153235
830.8415354884208370.3169290231583260.158464511579163
840.8131549677330240.3736900645339520.186845032266976
850.7820687609588660.4358624780822680.217931239041134
860.790959921764770.4180801564704580.209040078235229
870.7809978610504050.4380042778991890.219002138949595
880.7425557905517960.5148884188964080.257444209448204
890.70429091398810.5914181720238020.295709086011901
900.6619744321836870.6760511356326250.338025567816313
910.6160584174591130.7678831650817750.383941582540887
920.6023072178367640.7953855643264710.397692782163236
930.609556522433050.78088695513390.39044347756695
940.5667767288329260.8664465423341490.433223271167074
950.677185345872580.6456293082548390.322814654127419
960.6322264868463280.7355470263073440.367773513153672
970.6547256772744440.6905486454511120.345274322725556
980.6333682496006070.7332635007987860.366631750399393
990.6137502135859110.7724995728281770.386249786414089
1000.6141855370535140.7716289258929720.385814462946486
1010.5866159524234710.8267680951530590.413384047576529
1020.5498209608951630.9003580782096740.450179039104837
1030.5199191714068990.9601616571862020.480080828593101
1040.5240725124134680.9518549751730650.475927487586532
1050.470304385127850.94060877025570.529695614872149
1060.6552100350404720.6895799299190570.344789964959528
1070.6726034999603650.6547930000792690.327396500039635
1080.6726528425110410.6546943149779180.327347157488959
1090.623266431041750.7534671379165010.376733568958250
1100.5743458176047560.8513083647904870.425654182395244
1110.5216145035460450.956770992907910.478385496453955
1120.4921644988234730.9843289976469460.507835501176527
1130.4430280684786060.8860561369572110.556971931521394
1140.432335300802440.864670601604880.56766469919756
1150.3727422311298910.7454844622597810.62725776887011
1160.3325973576096370.6651947152192740.667402642390363
1170.3523050068852770.7046100137705540.647694993114723
1180.2985979961069080.5971959922138150.701402003893092
1190.2777018709288550.5554037418577090.722298129071145
1200.2359751774037430.4719503548074860.764024822596257
1210.2166061121652780.4332122243305570.783393887834722
1220.1966246102666660.3932492205333330.803375389733334
1230.3163810282879530.6327620565759060.683618971712047
1240.263695830793310.527391661586620.73630416920669
1250.2360845405217730.4721690810435450.763915459478227
1260.1879931603777120.3759863207554240.812006839622288
1270.185354810449510.370709620899020.81464518955049
1280.1497082609676080.2994165219352150.850291739032392
1290.1353649966282000.2707299932564000.8646350033718
1300.1183604207667380.2367208415334760.881639579233262
1310.08081847964777730.1616369592955550.919181520352223
1320.05275325125441640.1055065025088330.947246748745584
1330.05810410629719440.1162082125943890.941895893702806
1340.034853973198560.069707946397120.96514602680144
1350.2946275751234290.5892551502468570.705372424876571
1360.4804355305716230.9608710611432460.519564469428377
1370.3756244633181910.7512489266363810.624375536681809
1380.2602467969181730.5204935938363470.739753203081827


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 level10.00775193798449612OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/16/t1292535162tcm8is9j4paksxt/10byjz1292535239.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/16/t1292535162tcm8is9j4paksxt/10byjz1292535239.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/16/t1292535162tcm8is9j4paksxt/14f4o1292535239.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/16/t1292535162tcm8is9j4paksxt/14f4o1292535239.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/16/t1292535162tcm8is9j4paksxt/2xol81292535239.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/16/t1292535162tcm8is9j4paksxt/2xol81292535239.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/16/t1292535162tcm8is9j4paksxt/3xol81292535239.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/16/t1292535162tcm8is9j4paksxt/3xol81292535239.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/16/t1292535162tcm8is9j4paksxt/48glu1292535239.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/16/t1292535162tcm8is9j4paksxt/48glu1292535239.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/16/t1292535162tcm8is9j4paksxt/58glu1292535239.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/16/t1292535162tcm8is9j4paksxt/58glu1292535239.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/16/t1292535162tcm8is9j4paksxt/68glu1292535239.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/16/t1292535162tcm8is9j4paksxt/68glu1292535239.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/16/t1292535162tcm8is9j4paksxt/717kw1292535239.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/16/t1292535162tcm8is9j4paksxt/717kw1292535239.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/16/t1292535162tcm8is9j4paksxt/8byjz1292535239.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/16/t1292535162tcm8is9j4paksxt/8byjz1292535239.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/16/t1292535162tcm8is9j4paksxt/9byjz1292535239.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/16/t1292535162tcm8is9j4paksxt/9byjz1292535239.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