Home » date » 2010 » Dec » 02 »

WS7 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: Thu, 02 Dec 2010 22:26:08 +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/02/t1291328665xhqel1s5bui5mf8.htm/, Retrieved Thu, 02 Dec 2010 23:24:35 +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/02/t1291328665xhqel1s5bui5mf8.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 «
20 10 11 4 25 25 16 11 11 11 23 21 18 16 12 7 17 22 17 11 13 7 21 25 23 13 14 12 19 24 30 12 16 10 19 18 23 8 11 10 15 22 18 12 10 8 16 15 15 11 11 8 23 22 12 4 15 4 27 28 21 9 9 9 22 20 15 8 11 8 14 12 20 8 17 7 22 24 31 14 17 11 23 20 27 15 11 9 23 21 34 16 18 11 21 20 21 9 14 13 19 21 31 14 10 8 18 23 19 11 11 8 20 28 16 8 15 9 23 24 20 9 15 6 25 24 21 9 13 9 19 24 22 9 16 9 24 23 17 9 13 6 22 23 24 10 9 6 25 29 25 16 18 16 26 24 26 11 18 5 29 18 25 8 12 7 32 25 17 9 17 9 25 21 32 16 9 6 29 26 33 11 9 6 28 22 13 16 12 5 17 22 32 12 18 12 28 22 25 12 12 7 29 23 29 14 18 10 26 30 22 9 14 9 25 23 18 10 15 8 14 17 17 9 16 5 25 23 20 10 10 8 26 23 15 12 11 8 20 25 20 14 14 10 18 24 33 14 9 6 32 24 29 10 12 8 25 23 23 14 17 7 25 21 26 16 5 4 23 24 18 9 12 8 21 24 20 10 12 8 20 28 11 6 6 4 15 16 28 8 24 20 30 20 26 13 12 8 24 29 22 10 12 8 26 27 17 8 14 6 24 22 12 7 7 4 22 28 14 15 13 8 14 16 17 9 12 9 24 25 21 10 13 6 24 24 19 12 14 7 24 28 18 13 8 9 24 24 etc...
 
Output produced by software:

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


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time9 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Org[t] = + 16.2504142572588 -0.0582729173029758concern[t] + 0.200529531559346doubts[t] -0.149647777746776Par_Crit[t] -0.260030170005169Par_Stan[t] + 0.414285431761517Pers_Stand[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)16.25041425725882.0235958.030500
concern-0.05827291730297580.063966-0.9110.3637860.181893
doubts0.2005295315593460.1140831.75770.0808730.040436
Par_Crit-0.1496477777467760.108521-1.3790.1699980.084999
Par_Stan-0.2600301700051690.133749-1.94420.0537860.026893
Pers_Stand0.4142854317615170.0772395.363700


