Home » date » 2010 » Dec » 18 »

Paper Multiple Regression

*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: Sat, 18 Dec 2010 14:32:10 +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/18/t1292682640imwuzok6b68k3ys.htm/, Retrieved Sat, 18 Dec 2010 15:30:40 +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/18/t1292682640imwuzok6b68k3ys.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 «
41 25 15 9 3 38 25 15 9 4 37 19 14 9 4 36 18 10 14 2 42 18 10 8 4 44 23 9 14 4 40 23 18 15 3 43 25 14 9 4 40 23 11 11 4 45 24 11 14 4 47 32 9 14 4 45 30 17 6 5 45 32 21 10 4 40 24 16 9 4 49 17 14 14 4 48 30 24 8 5 44 25 7 11 4 29 25 9 10 4 42 26 18 16 4 45 23 11 11 5 32 25 13 11 5 32 25 13 11 5 41 35 18 7 4 29 19 14 13 2 38 20 12 10 4 41 21 12 9 4 38 21 9 9 4 24 23 11 15 3 34 24 8 13 2 38 23 5 16 2 37 19 10 12 3 46 17 11 6 5 48 27 15 4 5 42 27 16 12 4 46 25 12 10 4 43 18 14 14 5 38 22 13 9 4 39 26 10 10 4 34 26 18 14 4 39 23 17 14 4 35 16 12 10 2 41 27 13 9 3 40 25 13 14 3 43 14 11 8 4 37 19 13 9 2 41 20 12 8 4 46 26 12 10 4 26 16 12 9 3 41 18 12 9 3 37 22 9 9 3 39 25 17 9 4 44 29 18 11 5 39 21 7 15 2 36 22 17 8 4 38 22 12 10 2 38 32 12 8 0 38 23 9 14 4 32 31 9 11 4 33 18 13 10 3 46 23 10 12 4 42 24 12 9 4 42 19 10 13 2 43 26 11 14 4 41 14 13 15 2 49 20 6 8 4 45 22 7 7 3 39 24 13 10 4 45 25 11 10 5 31 21 18 13 3 30 21 18 13 3 45 28 9 11 4 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 time7 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
StudyForCareer[t] = + 32.5202067294365 + 0.174192543560943PersonalStandards[t] + 0.0466789923587195ParentalExpectations[t] -0.217373134461697Doubts[t] + 1.39806533965884LeaderPreference[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)32.52020672943653.25035810.005100
PersonalStandards0.1741925435609430.103831.67770.0956270.047814
ParentalExpectations0.04667899235871950.1279440.36480.7157790.357889
Doubts-0.2173731344616970.154972-1.40270.1629150.081457
LeaderPreference1.398065339658840.4822252.89920.004340.00217


