Home » date » 2010 » Dec » 13 »

Multiple Regression Leercompetentie

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Mon, 13 Dec 2010 16:07:23 +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/13/t1292256538zxrlpkkxgiexot1.htm/, Retrieved Mon, 13 Dec 2010 17:11:12 +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/13/t1292256538zxrlpkkxgiexot1.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 6 25 25 0 16 20 9 6 25 24 0 19 21 9 13 19 21 1 15 31 14 8 18 23 0 14 21 8 7 18 17 0 13 18 8 9 22 19 0 19 26 11 5 29 18 0 15 22 10 8 26 27 0 14 22 9 9 25 23 0 15 29 15 11 23 23 1 16 15 14 8 23 29 0 16 16 11 11 23 21 1 16 24 14 12 24 26 0 17 17 6 8 30 25 1 15 19 20 7 19 25 1 15 22 9 9 24 23 0 20 31 10 12 32 26 1 18 28 8 20 30 20 0 16 38 11 7 29 29 1 16 26 14 8 17 24 0 19 25 11 8 25 23 0 16 25 16 16 26 24 1 17 29 14 10 26 30 0 17 28 11 6 25 22 1 16 15 11 8 23 22 0 15 18 12 9 21 13 1 14 21 9 9 19 24 0 15 25 7 11 35 17 1 12 23 13 12 19 24 0 14 23 10 8 20 21 0 16 19 9 7 21 23 1 14 18 9 8 21 24 1 7 18 13 9 24 24 1 10 26 16 4 23 24 1 14 18 12 8 19 23 0 16 18 6 8 17 26 1 16 28 14 8 24 24 1 16 17 14 6 15 21 0 14 29 10 8 25 23 1 20 12 4 4 27 28 1 14 25 12 7 29 23 0 14 28 12 14 27 22 0 11 20 14 10 18 24 0 15 17 9 9 25 21 0 16 17 9 6 22 23 1 14 20 10 8 26 23 0 16 31 14 11 23 20 1 14 21 10 8 16 23 1 12 19 9 8 27 21 0 16 23 14 10 25 27 1 9 15 8 8 14 12 0 14 24 9 1 etc...
 
Output produced by software:

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


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time10 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
Learning[t] = + 12.8466322963478 -0.519508200233652Gender[t] + 0.0150227529352552Concern[t] -0.274396434721787Doubts[t] + 0.0644169575826978Criticism[t] + 0.0264468826309861Standards[t] + 0.171915898709033Organization[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)12.84663229634781.4216939.036200
Gender-0.5195082002336520.379011-1.37070.1726180.086309
Concern0.01502275293525520.0371520.40440.686550.343275
Doubts-0.2743964347217870.070116-3.91350.000147e-05
Criticism0.06441695758269780.0688650.93540.3511530.175576
Standards0.02644688263098610.0493810.53560.5930860.296543
Organization0.1719158987090330.0517423.32250.0011330.000566