Multiple Linear Regression - Regression Statistics
Multiple R0.470562869770772
R-squared0.221429414406904
Adjusted R-squared0.194947421699656
F-TEST (value)8.3615087752176
F-TEST (DF numerator)5
F-TEST (DF denominator)147
p-value5.56403168650021e-07
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.51408284048418
Sum Squared Residuals1815.27039683845


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12524.76114078559550.238859214404524
22122.5459799328075-1.54597993280755
32221.83684206770310.163157932296894
42522.39996127650862.60003872349135
52420.17301334451383.82698665548617
61819.7853381763504-1.78533817635044
72218.48222763292173.51777236707831
81520.6597038951926-5.65970389519259
92223.384343360126-1.38434336012602
102824.25412668719923.74587331280083
112022.2586267469163-2.25862674691634
121219.0541858795943-7.05418587959432
132421.43924825069612.5607517493039
142021.3755881014603-1.37558810146028
152123.2271563087225-2.22715630872253
162020.6236097714002-0.623609771400234
172119.22741088287721.77258911712277
182321.13178589689561.86821410310437
192821.90839539562966.09160460437044
202421.86586056715272.13413943284727
212423.44195980303870.558040196961282
222420.41717934064473.58282065935532
232321.98139024890901.01860975109104
242322.67321781515660.326782184843355
252924.30728433186684.69271566813318
262421.91934233590882.08065766409124
271824.9616099261505-6.96160992615047
282526.0389768705303-1.03897687053027
292122.5373924894386-1.53739248943859
302626.7014199098452-0.701419909845158
312225.2262139029839-3.22621390298393
322222.6482669942283-0.648266994228331
332222.5780053320943-0.578005332094254
342325.5982387014831-2.59823870148311
353022.84537262360927.15462737639082
362322.69497123616400.305028763835966
371718.681835079817-1.68183507981698
382323.7271609472060-0.727160947206039
392324.2849533150831-1.28495331508312
402522.34201659640082.65798340359919
412420.65413653623093.34586346376907
422427.4849442247080-3.48494422470804
432323.0469160721013-0.04691607210127
442123.7104629834278-2.7104629834278
452425.6839962740913-1.68399627409135
462421.83024690382862.16975309617141
472821.49994516902056.50005483097953
481621.0888634862036-5.08886348620361
492019.85942171206980.140578287930204
502923.40903798692675.59096201307328
512723.86911192498363.13088807501638
522223.1516113693736-1.15161136937356
532823.98147034504384.01852965495617
541620.2168699623192-4.21686996231917
552522.87134594641092.12865405358905
562423.46922654102710.530773458972877
572823.57715349099984.42284650900018
582424.2137822663325-0.213782266332461
592322.5981271980510.401872801949008
603026.96219203748563.03780796251444
612421.43610265683882.56389734316115
622124.1080387993479-3.10803879934794
632523.14760631777361.85239368222639
642523.92154963713421.07845036286582
652220.89273293748311.10726706251687
662322.48094748977110.51905251022889
672622.90771098351653.09228901648351
682321.54301568987881.45698431012120
692523.09232229922091.90767770077914
702121.3251264171115-0.325126417111538
712523.49467171040381.50532828959624
722422.11197645286051.88802354713950
732923.50142900022025.49857099977976
742223.6761310832272-1.67613108322715
752723.52896358439943.47103641560060
762619.72116435985136.27883564014874
772221.27879810532790.721201894672111
782422.05166181371191.94833818628808
792723.091640732593.90835926740998
802421.30364084229492.6963591577051
812424.8571231300489-0.85712313004888
822924.28522751029764.71477248970239
832222.1760467850279-0.176046785027854
842120.57539196104410.424608038955942
852420.41027394066193.58972605933811
862421.78439270348942.21560729651058
872321.9197439177631.080256082237
882022.2830872047076-2.28308720470756
892721.40156142426205.59843857573795
902623.44341758008432.55658241991572
912521.91707997430663.0829200256934
922120.05335559323190.946644406768094
932120.78914786124620.210852138753771
941920.4051806931447-1.40518069314470
952121.5989790391454-0.598979039145424
962121.2954960691061-0.295496069106128
971619.7318208532233-3.73182085322335
982220.66071369901861.33928630098142
992921.75683198108547.24316801891464
1001521.6975807012207-6.6975807012207
1011720.7713680505745-3.77136805057448
1021519.9823304187306-4.98233041873058
1032121.6102357290102-0.61023572901017
1042120.92551522836950.07448477163047
1051919.2811141064587-0.281114106458668
1062418.16542011294715.83457988705285
1072022.3666077388697-2.36660773886969
1081725.1432962877541-8.14329628775415
1092324.8858986199411-1.88589861994107
1102422.37670593914391.62329406085607
1111422.0792882301598-8.07928823015977
1121922.8442971257394-3.84429712573941
1132422.13029606902051.86970393097949
1141320.4391884692570-7.43918846925697
1152225.4500906041767-3.45009060417669
1161621.0672860791183-5.06728607911828
1171923.1775585539504-4.17755855395043
1182522.80819769890762.19180230109235
1192524.00784925114770.99215074885234
1202321.36652124360751.63347875639255
1212423.55823779145390.441762208546083
1222623.50726420537272.49273579462734
1232621.47145070988924.52854929011079
1242524.17987573863500.820124261364955
1251822.3113323052576-4.31133230525765
1262119.87536557962701.12463442037305
1272623.64682897241692.35317102758312
1282321.99247092485161.00752907514835
1292319.78453052467143.21546947532858
1302222.5203662884652-0.520366288465208
1312022.3238545065533-2.32385450655328
1321322.0221575507547-9.02215755075468
1332421.42796011956712.57203988043295
1341521.5134079425897-6.51340794258974
1351423.1511035807478-9.1511035807478
1362224.0778402717124-2.07784027171239
1371017.5671216847841-7.56712168478412
1382424.3869347400251-0.386934740025127
1392221.75778774293070.242212257069307
1402425.7483722427375-1.74837224273750
1411921.7215716471969-2.72157164719692
1422022.1233790169746-2.12337901697458
1431317.1296228190527-4.12962281905268
1442020.1629843757919-0.162984375791931
1452223.2736867726531-1.27368677265314
1462423.29548963601170.704510363988297
1472923.29333124526415.70666875473591
1481220.9893491556104-8.98934915561044
1492020.8602833556258-0.860283355625828
1502121.4303615198721-0.430361519872093
1512423.64266946162690.35733053837311
1522221.84455511936490.155444880635079
1532017.69148816849052.30851183150953


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.7679795559513330.4640408880973340.232020444048667
100.6758118484318520.6483763031362950.324188151568148
110.5421511942139880.9156976115720250.457848805786012
120.72384314306880.55231371386240.2761568569312
130.6263011651619060.7473976696761880.373698834838094
140.6385070952840560.7229858094318870.361492904715944
150.5441153326483130.9117693347033730.455884667351687
160.4569666285943360.9139332571886720.543033371405664
170.3726453586158890.7452907172317790.62735464138411
180.4186093569115930.8372187138231860.581390643088407
190.6226154565377360.7547690869245290.377384543462264
200.548176408334510.903647183330980.45182359166549
210.4766711907908160.9533423815816310.523328809209184
220.4583726700674830.9167453401349660.541627329932517
230.3886816974254250.777363394850850.611318302574575
240.3202544320174380.6405088640348770.679745567982562
250.3284877489215560.6569754978431120.671512251078444
260.2757778896992920.5515557793985840.724222110300708
270.5432451531611490.9135096936777030.456754846838851
280.5089956791990380.9820086416019240.491004320800962
290.4653644754284110.9307289508568220.534635524571589
300.4021417648146560.8042835296293110.597858235185344
310.3876145610838060.7752291221676120.612385438916194
320.3305008470416650.6610016940833290.669499152958335
330.2779486618220040.5558973236440070.722051338177996
340.2464465882370070.4928931764740150.753553411762993
350.4249004561359020.8498009122718040.575099543864098
360.3679609677115730.7359219354231470.632039032288427
370.3310127426651830.6620254853303660.668987257334817
380.2815555582600430.5631111165200850.718444441739957
390.2411752255989460.4823504511978910.758824774401054
400.2223041275961740.4446082551923490.777695872403826
410.2113300014143790.4226600028287580.788669998585621
420.1929949811996420.3859899623992840.807005018800358
430.1573775553421020.3147551106842050.842622444657898
440.1428226313696380.2856452627392760.857177368630362
450.1177817265411270.2355634530822540.882218273458873
460.09980029564921690.1996005912984340.900199704350783
470.1664111250940850.3328222501881700.833588874905915
480.2027759999111460.4055519998222930.797224000088854
490.1955491010793590.3910982021587180.80445089892064
500.2618332553802240.5236665107604490.738166744619776
510.2521517413032990.5043034826065980.747848258696701
520.2169821704489120.4339643408978240.783017829551088
530.2304593082274410.4609186164548830.769540691772559
540.2534321368979460.5068642737958910.746567863102054
550.2239652430531210.4479304861062410.77603475694688
560.1887513202040820.3775026404081630.811248679795918
570.2084089723671610.4168179447343210.79159102763284
580.1755709201374380.3511418402748750.824429079862562
590.1453782247376350.290756449475270.854621775262365
600.1400030999650240.2800061999300480.859996900034976
610.1256318102025000.2512636204050000.8743681897975
620.1256769731155180.2513539462310370.874323026884481
630.1082718436464890.2165436872929770.891728156353511
640.08852624806867460.1770524961373490.911473751931325
650.07170438045738770.1434087609147750.928295619542612
660.05669013410682370.1133802682136470.943309865893176
670.05259368616531690.1051873723306340.947406313834683
680.04231196050640390.08462392101280780.957688039493596
690.03505746586148190.07011493172296390.964942534138518
700.02694249608339410.05388499216678810.973057503916606
710.02142984780319560.04285969560639110.978570152196804
720.01718234578980930.03436469157961860.98281765421019
730.02593809185700140.05187618371400280.974061908142999
740.020753857162530.041507714325060.97924614283747
750.02036619462914000.04073238925828010.97963380537086
760.03539895571497130.07079791142994270.964601044285029
770.0273280573871030.0546561147742060.972671942612897
780.02271946889358970.04543893778717930.97728053110641
790.0251310847344820.0502621694689640.974868915265518
800.02242497305917490.04484994611834980.977575026940825
810.01709829811376250.03419659622752490.982901701886238
820.02245418491495980.04490836982991950.97754581508504
830.01776995817709000.03553991635418000.98223004182291
840.01332535291883860.02665070583767720.986674647081161
850.01350393294394840.02700786588789680.986496067056052
860.01173212594685240.02346425189370490.988267874053148
870.009006836125138280.01801367225027660.990993163874862
880.007455077081657620.01491015416331520.992544922918342
890.01335138879292680.02670277758585360.986648611207073
900.01208114130760700.02416228261521390.987918858692393
910.01154996132474190.02309992264948380.988450038675258
920.00884685584385290.01769371168770580.991153144156147
930.006547319770808850.01309463954161770.993452680229191
940.005054411909750940.01010882381950190.99494558809025
950.003756490930305420.007512981860610840.996243509069695
960.002683871638169790.005367743276339580.99731612836183
970.002873197711727760.005746395423455520.997126802288272
980.002250144627910890.004500289255821780.99774985537209
990.009379111806845570.01875822361369110.990620888193154
1000.02099167118395560.04198334236791120.979008328816044
1010.0213062428333050.042612485666610.978693757166695
1020.02748604027602120.05497208055204240.972513959723979
1030.02135053660191370.04270107320382740.978649463398086
1040.01571978127686460.03143956255372920.984280218723135
1050.01147073378126960.02294146756253920.98852926621873
1060.02721976955700970.05443953911401950.97278023044299
1070.02536725798313980.05073451596627950.97463274201686
1080.06986032591518170.1397206518303630.930139674084818
1090.06008331636762390.1201666327352480.939916683632376
1100.04924394765139050.0984878953027810.95075605234861
1110.1388875537875510.2777751075751030.861112446212449
1120.1341006883741560.2682013767483120.865899311625844
1130.1198282118266830.2396564236533670.880171788173317
1140.2058686719855750.4117373439711510.794131328014425
1150.1977976093006920.3955952186013840.802202390699308
1160.2333037253802250.466607450760450.766696274619775
1170.2262717960737880.4525435921475770.773728203926212
1180.225352293903590.450704587807180.77464770609641
1190.2062680707145440.4125361414290880.793731929285456
1200.1708170632452920.3416341264905840.829182936754708
1210.1360612358704120.2721224717408240.863938764129588
1220.1404787464354910.2809574928709830.859521253564509
1230.1976863943804110.3953727887608230.802313605619589
1240.1725342237693420.3450684475386840.827465776230658
1250.1533621290995580.3067242581991160.846637870900442
1260.1346474151114450.2692948302228890.865352584888555
1270.1249514390905530.2499028781811060.875048560909447
1280.1039073611552830.2078147223105660.896092638844717
1290.1395371762858670.2790743525717340.860462823714133
1300.1062455666883250.2124911333766510.893754433311675
1310.07966386773711950.1593277354742390.92033613226288
1320.1925291739948520.3850583479897040.807470826005148
1330.266414311361640.532828622723280.73358568863836
1340.2471697192695580.4943394385391160.752830280730442
1350.4936805759618120.9873611519236240.506319424038188
1360.4451011580827410.8902023161654820.554898841917259
1370.7532491115258270.4935017769483470.246750888474173
1380.7032709058530570.5934581882938850.296729094146943
1390.6047496868793080.7905006262413850.395250313120692
1400.5416215027426140.9167569945147710.458378497257386
1410.563931583695460.872136832609080.43606841630454
1420.4363906636893130.8727813273786270.563609336310687
1430.3429872035166090.6859744070332190.65701279648339
1440.2458044157329240.4916088314658470.754195584267076


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level40.0294117647058824NOK
5% type I error level300.220588235294118NOK
10% type I error level410.301470588235294NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291328665xhqel1s5bui5mf8/10n7ox1291328757.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291328665xhqel1s5bui5mf8/10n7ox1291328757.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291328665xhqel1s5bui5mf8/19f8o1291328757.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291328665xhqel1s5bui5mf8/19f8o1291328757.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291328665xhqel1s5bui5mf8/29f8o1291328757.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291328665xhqel1s5bui5mf8/29f8o1291328757.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291328665xhqel1s5bui5mf8/39f8o1291328757.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291328665xhqel1s5bui5mf8/39f8o1291328757.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291328665xhqel1s5bui5mf8/4j6qr1291328757.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291328665xhqel1s5bui5mf8/4j6qr1291328757.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291328665xhqel1s5bui5mf8/5j6qr1291328757.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291328665xhqel1s5bui5mf8/5j6qr1291328757.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291328665xhqel1s5bui5mf8/6j6qr1291328757.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291328665xhqel1s5bui5mf8/6j6qr1291328757.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291328665xhqel1s5bui5mf8/7uf7u1291328757.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291328665xhqel1s5bui5mf8/7uf7u1291328757.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291328665xhqel1s5bui5mf8/8n7ox1291328757.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291328665xhqel1s5bui5mf8/8n7ox1291328757.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291328665xhqel1s5bui5mf8/9n7ox1291328757.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291328665xhqel1s5bui5mf8/9n7ox1291328757.ps (open in new window)


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