Home » date » 2010 » Dec » 15 »

Multiple Regression Analysis

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Wed, 15 Dec 2010 20:12:00 +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/15/t129244398720b7p5dhx85aa7g.htm/, Retrieved Wed, 15 Dec 2010 21:13:10 +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/15/t129244398720b7p5dhx85aa7g.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 «
13 26 9 15 25 25 16 20 9 15 25 24 19 21 9 14 19 21 15 31 14 10 18 23 14 21 8 10 18 17 13 18 8 12 22 19 19 26 11 18 29 18 15 22 10 12 26 27 14 22 9 14 25 23 15 29 15 18 23 23 16 15 14 9 23 29 16 16 11 11 23 21 16 24 14 11 24 26 17 17 6 17 30 25 15 19 20 8 19 25 15 22 9 16 24 23 20 31 10 21 32 26 18 28 8 24 30 20 16 38 11 21 29 29 16 26 14 14 17 24 19 25 11 7 25 23 16 25 16 18 26 24 17 29 14 18 26 30 17 28 11 13 25 22 16 15 11 11 23 22 15 18 12 13 21 13 14 21 9 13 19 24 15 25 7 18 35 17 12 23 13 14 19 24 14 23 10 12 20 21 16 19 9 9 21 23 14 18 9 12 21 24 7 18 13 8 24 24 10 26 16 5 23 24 14 18 12 10 19 23 16 18 6 11 17 26 16 28 14 11 24 24 16 17 14 12 15 21 14 29 10 12 25 23 20 12 4 15 27 28 14 25 12 12 29 23 14 28 12 16 27 22 11 20 14 14 18 24 15 17 9 17 25 21 16 17 9 13 22 23 14 20 10 10 26 23 16 31 14 17 23 20 14 21 10 12 16 23 12 19 9 13 27 21 16 23 14 13 25 27 9 15 8 11 14 12 14 24 9 13 19 15 16 28 8 12 20 22 16 16 9 12 16 21 15 19 9 12 18 21 16 21 9 9 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 time8 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
Learning[t] = + 13.1917916230188 + 0.00507035408271898Concern[t] -0.278495426258174Doubts[t] + 0.102339576505264Expectations[t] + 0.0218241062211261Standards[t] + 0.149071998317463Organization[t] -0.00581208015894894t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)13.19179162301881.5386498.573600
Concern0.005070354082718980.0374990.13520.8926340.446317
Doubts-0.2784954262581740.068266-4.07967.5e-053.7e-05
Expectations0.1023395765052640.0540771.89250.0604480.030224
Standards0.02182410622112610.0485630.44940.6538240.326912
Organization0.1490719983174630.0487343.05890.0026530.001327
t-0.005812080158948940.003953-1.47020.1437080.071854