Multiple Linear Regression - Regression Statistics
Multiple R0.450207146949892
R-squared0.202686475164762
Adjusted R-squared0.169232760836011
F-TEST (value)6.05871363559073
F-TEST (DF numerator)6
F-TEST (DF denominator)143
p-value1.12911825665973e-05
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.07168736145602
Sum Squared Residuals613.740058877174


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11316.1132272391654-3.11322723916539
21615.85117482284450.148825177155521
31915.64268728694563.35731271305438
41513.89672456932921.10327543067083
51414.8164714987041-0.816471498704096
61315.3498564830057-2.34985648300574
71914.40239365169954.59760634830050
81516.2778523879167-1.27785238791669
91415.9025553027541-1.90255530275406
101514.43727611487350.562723885126455
111614.82009032777421.17990967222578
121614.99573426818431.00426573181569
131614.72366212102621.27633787897381
141717.0622800952334-0.0622800952334465
151512.37593464824172.62406535175826
161515.3566002198894-0.356600219889425
172016.65749039174173.34250960825834
181816.07265330529121.92734669470876
191616.6025754878873-0.602575487887315
201613.96707982073092.03292017926906
211915.33441373453363.66558626546645
221614.67613000292621.32386999707378
231715.41049933063521.58950066936483
241715.07873217946491.92126782053511
251614.43986834097631.56013165902365
261513.19432846923341.80567153076660
271415.3812589525083-1.38125895250827
281515.8582237802245-0.85822378022446
291214.5069695922397-2.50696959223973
301415.1026984528118-1.10269845281183
311615.62286559825900.377134401741045
321415.3246675013818-1.32466750138178
33714.3708393679703-7.37083936797029
341013.3193004167425-3.31930041674249
351414.2766685332454-0.276668533245414
361616.9054092726749-0.905409272674915
371614.18225350501841.81774649498165
381613.13439966775922.86560033224082
391415.6689011809964-1.66890118099636
402017.19519021767042.80480978232955
411414.5818796725194-0.581879672519363
421415.3725651706667-1.37256517066666
431114.5517323011494-3.55173230114944
441515.4836097406597-0.483609740659719
451615.55485001743670.445149982563266
461415.0406350869764-1.04063508697640
471614.22597035933871.77402964066126
481414.7911890136018-0.791189013601796
491214.9826238539759-2.98262385397585
501615.29767643449920.702323565500791
51913.3058767143725-4.3058767143725
521414.4630092807491-0.463009280749088
531615.83410402805800.16589597194198
541615.16614808646290.833851913537109
551514.68018495271430.319815047285719
561615.29244420579870.707555794201252
571213.5301062791087-1.53010627910873
581615.59113936702240.408860632977633
591616.3613431796166-0.361343179616587
601416.6221460569512-2.62214605695119
611613.05061829898392.94938170101611
621716.04383826004200.956161739958021
631814.69095013719653.30904986280346
641815.42897420895882.57102579104119
651215.0016851338993-3.00168513389928
661615.62531825263120.374681747368784
671014.082065204359-4.082065204359
681412.57725071345451.42274928654548
691816.09013897844411.90986102155590
701816.23976650035021.76023349964985
711615.04584605819330.954153941806678
721615.61986037166630.38013962833366
731614.65376037921981.34623962078022
741314.7136783918005-1.71367839180047
751615.22906012071430.770939879285746
761614.60187895448871.3981210455113
772015.98427186560954.01572813439047
781615.31087301587020.689126984129812
791512.44560236063072.55439763936933
801515.7486007833534-0.748600783353391
811615.97802802189440.0219719781055923
821413.83552110277930.164478897220684
831513.40936437303821.59063562696179
841214.9343337421162-2.93433374211618
851716.76507026445040.234929735549553
861615.60313176727530.396868232724656
871513.34150889591381.65849110408616
881314.0729301694969-1.07293016949692
891615.5697737077470.430226292253006
901615.38785902036290.612140979637064
911616.2058373533114-0.205837353311379
921615.82080660689290.179193393107128
931415.1309167354651-1.13091673546512
941614.15296883580841.84703116419157
951614.26450031687891.73549968312107
962016.38323908789713.61676091210293
971515.4521140970786-0.452114097078607
981614.28130285780531.71869714219474
991313.6617315972799-0.66173159727986
1001716.26104148496930.7389585150307
1011614.34010841557711.65989158442288
1021212.9285109546839-0.928510954683935
1031614.83981965126411.16018034873588
1041615.33026914987330.669730850126732
1051715.35009648433521.64990351566477
1061312.68590849296290.314091507037111
1071215.9035742540845-3.90357425408455
1081815.51311943837852.48688056162153
1091414.1184983214712-0.118498321471246
1101414.6181299748476-0.618129974847617
1111313.8771986874648-0.877198687464781
1121615.59338658577650.406613414223484
1131312.73107130689990.268928693100056
1141615.03919017901270.960809820987319
1151315.1221406550671-2.12214065506711
1161616.1679663409847-0.167966340984661
1171514.69397106212600.306028937873954
1181615.80569212764840.194307872351554
1191514.51202850645890.487971493541146
1201715.84228292983161.15771707016835
1211516.2758336502491-1.27583365024908
1221213.6897601426519-1.68976014265193
1231614.27487482408661.72512517591337
1241014.2974021505662-4.29740215056615
1251614.77052941944501.22947058055496
1261414.3793416353615-0.379341635361508
1271516.5913787876252-1.59137878762517
1281314.1498208933421-1.14982089334215
1291514.63400423909970.365995760900317
1301113.9717434494744-2.97174344947439
1311214.2457041903224-2.24570419032235
132814.1487084385333-6.14870843853331
1331616.4471268481276-0.447126848127603
1341514.98976561852870.010234381471306
1351715.82000672297491.17999327702509
1361614.73007905053031.26992094946971
1371015.1978366114683-5.19783661146835
1381813.65954824842074.34045175157931
1391314.0407839427234-1.0407839427234
1401514.59656997229970.40343002770027
1411614.43986834097631.56013165902365
1421615.15691849646950.843081503530482
1431413.93456489641960.0654351035804267
1441013.6079695566325-3.60796955663248
1451716.76507026445040.234929735549553
1461314.9913678998657-1.99136789986574
1471516.2758336502491-1.27583365024908
1481615.89527575771860.104724242281385
1491215.5796022535339-3.57960225353393
1501313.6965565585874-0.696556558587408


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.9267226120642150.1465547758715710.0732773879357853
110.862900604909970.274198790180060.13709939509003
120.7866650199580270.4266699600839450.213334980041973
130.7321741790975250.5356516418049490.267825820902475
140.6441800793475720.7116398413048550.355819920652428
150.5511464695290260.8977070609419490.448853530470974
160.4818332109344550.963666421868910.518166789065545
170.4628994346728780.9257988693457560.537100565327122
180.4671523361783390.9343046723566790.532847663821661
190.3797182616110430.7594365232220860.620281738388957
200.3705758425910190.7411516851820370.629424157408981
210.4657540514619150.9315081029238310.534245948538085
220.4586521902589590.9173043805179180.541347809741041
230.3984313803529010.7968627607058020.601568619647099
240.3440826899362460.6881653798724920.655917310063754
250.2846876221156400.5693752442312810.71531237788436
260.2463424918217160.4926849836434310.753657508178284
270.2008991346182140.4017982692364270.799100865381786
280.2629349861874270.5258699723748540.737065013812573
290.3592407327961540.7184814655923080.640759267203846
300.3126645524278360.6253291048556720.687335447572164
310.2709733308547870.5419466617095740.729026669145213
320.2274225801675680.4548451603351350.772577419832432
330.903554916269240.192890167461520.09644508373076
340.943482618812050.1130347623758990.0565173811879493
350.9256143937054860.1487712125890280.0743856062945139
360.905594574935460.1888108501290820.0944054250645408
370.8950913711749560.2098172576500890.104908628825045
380.9166452865576420.1667094268847170.0833547134423583
390.9135851957686230.1728296084627550.0864148042313775
400.9587472918652440.08250541626951150.0412527081347558
410.9476174172312670.1047651655374660.0523825827687332
420.9435445340280320.1129109319439360.056455465971968
430.9647859480155770.07042810396884540.0352140519844227
440.9537601673308820.09247966533823540.0462398326691177
450.9406047468331430.1187905063337140.0593952531668571
460.9285264336703570.1429471326592860.071473566329643
470.9189397628896350.162120474220730.081060237110365
480.8995900655669250.2008198688661500.100409934433075
490.9189044028117080.1621911943765830.0810955971882915
500.8998019860913660.2003960278172680.100198013908634
510.9444380736816940.1111238526366120.0555619263183061
520.9293607213885140.1412785572229720.070639278611486
530.9112402812750850.1775194374498290.0887597187249147
540.8960250594691280.2079498810617450.103974940530872
550.8760575781972650.2478848436054690.123942421802735
560.8519822085679230.2960355828641530.148017791432077
570.8374720511661260.3250558976677470.162527948833874
580.8097249202071430.3805501595857150.190275079792857
590.7747889553086510.4504220893826980.225211044691349
600.7975411772982330.4049176454035350.202458822701767
610.8197990235265830.3604019529468330.180200976473417
620.792956161558550.4140876768828990.207043838441450
630.8402242084903460.3195515830193080.159775791509654
640.8585794306016450.2828411387967110.141420569398355
650.891229354081290.2175412918374210.108770645918711
660.8681581391618990.2636837216762020.131841860838101
670.9259581232836530.1480837534326950.0740418767163473
680.9159823511805430.1680352976389140.0840176488194568
690.9143617918007350.1712764163985310.0856382081992654
700.9111044460256930.1777911079486150.0888955539743075
710.8944669835333740.2110660329332520.105533016466626
720.8713128119021930.2573743761956130.128687188097807
730.8590221153377940.2819557693244110.140977884662206
740.8505790244038750.2988419511922490.149420975596125
750.8242856352125850.351428729574830.175714364787415
760.8052697971478960.3894604057042080.194730202852104
770.8847238450334980.2305523099330030.115276154966502
780.8631921725949010.2736156548101980.136807827405099
790.8732421693217520.2535156613564960.126757830678248
800.8494629296249870.3010741407500260.150537070375013
810.819613986248150.3607720275037020.180386013751851
820.7894189170318280.4211621659363430.210581082968172
830.781139894912890.437720210174220.21886010508711
840.8152919684968960.3694160630062090.184708031503104
850.7810757888076110.4378484223847780.218924211192389
860.7450322011174120.5099355977651770.254967798882588
870.7327932078176680.5344135843646630.267206792182332
880.7009245882417390.5981508235165230.299075411758262
890.6575247098975950.6849505802048090.342475290102405
900.616838395649790.7663232087004210.383161604350211
910.5685486415205350.862902716958930.431451358479465
920.5193057105554070.9613885788891860.480694289444593
930.4901907881476770.9803815762953530.509809211852323
940.510737151492310.978525697015380.48926284850769
950.4999830590862440.9999661181724870.500016940913756
960.6105987767920690.7788024464158610.389401223207931
970.5614662153666560.8770675692666870.438533784633344
980.5852871436565450.829425712686910.414712856343455
990.5427975557478140.9144048885043730.457202444252186
1000.5205478736164980.9589042527670040.479452126383502
1010.5101816421614240.9796367156771510.489818357838576
1020.4725653364513830.9451306729027670.527434663548617
1030.4396170335713120.8792340671426240.560382966428688
1040.431349620788470.862699241576940.56865037921153
1050.4473829067574890.8947658135149770.552617093242511
1060.3952545379562430.7905090759124860.604745462043757
1070.51947315704650.9610536859070.4805268429535
1080.5471712298984340.9056575402031310.452828770101566
1090.5331622895431400.9336754209137190.466837710456859
1100.4834509957128070.9669019914256150.516549004287193
1110.431106229019170.862212458038340.56889377098083
1120.3809935193261530.7619870386523050.619006480673847
1130.346587759794440.693175519588880.65341224020556
1140.3318390432347350.663678086469470.668160956765265
1150.3214235690805330.6428471381610660.678576430919467
1160.2696472237323030.5392944474646060.730352776267697
1170.2534391570849590.5068783141699170.746560842915041
1180.2659059828582970.5318119657165940.734094017141703
1190.2184684792243130.4369369584486260.781531520775687
1200.1940936564227480.3881873128454960.805906343577252
1210.1637439045363260.3274878090726520.836256095463674
1220.1413653976873210.2827307953746420.85863460231268
1230.1289617191732210.2579234383464430.871038280826779
1240.1802500980253940.3605001960507880.819749901974606
1250.1429086507657240.2858173015314480.857091349234276
1260.1129756689370710.2259513378741420.887024331062929
1270.08596889230879470.1719377846175890.914031107691205
1280.06677898859570070.1335579771914010.9332210114043
1290.04601301258180580.09202602516361150.953986987418194
1300.03713078314735850.0742615662947170.962869216852641
1310.02740855189195640.05481710378391290.972591448108044
1320.2123678422277880.4247356844555770.787632157772212
1330.1570208892645830.3140417785291660.842979110735417
1340.1087018168432050.2174036336864090.891298183156795
1350.1460957689437710.2921915378875420.853904231056229
1360.1334781514384370.2669563028768740.866521848561563
1370.1561072637669050.3122145275338090.843892736233095
1380.4740535587025690.9481071174051390.525946441297431
1390.4213861457767670.8427722915535340.578613854223233
1400.3526686401309360.7053372802618720.647331359869064


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 level60.0458015267175573OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292256538zxrlpkkxgiexot1/106gno1292256432.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292256538zxrlpkkxgiexot1/106gno1292256432.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292256538zxrlpkkxgiexot1/1a6pf1292256432.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292256538zxrlpkkxgiexot1/1a6pf1292256432.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292256538zxrlpkkxgiexot1/2a6pf1292256432.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292256538zxrlpkkxgiexot1/2a6pf1292256432.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292256538zxrlpkkxgiexot1/3a6pf1292256432.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292256538zxrlpkkxgiexot1/3a6pf1292256432.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292256538zxrlpkkxgiexot1/4kxoi1292256432.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292256538zxrlpkkxgiexot1/4kxoi1292256432.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292256538zxrlpkkxgiexot1/5kxoi1292256432.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292256538zxrlpkkxgiexot1/5kxoi1292256432.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292256538zxrlpkkxgiexot1/6kxoi1292256432.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292256538zxrlpkkxgiexot1/6kxoi1292256432.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292256538zxrlpkkxgiexot1/7d76l1292256432.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292256538zxrlpkkxgiexot1/7d76l1292256432.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292256538zxrlpkkxgiexot1/86gno1292256432.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292256538zxrlpkkxgiexot1/86gno1292256432.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292256538zxrlpkkxgiexot1/96gno1292256432.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292256538zxrlpkkxgiexot1/96gno1292256432.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