Multiple Linear Regression - Regression Statistics
Multiple R0.367916033517428
R-squared0.135362207719197
Adjusted R-squared0.110833476023288
F-TEST (value)5.51851638304525
F-TEST (DF numerator)4
F-TEST (DF denominator)141
p-value0.000371345161075842
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation4.98212870492208
Sum Squared Residuals3499.84650696961


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
14139.81304301266211.18695698733793
23841.2111083523209-3.21110835232092
33740.1192740985965-3.11927409859654
43635.87536923397460.124630766025435
54239.97573872006242.02426127993758
64439.49578363873824.50421636126177
74038.30045609584621.69954390415382
84341.16442935996221.8355706400378
94040.2412610268408-0.241261026840763
104539.76333416701665.23666583298338
114741.06351653078675.93648346921328
124544.2256137978870.774386202112997
134542.49315697693812.50684302306186
144041.0835948011187-1.08359480111870
154938.684023339166210.3159766608338
164844.11762047547463.88237952452535
174440.40293014452783.59706985547223
182940.7136612637069-11.7136612637069
194240.00372593172611.99627406827385
204541.63932636649963.3606736335004
213242.0810694383389-10.0810694383389
223242.0810694383389-10.0810694383389
234143.5278170339299-2.52781703392991
242936.4536508814321-7.45365088143208
253839.9827355229783-1.98273552297835
264140.3743012010010.625698798999012
273840.2342642239248-2.23426422392483
282437.9737031493351-13.9737031493351
293437.0445396450845-3.04453964508448
303836.07819072106231.92180927893771
313737.8823733861177-0.882373386117737
324641.68103677744244.31896322255758
334844.04442445141013.95557554858987
344240.95405302841641.04594697158356
354640.85369824078315.14630175921693
364340.25628122238602.74371877761405
373840.5951727369207-2.59517273692065
383940.9345327996266-1.93453279962657
393440.4384722006495-6.43847220064954
403939.869215577608-0.86921557760799
413536.4898346694169-1.48983466941690
424140.06807011506650.931929884933467
434038.63281935563621.36718064436384
444339.32564753817743.67435246182264
453737.2764644269201-0.27646442692015
464140.41748179190170.582518208098259
474641.0278907843444.97210921565599
482638.1052731435374-12.1052731435374
494138.45365823065932.54634176934068
503739.0103914278269-2.01039142782694
513941.3044663370384-2.30446633703836
524443.01123457437630.988765425623705
533936.04053675311952.95946324688046
543640.9992618408172-4.99926184081723
553837.53498993078260.465010069217436
563836.91553095599771.08446904400228
573839.4957836387382-1.49578363873823
583241.5414433906109-9.54144339061087
593338.2829640885563-5.28296408855634
604639.97720890002036.02279109997965
614240.89687883168381.10312116831618
624236.26693491199725.7330650880028
634340.11171925413852.88828074586150
644135.10126290234535.89873709765475
654940.13740783774948.86259216225058
664539.35177971203295.64822028796711
673940.7261846895808-1.72618468958084
684542.20508458808322.79491541191682
693138.3868172776477-7.38681727764768
703038.3868172776477-8.38681727764768
714541.0188657599283.98113424007196
724842.37228032872825.62771967127181
732838.2422802673268-10.2422802673268
743537.5314915293246-2.53149152932460
753840.6453501307373-2.64535013073734
763940.4154535704017-1.41545357040171
774040.2502860512567-0.250286051256730
783838.9460472444866-0.946047244486551
794238.35929861415523.64070138584483
803635.35978840620770.640211593792333
814943.63131032309765.36868967690241
824140.58964611396270.410353886037351
831835.9617304157761-17.9617304157761
843638.1032449220374-2.1032449220374
854238.81953532507103.18046467492896
864142.6558526843385-1.65585268433848
874339.98623392443633.01376607556369
884639.68203106000196.31796893999811
893740.7191878866649-3.71918788666491
903839.0625970431437-1.06259704314366
914340.74920331982872.25079668017132
924142.8732258188002-1.87322581880017
933534.65196498604790.348035013952111
943940.4029301445278-1.40293014452777
954239.56198285988682.43801714011318
963639.7186833961579-3.71868339615793
973541.1669261296335-6.16692612963345
983336.2814865593712-3.28148655937117
993638.2035997096708-2.20359970967077
1004839.37232653053618.62767346946392
1014139.98273552297831.01726447702165
1024738.44951809733838.5504819026617
1034139.07309224751761.92690775248244
1043142.1067580219498-11.1067580219498
1053641.2216035566948-5.22160355669482
1064641.30446633703844.69553366296164
1073938.15591908552530.844080914474662
1084440.73171131253883.26828868746116
1094337.05503484945845.94496515054162
1103241.1157221461035-9.11572214610345
1114040.5544889156912-0.55448891569115
1124039.11277443696030.887225563039656
1134637.14592102243128.85407897756883
1144539.19360899580385.80639100419615
1153940.6725088943062-1.67250889430619
1164441.63333119537042.36666880462962
1173539.7618639870587-4.76186398705868
1183837.70468244109880.295317558901173
1193836.44665407851611.55334592148385
1203637.3542691324769-1.35426913247690
1214238.06209255263673.93790744736332
1223939.7011913888681-0.7011913888681
1234142.9575587791016-1.95755877910164
1244139.42047570285271.57952429714727
1254738.77488455421248.22511544578764
1263938.67949834799490.320501652005117
1274039.56051267992890.439487320071111
1284440.25581267421473.74418732578527
1294239.49984008173832.50015991826170
1303538.5540130182927-3.55401301829269
1314642.65382446283843.34617553716156
1324337.6684986531145.33150134688599
1334040.1061926311805-0.106192631180502
1344440.0273862938373.97261370616297
1353740.5088115551191-3.50881155511914
1364640.67600729576425.32399270423584
1374441.63932636649962.36067363350040
1383538.674529766579-3.67452976657898
1393937.19360164657661.80639835342339
1404038.28093586705631.71906413294369
1414238.81953532507103.18046467492896
1423738.9295568689834-1.92955686898343
1432939.6016650493296-10.6016650493296
1443337.8422226485037-4.84222264850373
1453539.9290597277037-4.92905972770369
1464235.66205254251296.33794745748706


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.2096233609059330.4192467218118670.790376639094067
90.1247821909182130.2495643818364250.875217809081787
100.06895247977748470.1379049595549690.931047520222515
110.03277237432862610.06554474865725230.967227625671374
120.01466195732129590.02932391464259180.985338042678704
130.007017305635161280.01403461127032260.992982694364839
140.002909887690630620.005819775381261240.99709011230937
150.02974569599221120.05949139198442250.970254304007789
160.01747533353506730.03495066707013460.982524666464933
170.009903935323417990.01980787064683600.990096064676582
180.2655333815346830.5310667630693670.734466618465317
190.2901412799325670.5802825598651340.709858720067433
200.2265717944335830.4531435888671670.773428205566417
210.6083554232698530.7832891534602940.391644576730147
220.7932925867756680.4134148264486630.206707413224332
230.7441272927703250.5117454144593510.255872707229675
240.8273111310250540.3453777379498910.172688868974946
250.7828193238347110.4343613523305770.217180676165289
260.7391658665092960.5216682669814090.260834133490704
270.6852061716920530.6295876566158950.314793828307947
280.9306322555995420.1387354888009170.0693677444004584
290.910314125436710.179371749126580.08968587456329
300.8960127339238620.2079745321522760.103987266076138
310.8665780768489530.2668438463020930.133421923151046
320.8640896832330440.2718206335339120.135910316766956
330.8558294046584250.2883411906831510.144170595341575
340.8211043295281610.3577913409436780.178895670471839
350.8238758890049320.3522482219901370.176124110995068
360.7887382228738370.4225235542523260.211261777126163
370.7547663849757690.4904672300484620.245233615024231
380.7125943820316620.5748112359366750.287405617968338
390.7469145572480950.506170885503810.253085442751905
400.7024283723465690.5951432553068620.297571627653431
410.6552494120693290.6895011758613420.344750587930671
420.6127421393871240.7745157212257510.387257860612876
430.5684668386627560.8630663226744880.431533161337244
440.5408202039588580.9183595920822830.459179796041142
450.489536547767580.979073095535160.51046345223242
460.436928625044310.873857250088620.56307137495569
470.4382393434142980.8764786868285960.561760656585702
480.6545758358911410.6908483282177170.345424164108859
490.627180922875870.7456381542482590.372819077124129
500.5822375660578090.8355248678843820.417762433942191
510.5401998888118430.9196002223763150.459800111188158
520.4903751822018180.9807503644036370.509624817798182
530.4683445530441920.9366891060883840.531655446955808
540.460298735210680.920597470421360.53970126478932
550.4176289206549500.8352578413098990.58237107934505
560.3840160178693140.7680320357386270.615983982130686
570.341508959743010.683017919486020.65849104025699
580.4752896118415330.9505792236830650.524710388158467
590.4743380703088810.9486761406177620.525661929691119
600.4972425052660770.9944850105321550.502757494733923
610.4507262231330820.9014524462661640.549273776866918
620.4699421587907980.9398843175815970.530057841209202
630.4356366079400620.8712732158801240.564363392059938
640.4544805252916630.9089610505833260.545519474708337
650.5560250905075310.8879498189849380.443974909492469
660.5641934807207110.8716130385585780.435806519279289
670.5219134176309370.9561731647381270.478086582369063
680.4866248508334250.973249701666850.513375149166575
690.5395432773073250.920913445385350.460456722692675
700.6234020393972220.7531959212055570.376597960602778
710.6056075300156220.7887849399687550.394392469984378
720.6213956099102020.7572087801795950.378604390089798
730.7532639189937780.4934721620124440.246736081006222
740.7226856218466420.5546287563067150.277314378153358
750.693891059048140.612217881903720.30610894095186
760.6532284008734080.6935431982531840.346771599126592
770.6078227196051490.7843545607897020.392177280394851
780.5631988685304710.8736022629390590.436801131469529
790.5473899389620390.9052201220759220.452610061037961
800.5032364183969310.9935271632061370.496763581603069
810.5423940041398850.9152119917202310.457605995860115
820.4968186755138020.9936373510276030.503181324486198
830.9507845538098070.09843089238038670.0492154461901934
840.9407598034450220.1184803931099560.0592401965549782
850.9319805712827960.1360388574344080.0680194287172039
860.9150984915969730.1698030168060540.0849015084030268
870.9032307996052120.1935384007895760.096769200394788
880.9172805603134230.1654388793731540.0827194396865772
890.9054606122772780.1890787754454440.0945393877227218
900.8838438428362320.2323123143275370.116156157163768
910.8626903390039340.2746193219921330.137309660996066
920.8349812275301370.3300375449397260.165018772469863
930.8064068629834520.3871862740330970.193593137016548
940.7746571821847610.4506856356304780.225342817815239
950.7408187014378410.5183625971243190.259181298562159
960.7202864107082740.5594271785834520.279713589291726
970.743479781453280.5130404370934410.256520218546721
980.7765181509289310.4469636981421370.223481849071069
990.7666333161246580.4667333677506830.233366683875341
1000.8374832912835890.3250334174328220.162516708716411
1010.8040278092579540.3919443814840920.195972190742046
1020.8246882214243960.3506235571512080.175311778575604
1030.7898410553943420.4203178892113160.210158944605658
1040.8827077155611650.2345845688776710.117292284438835
1050.8917544292476610.2164911415046770.108245570752339
1060.888060132934110.223879734131780.11193986706589
1070.8599527120867510.2800945758264980.140047287913249
1080.8417399245248850.3165201509502310.158260075475115
1090.8469428308534860.3061143382930270.153057169146514
1100.9091568586654380.1816862826691240.0908431413345619
1110.8833862538156320.2332274923687350.116613746184368
1120.8509657168388280.2980685663223440.149034283161172
1130.903469649675650.19306070064870.09653035032435
1140.911531620939790.1769367581204210.0884683790602107
1150.8852073395778120.2295853208443770.114792660422189
1160.8686732405825630.2626535188348730.131326759417437
1170.8740599681386450.2518800637227110.125940031861355
1180.8360590366030530.3278819267938940.163940963396947
1190.7913918952710720.4172162094578560.208608104728928
1200.7526626592672480.4946746814655040.247337340732752
1210.7163439084132260.5673121831735470.283656091586774
1220.6532455726810160.6935088546379670.346754427318984
1230.5890292828059960.8219414343880080.410970717194004
1240.5167568981901630.9664862036196730.483243101809837
1250.6289542837147510.7420914325704970.371045716285249
1260.5525348861792320.8949302276415370.447465113820768
1270.4729492949136650.945898589827330.527050705086335
1280.4576089189504700.9152178379009390.54239108104953
1290.3942118671422670.7884237342845330.605788132857733
1300.3347928935458420.6695857870916840.665207106454158
1310.3647808256081670.7295616512163330.635219174391833
1320.3013680127355730.6027360254711450.698631987264427
1330.2591401959056670.5182803918113330.740859804094333
1340.2073673430181830.4147346860363660.792632656981817
1350.1415869401395170.2831738802790340.858413059860483
1360.2215998402032880.4431996804065750.778400159796713
1370.4686799906392110.9373599812784220.531320009360789
1380.314416546386180.628833092772360.68558345361382


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level10.00763358778625954OK
5% type I error level50.0381679389312977OK
10% type I error level80.0610687022900763OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292682640imwuzok6b68k3ys/105uv91292682719.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292682640imwuzok6b68k3ys/105uv91292682719.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292682640imwuzok6b68k3ys/1rkg11292682719.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292682640imwuzok6b68k3ys/1rkg11292682719.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292682640imwuzok6b68k3ys/2rkg11292682719.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292682640imwuzok6b68k3ys/2rkg11292682719.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292682640imwuzok6b68k3ys/3rkg11292682719.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292682640imwuzok6b68k3ys/3rkg11292682719.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292682640imwuzok6b68k3ys/41bfl1292682719.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292682640imwuzok6b68k3ys/41bfl1292682719.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292682640imwuzok6b68k3ys/51bfl1292682719.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292682640imwuzok6b68k3ys/51bfl1292682719.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292682640imwuzok6b68k3ys/61bfl1292682719.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292682640imwuzok6b68k3ys/61bfl1292682719.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292682640imwuzok6b68k3ys/7ulw71292682719.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292682640imwuzok6b68k3ys/7ulw71292682719.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292682640imwuzok6b68k3ys/85uv91292682719.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292682640imwuzok6b68k3ys/85uv91292682719.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292682640imwuzok6b68k3ys/95uv91292682719.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292682640imwuzok6b68k3ys/95uv91292682719.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