Multiple Linear Regression - Regression Statistics
Multiple R0.467941938785642
R-squared0.218969658074466
Adjusted R-squared0.186199154217451
F-TEST (value)6.6819130712752
F-TEST (DF numerator)6
F-TEST (DF denominator)143
p-value2.98374156970649e-06
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.05042365740092
Sum Squared Residuals601.205916000599


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11316.6188461737307-3.6188461737307
21616.433539970758-0.433539970757996
31915.75229803589743.24770196410265
41514.27167394966750.72832605033253
51414.9916988963256-0.991698896325595
61315.5607953284484-2.56079532844845
71915.37779400643873.62220599356127
81516.2923341433693-1.29233414336929
91416.1515845429881-2.15158454298806
101514.87600247743790.123997522562093
111615.05107666773650.94892333226353
121614.89792438690561.10207561309442
131614.86437295844231.13562704155769
141717.6469419078106-0.646941907810596
151512.59121321122292.40878678877711
161516.2937550286648-1.29375502866482
172017.18858743623992.81141256376011
181817.09349367351790.906506326482109
191617.3157040045319-1.31570400453186
201614.68993509482811.31006490517191
211914.82368275527564.17631724472436
221614.72202498992231.27797501007769
231716.18791716851540.812082831484633
241715.28642303776111.71357696223893
251614.9663689890741.03363101092601
261513.51665550061611.48334449938387
271415.9576845305297-1.95768453052971
281516.3465243130601-1.34652431306008
291214.9445589498498-2.94455894984981
301415.1441621067236-1.1441621067236
311615.40951340983220.590486590167794
321415.8547217034238-1.85472170342379
33714.3910419308745-7.39104193087447
341013.2614635688658-3.26146356886583
351414.6043998204022-0.60439982040218
361616.7754676568077-0.775467656807679
371614.44702045432351.55297954567652
381613.84414110481742.15585889518264
391415.5295400375299-1.52954003752993
402018.20453142905921.79546857094084
411415.0279400332493-1.02794003324931
421415.2539771105999-1.25397711059986
431114.5476592328971-3.54765923289707
441515.9316846998921-0.93168469989212
451615.74918599168370.250814008316335
461415.2603672428834-1.26036724288341
471614.40003607452281.59996392547725
481415.2402515274475-1.2402515274475
491215.547054913684-3.54705491368401
501615.01983089602760.980169103972404
51913.9636042445511-4.96360424455107
521414.485945603947-0.485945603946969
531615.74189888431520.258101115684824
541615.16037870570350.839621294296542
551515.2134259002349-0.213425900234918
561614.84896022529271.15103977470734
571213.5419603216229-1.54196032162286
581616.5257657424622-0.525765742462179
591616.176343502517-0.176343502517003
601416.3951085305603-2.39510853056028
611612.60044799626793.39955200373214
621715.98479666364911.01520333635086
631814.70784047482363.29215952517635
641815.42264826466472.57735173533533
651214.5023541910462-2.50235419104622
661615.86658494091770.133415059082348
671014.3924286389481-4.3924286389481
681412.71122769023941.28877230976062
691815.41616953461752.58383046538255
701816.26684560236841.73315439763157
711615.53257810838340.46742189161659
721615.48791262566980.512087374330196
731614.72504007086331.27495992913671
741314.6772848128695-1.67728481286954
751615.06067434097310.939325659026948
761614.77320115099841.22679884900157
772015.94312486880094.05687513119906
781615.23767330727320.762326692726783
791512.81096065432012.18903934567988
801515.2901684502364-0.290168450236375
811615.79425749902260.205742500977424
821414.0343154660725-0.0343154660724661
831513.22339720999071.77660279000925
841214.9075084558678-2.90750845586783
851715.952697092461.04730290753996
861615.12804807718630.871951922813655
871513.04412334693371.95587665306625
881314.3138981661038-1.31389816610381
891615.86594551286910.134054487130918
901615.20697142242840.793028577571585
911616.1308306340966-0.130830634096586
921615.76989145293620.23010854706376
931415.5511003966015-1.55110039660146
941614.07043891527341.92956108472664
951615.04483492755190.95516507244812
962016.26803943858023.73196056141977
971515.3971403052019-0.397140305201947
981613.99576660100592.00423339899415
991314.2975629042617-1.29756290426171
1001715.76560942157131.23439057842874
1011614.07031279132281.92968720867717
1021213.2268880271215-1.22688802712149
1031614.91640484467821.08359515532182
1041615.14041281630760.859587183692447
1051715.34998877071941.65001122928063
1061313.0643675959213-0.064367595921327
1071215.7061858506417-3.70618585064166
1081815.64738588983292.35261411016713
1091413.54210250310890.457897496891092
1101414.3383780014259-0.338378001425947
1111313.641649460122-0.641649460122025
1121615.27509918681650.724900813183524
1131312.49567457159020.504325428409848
1141615.11918192347470.880818076525294
1151314.6838321886214-1.68383218862135
1161615.63993204224750.360067957752462
1171514.51912634546220.48087365453776
1181615.09229624763390.907703752366064
1191514.73495268341030.26504731658967
1201715.42368796665691.5763120333431
1211515.6132150879246-0.613215087924564
1221213.474489808847-1.47448980884695
1231614.21530369555991.78469630444011
1241013.9470944444123-3.9470944444123
1251614.1766339659391.82336603406102
1261414.5004486764702-0.500448676470243
1271516.0995257007937-1.09952570079375
1281314.2370341590664-1.23703415906641
1291515.1067256678637-0.106725667863693
1301113.4595577191945-2.45955771919452
1311213.97596184158-1.97596184157998
132814.245371870554-6.24537187055398
1331615.9407865618130.0592134381870081
1341514.51596047519470.484039524805347
1351715.02849643325691.97150356674313
1361615.09601977642480.903980223575158
1371014.6532788396021-4.65327883960213
1381813.63108958366484.3689104163352
1391313.5200642166552-0.520064216655248
1401513.96368751533571.0363124846643
1411614.29216769063591.70783230936408
1421614.62162092864471.3783790713553
1431413.07833407596050.921665924039515
1441012.7902445582836-2.79024455828365
1451715.60397228292311.3960277170769
1461313.9902062596416-0.990206259641559
1471515.4621010037919-0.462101003791891
1481615.55121469958370.448785300416284
1491214.9214999964229-2.92149999642287
1501313.2788983865779-0.278898386577896


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.9098662106035690.1802675787928620.0901337893964308
110.8335244753901710.3329510492196570.166475524609829
120.7368128502018410.5263742995963180.263187149798159
130.6734215757368420.6531568485263160.326578424263158
140.655255735979480.6894885280410390.344744264020519
150.6015441028561760.7969117942876490.398455897143824
160.5096326731055150.9807346537889710.490367326894485
170.58392024165490.83215951669020.4160797583451
180.5030979386659110.9938041226681780.496902061334089
190.4283303251256420.8566606502512850.571669674874358
200.3570040860076920.7140081720153830.642995913992308
210.4543096951198210.9086193902396430.545690304880179
220.4239559913264760.8479119826529510.576044008673524
230.3544052424332030.7088104848664060.645594757566797
240.298549821815860.597099643631720.70145017818414
250.2467715943924380.4935431887848760.753228405607562
260.2422008141080750.4844016282161490.757799185891925
270.2066657694723370.4133315389446740.793334230527663
280.2948889748995280.5897779497990550.705111025100472
290.3703288811462780.7406577622925550.629671118853722
300.3145969420126660.6291938840253320.685403057987334
310.2825223222146060.5650446444292120.717477677785394
320.2395546205048430.4791092410096850.760445379495157
330.8892432684071490.2215134631857030.110756731592851
340.916915341570290.1661693168594220.0830846584297108
350.8966224900667630.2067550198664740.103377509933237
360.8958921523273480.2082156953453030.104107847672652
370.8914632194979080.2170735610041850.108536780502092
380.8903193137013040.2193613725973920.109680686298696
390.8679972212199260.2640055575601490.132002778780074
400.9048991714356920.1902016571286160.095100828564308
410.8821604049620970.2356791900758060.117839595037903
420.8616736168232440.2766527663535120.138326383176756
430.9062448833795050.1875102332409910.0937551166204954
440.8843002139590720.2313995720818560.115699786040928
450.8638408090032960.2723183819934090.136159190996704
460.8392342486159150.3215315027681710.160765751384085
470.8258622265273560.3482755469452870.174137773472644
480.7983616290138550.403276741972290.201638370986145
490.839198692521270.321602614957460.16080130747873
500.8228189540158040.3543620919683920.177181045984196
510.920399862058420.1592002758831590.0796001379415793
520.9096732967107630.1806534065784740.0903267032892368
530.9029464276724640.1941071446550720.0970535723275361
540.8967648426121830.2064703147756340.103235157387817
550.8804698004374680.2390603991250640.119530199562532
560.8789949060161440.2420101879677120.121005093983856
570.8681780035356750.263643992928650.131821996464325
580.8455193407005730.3089613185988540.154480659299427
590.8201758733006970.3596482533986050.179824126699303
600.8364054915668550.327189016866290.163594508433145
610.8779154987044940.2441690025910110.122084501295506
620.8636953871698960.2726092256602070.136304612830104
630.8968552011533440.2062895976933110.103144798846656
640.9098812101213030.1802375797573950.0901187898786975
650.9280391524381820.1439216951236350.0719608475618177
660.9129213720229810.1741572559540370.0870786279770186
670.9686331479849880.06273370403002360.0313668520150118
680.9612609016381870.07747819672362640.0387390983618132
690.9685502943806070.0628994112387850.0314497056193925
700.9669364087384490.06612718252310270.0330635912615513
710.9577006115874940.08459877682501160.0422993884125058
720.946803271791070.1063934564178580.0531967282089289
730.9347522492932850.1304955014134290.0652477507067145
740.9405374120320940.1189251759358120.0594625879679058
750.9289480739388570.1421038521222860.0710519260611432
760.9142184046898370.1715631906203250.0857815953101626
770.946059779835310.1078804403293790.0539402201646893
780.931456977526950.1370860449461020.0685430224730511
790.9244841630434140.1510316739131720.0755158369565861
800.909273801887420.1814523962251590.0907261981125796
810.8880294115684460.2239411768631080.111970588431554
820.865262034357460.2694759312850810.134737965642541
830.8527680925787540.2944638148424910.147231907421246
840.9006391789560480.1987216420879040.0993608210439518
850.8849147320339920.2301705359320160.115085267966008
860.8596858987690450.2806282024619110.140314101230955
870.8429927201059060.3140145597881880.157007279894094
880.8362447531424220.3275104937151560.163755246857578
890.8076816248567240.3846367502865520.192318375143276
900.7721284184257590.4557431631484830.227871581574241
910.742826409376070.5143471812478590.257173590623929
920.7046774553665530.5906450892668940.295322544633447
930.7353282304597250.529343539080550.264671769540275
940.7252227866880350.549554426623930.274777213311965
950.6854870999360910.6290258001278180.314512900063909
960.7317827569847870.5364344860304250.268217243015213
970.6968880272998520.6062239454002960.303111972700148
980.6892946684687450.6214106630625110.310705331531256
990.679774530300790.6404509393984210.32022546969921
1000.6373906274461880.7252187451076240.362609372553812
1010.6197627994797610.7604744010404790.380237200520239
1020.5916465944077180.8167068111845630.408353405592282
1030.5441070848541740.9117858302916520.455892915145826
1040.5077329585916580.9845340828166840.492267041408342
1050.4922328085452720.9844656170905430.507767191454728
1060.4398458403674150.879691680734830.560154159632585
1070.6183418464292540.7633163071414920.381658153570746
1080.6069794712754390.7860410574491230.393020528724561
1090.5926030385370550.814793922925890.407396961462945
1100.5404205505118820.9191588989762350.459579449488118
1110.488533124625310.977066249250620.51146687537469
1120.4328199718172750.865639943634550.567180028182725
1130.3977302741008470.7954605482016940.602269725899153
1140.3585687618079340.7171375236158670.641431238192066
1150.3462784438944170.6925568877888340.653721556105583
1160.2929923292137890.5859846584275780.707007670786211
1170.2633116930309450.526623386061890.736688306969055
1180.2657808099929120.5315616199858230.734219190007088
1190.2171907590382450.434381518076490.782809240961755
1200.1914063105394770.3828126210789540.808593689460523
1210.1550428882197860.3100857764395710.844957111780214
1220.1393199308309810.2786398616619620.860680069169019
1230.132175855163480.2643517103269590.86782414483652
1240.1768503421337630.3537006842675270.823149657866237
1250.143708970182030.2874179403640610.85629102981797
1260.1163241918628260.2326483837256530.883675808137174
1270.0879131512484060.1758263024968120.912086848751594
1280.07271715594162970.1454343118832590.92728284405837
1290.05081115666213140.1016223133242630.949188843337869
1300.05119744630323240.1023948926064650.948802553696768
1310.04255165577455470.08510331154910940.957448344225445
1320.4336329058514380.8672658117028750.566367094148562
1330.3476600554818190.6953201109636370.652339944518181
1340.2852272668837660.5704545337675320.714772733116234
1350.2304007638944760.4608015277889520.769599236105524
1360.1756389789797250.351277957959450.824361021020275
1370.7337130368350010.5325739263299970.266286963164999
1380.6579800424713670.6840399150572660.342019957528633
1390.5400680042190570.9198639915618860.459931995780943
1400.3849276689353540.7698553378707080.615072331064646


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/15/t129244398720b7p5dhx85aa7g/10ezd01292443905.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t129244398720b7p5dhx85aa7g/10ezd01292443905.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t129244398720b7p5dhx85aa7g/17gy61292443905.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t129244398720b7p5dhx85aa7g/17gy61292443905.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t129244398720b7p5dhx85aa7g/27gy61292443905.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t129244398720b7p5dhx85aa7g/27gy61292443905.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t129244398720b7p5dhx85aa7g/37gy61292443905.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t129244398720b7p5dhx85aa7g/37gy61292443905.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t129244398720b7p5dhx85aa7g/4z7f91292443905.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t129244398720b7p5dhx85aa7g/4z7f91292443905.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t129244398720b7p5dhx85aa7g/5z7f91292443905.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t129244398720b7p5dhx85aa7g/5z7f91292443905.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t129244398720b7p5dhx85aa7g/6sgec1292443905.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t129244398720b7p5dhx85aa7g/6sgec1292443905.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t129244398720b7p5dhx85aa7g/7sgec1292443905.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t129244398720b7p5dhx85aa7g/7sgec1292443905.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t129244398720b7p5dhx85aa7g/837vx1292443905.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t129244398720b7p5dhx85aa7g/837vx1292443905.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t129244398720b7p5dhx85aa7g/937vx1292443905.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t129244398720b7p5dhx85aa7g/937vx1292443905.ps (open in new window)


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