Home » date » 2010 » Nov » 26 »

Model 3 MLR

*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: Fri, 26 Nov 2010 10:26:32 +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/Nov/26/t12907671438731sldmtdk4eqf.htm/, Retrieved Fri, 26 Nov 2010 11:25:54 +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/Nov/26/t12907671438731sldmtdk4eqf.htm/},
    year = {2010},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2010},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
0 13 13 0 14 0 13 0 3 0 1 12 12 12 8 8 13 13 5 5 1 15 10 10 12 12 16 16 6 6 1 12 9 9 7 7 12 12 6 6 0 10 10 0 10 0 11 0 5 0 0 12 12 0 7 0 12 0 3 0 1 15 13 13 16 16 18 18 8 8 1 9 12 12 11 11 11 11 4 4 1 12 12 12 14 14 14 14 4 4 1 11 6 6 6 6 9 9 4 4 0 11 5 0 16 0 14 0 6 0 1 11 12 12 11 11 12 12 6 6 1 15 11 11 16 16 11 11 5 5 0 7 14 0 12 0 12 0 4 0 0 11 14 0 7 0 13 0 6 0 1 11 12 12 13 13 11 11 4 4 1 10 12 12 11 11 12 12 6 6 0 14 11 0 15 0 16 0 6 0 1 10 11 11 7 7 9 9 4 4 0 6 7 0 9 0 11 0 4 0 1 11 9 9 7 7 13 13 2 2 0 15 11 0 14 0 15 0 7 0 1 11 11 11 15 15 10 10 5 5 0 12 12 0 7 0 11 0 4 0 1 14 12 12 15 15 13 13 6 6 0 15 11 0 17 0 16 0 6 0 0 9 11 0 15 0 15 0 7 0 1 13 8 8 14 14 14 14 5 5 0 13 9 0 14 0 14 0 6 0 1 16 12 12 8 8 14 14 4 4 1 13 10 10 8 8 8 8 4 4 0 12 10 0 14 0 13 0 7 0 1 14 12 12 14 14 15 15 7 7 0 11 8 0 8 0 13 0 4 0 1 9 12 12 11 11 11 11 4 4 0 16 11 0 16 0 15 0 6 0 1 12 12 12 10 10 15 15 6 6 0 10 7 0 8 0 9 0 5 0 1 13 11 11 14 14 13 13 6 6 1 16 11 11 16 16 16 16 7 7 etc...
 
Output produced by software:

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


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


Multiple Linear Regression - Estimated Regression Equation
Popularity[t] = -1.42983001087090 + 2.84020419065591G[t] + 0.255310644726744FindingFriends[t] -0.280871718072335`Findingfriends*G`[t] + 0.239737612907330KnowingPeople[t] + 0.0307639092683181`Knowingpeople*G`[t] + 0.269027325629948Liked[t] + 0.129060192292371`Liked*G`[t] + 0.736542054753873Celebrity[t] -0.197707988203980`Celebrity*G`[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-1.429830010870902.268179-0.63040.5294270.264714
G2.840204190655912.9032480.97830.3295520.164776
FindingFriends0.2553106447267440.139891.82510.0700320.035016
`Findingfriends*G`-0.2808717180723350.194346-1.44520.1505420.075271
KnowingPeople0.2397376129073300.1108222.16330.0321480.016074
`Knowingpeople*G`0.03076390926831810.133550.23040.8181380.409069
Liked0.2690273256299480.1510621.78090.0770070.038504
`Liked*G`0.1290601922923710.1975360.65340.5145580.257279
Celebrity0.7365420547538730.2943092.50260.013430.006715
`Celebrity*G`-0.1977079882039800.34718-0.56950.5699130.284957


Multiple Linear Regression - Regression Statistics
Multiple R0.723716252676761
R-squared0.523765214388493
Adjusted R-squared0.494408275549428
F-TEST (value)17.8412748433946
F-TEST (DF numerator)9
F-TEST (DF denominator)146
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.08808807120738
Sum Squared Residuals636.576321795309


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11310.95251634873022.04748365126979
21211.13696154278270.863038457217288
31514.00318639849330.996813601506686
41211.08388978927140.916110210728603
51010.1626634211686-0.162663421168614
6128.750015088022313.24998491197769
71516.8823524361036-1.88235243610357
8910.6134570069151-1.61345700691512
91212.6192241272090-0.61922412720902
10118.618140800265792.38185919973421
111111.8681599066226-0.868159906622589
121112.0892126579372-1.08921265793722
131512.53035975768882.46964024231116
14711.1958664967663-4.19586649676633
151111.7392898673674-0.73928986736737
161111.1544600512664-0.154460051266414
171012.0892126579372-2.08921265793722
181413.69834081333560.301659186664381
19108.760836955713481.23916304428652
2068.42045181932718-2.42045181932718
21119.326641040994151.67335895900585
221513.92611792955221.07388207044779
231111.8617707175909-0.861770717590873
24129.217529817146242.78247018285376
251413.56930626456210.430693735437869
261514.17781603915030.822183960849721
27914.1658555424595-5.16585554245954
281313.2603024871413-0.260302487141271
291312.40992725971490.590072740285095
301610.99621499415515.00378500584487
31138.65881203331244.3411879666876
321213.1327526335656-1.13275263356557
331414.6338138447810-0.633813844781013
34118.97407950240652.02592049759351
35910.6134570069151-1.61345700691512
361613.6690511006132.330948899387
371213.0129736895285-1.01297368952853
38108.379201609913831.62079839008617
391313.3243658157321-0.324365815732074
401615.59846548040020.401534519599783
411412.66709425535791.33290574464214
42158.528297027348116.47170297265189
4359.58452267172383-4.58452267172383
4489.95045933677143-1.95045933677143
451111.3032691647559-0.303269164755869
461613.41735299101492.58264700898506
471713.45412078928013.54587921071985
4898.93664216152930.0633578384707
49912.2445287048309-3.24452870483089
501315.0340703405047-2.03407034050474
511010.8642910428057-0.864291042805654
52611.8425828957324-5.84258289573239
531211.95984191332660.0401580866733938
5489.99532208131347-1.99532208131347
551412.18586284533071.81413715466927
561212.7855317491822-0.785531749182182
571111.3587292670499-0.358729267049855
581615.11075356054150.889246439458495
5989.28445720415353-1.28445720415353
601515.4687105068521-0.468710506852143
6178.98975270092965-1.98975270092965
621613.65533441970982.34466558029020
631414.3299080553792-0.329908055379173
641614.12054085157671.87945914842329
65910.2745542005459-1.27455420054586
661412.48946915366091.51053084633906
671112.8775421555426-1.87754215554257
681310.22309919753012.77690080246994
691513.02830322021081.97169677978916
7055.92169020459031-0.921690204590309
711512.78553174918222.21446825081782
721312.48946915366090.510530846339056
731111.4647936556925-0.464793655692533
741112.4510773024245-1.45107730242452
751212.8089238447264-0.808923844726368
761213.5693062645621-1.56930626456213
771212.3363220845687-0.336322084568683
781212.5917134470433-0.591713447043304
791410.99621499415513.00378500584487
8068.1832812629371-2.18328126293710
8179.4865571427762-2.48655714277619
821412.78358214236211.21641785763794
831414.2481268473234-0.248126847323382
841011.6015007380785-1.60150073807851
85138.270539862207664.72946013779234
861212.4136399615473-0.413639961547326
8798.932929459696880.0670705403031203
881212.8724465118822-0.872446511882236
891615.19820898467650.801791015323505
90109.71072172386410.289278276135895
911413.43662228079640.563377719203561
921013.8500393294011-3.85003932940106
931615.57290440705460.427095592945374
941513.89092993342901.10907006657104
951210.92673900443261.07326099556736
96109.801952440388180.198047559611824
97810.7215948873580-2.72159488735796
9888.46727108148916-0.467271081489165
991111.6871018858642-0.687101885864238
1001312.48730017585950.512699824140459
1011615.86896700257590.131032997424135
1021614.90431536695671.09568463304334
1031415.4818026245904-1.48180262459041
104119.298910989847161.70108901015284
10546.24558425383307-2.24558425383307
1061414.4631682672050-0.463168267205043
107910.9219201229010-1.92192012290104
1081415.4687105068521-1.46871050685214
109811.0495061186477-3.04950611864772
110811.7926094009810-3.79260940098105
1111112.6681772960988-1.66817729609879
1121214.2103846244944-2.21038462449438
1131111.4052940871569-0.405294087156949
1141413.82447825605550.175521743944527
1151513.97098067409421.02901932590575
1161613.72245333365442.27754666634561
1171613.69689226030882.3031077396912
1181112.2754881677111-1.27548816771105
1191413.41559680680250.584403193197533
1201410.42993456258613.57006543741391
1211211.68013356493540.319866435064596
1221412.12542706896931.87457293103072
12389.7107217238641-1.71072172386410
1241313.6709074515292-0.670907451529211
1251613.41559680680252.58440319319753
1261210.99404601635371.00595398364627
1271615.57073542925320.429264570746776
1281213.5693062645621-1.56930626456213
1291112.1782963984387-1.17829639843868
13046.57658106396301-2.57658106396301
1311615.57073542925320.429264570746776
1321512.78336277138082.21663722861922
1331011.7923900299998-1.79239002999977
1341313.2579141383586-0.257914138358588
1351512.93612158098782.06387841901219
1361210.86862899840851.13137100159154
1371413.16028616207570.839713837924277
138711.0137135026388-4.01371350263884
1391914.36548130040684.63451869959323
1401213.2091803404501-1.20918034045009
1411211.65791233984540.342087660154638
1421313.1758591938951-0.175859193895138
1431513.41539916305371.58460083694635
14488.080984738265-0.0809847382650022
1451211.13913052058410.860869479415891
1461010.5682284472844-0.568228447284417
147811.0008914616973-3.00089146169729
1481014.4505560666126-4.45055606661265
1491513.40002377498311.59997622501695
1501614.63164486697961.36835513302039
1511313.3221968379307-0.322196837930670
1521615.30240288487900.69759711512102
153910.4961025538317-1.49610255383173
1541412.45479000425691.54520999574306
1551412.38249389790851.61750610209150
1561210.75561250092791.24438749907212


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
130.430069615223120.860139230446240.56993038477688
140.2748887645749270.5497775291498540.725111235425073
150.5060267898063730.9879464203872550.493973210193627
160.3751665257125140.7503330514250290.624833474287485
170.3188759138456880.6377518276913770.681124086154312
180.2307996649564150.4615993299128290.769200335043585
190.1889840450987210.3779680901974410.81101595490128
200.3301477756678230.6602955513356470.669852224332177
210.2517008484012220.5034016968024440.748299151598778
220.2556074023869790.5112148047739580.744392597613021
230.2123130506084480.4246261012168970.787686949391552
240.286484425786350.57296885157270.71351557421365
250.2342654541438840.4685309082877680.765734545856116
260.1795410957646570.3590821915293140.820458904235343
270.3465535271854480.6931070543708970.653446472814551
280.3227888082245020.6455776164490040.677211191775498
290.2963095794796230.5926191589592460.703690420520377
300.5440326457264040.9119347085471930.455967354273596
310.6549686263007550.690062747398490.345031373699245
320.663772152259150.6724556954816980.336227847740849
330.6050120278411100.7899759443177810.394987972158891
340.5587947944883720.8824104110232570.441205205511628
350.5635129804393740.8729740391212520.436487019560626
360.60488618018560.79022763962880.3951138198144
370.561711746994520.876576506010960.43828825300548
380.6053949505005480.7892100989989030.394605049499452
390.5470338521664250.905932295667150.452966147833575
400.5061194946444980.9877610107110040.493880505355502
410.5022983187088230.9954033625823540.497701681291177
420.760259852485570.4794802950288590.239740147514430
430.8824463269271370.2351073461457270.117553673072863
440.892012932229150.2159741355416990.107987067770850
450.8683847605681340.2632304788637310.131615239431866
460.8924441567308340.2151116865383320.107555843269166
470.9286529583439930.1426940833120150.0713470416560073
480.909703235731310.1805935285373800.0902967642686898
490.9428534513683320.1142930972633360.0571465486316681
500.9412435810844310.1175128378311380.0587564189155688
510.9260387147632670.1479225704734660.0739612852367332
520.9834575935540580.03308481289188440.0165424064459422
530.9779641563755520.04407168724889600.0220358436244480
540.9844564875087960.03108702498240810.0155435124912041
550.9848820365353650.03023592692926930.0151179634646347
560.9805264848301160.03894703033976880.0194735151698844
570.978379064364490.04324187127102150.0216209356355108
580.9721055486244880.05578890275102460.0278944513755123
590.9732180090200240.05356398195995150.0267819909799757
600.9656326422423480.06873471551530340.0343673577576517
610.9649238979477210.0701522041045570.0350761020522785
620.9702636114052820.05947277718943630.0297363885947181
630.961575154332890.07684969133421970.0384248456671098
640.9601536143214780.07969277135704470.0398463856785223
650.9618437187084360.07631256258312820.0381562812915641
660.9581791480004940.08364170399901220.0418208519995061
670.957310825602280.08537834879544070.0426891743977204
680.964296876378110.07140624724377840.0357031236218892
690.9660227951183220.06795440976335580.0339772048816779
700.9572714134166930.08545717316661320.0427285865833066
710.959769241163510.08046151767297820.0402307588364891
720.9491510929197360.1016978141605270.0508489070802636
730.936726509614140.1265469807717190.0632734903858594
740.9423261843084260.1153476313831490.0576738156915744
750.9302481085862980.1395037828274040.069751891413702
760.9232881471362110.1534237057275780.0767118528637891
770.906547903742470.1869041925150600.0934520962575302
780.8977884350902350.2044231298195310.102211564909765
790.9225168677555250.1549662644889510.0774831322444753
800.9286854009720620.1426291980558750.0713145990279376
810.9365625722923740.1268748554152520.063437427707626
820.9484843652020930.1030312695958150.0515156347979073
830.9344472319019970.1311055361960050.0655527680980027
840.9271853965276860.1456292069446290.0728146034723145
850.9905054413977580.01898911720448470.00949455860224233
860.9870038946561890.02599221068762290.0129961053438114
870.982284482644630.03543103471073990.0177155173553700
880.9820146556668620.0359706886662770.0179853443331385
890.977414637766680.04517072446663780.0225853622333189
900.9710436335287380.05791273294252330.0289563664712616
910.9633188461809350.07336230763813080.0366811538190654
920.9849161470789630.03016770584207330.0150838529210367
930.9802873796000920.03942524079981520.0197126203999076
940.9776203207228160.04475935855436820.0223796792771841
950.9719357320900930.05612853581981450.0280642679099072
960.9627458887041030.07450822259179350.0372541112958968
970.963603997631830.07279200473634010.0363960023681701
980.9628667829248130.07426643415037510.0371332170751875
990.9838885435246480.03222291295070480.0161114564753524
1000.9782123427265230.04357531454695300.0217876572734765
1010.9704526192761040.0590947614477920.029547380723896
1020.9628369349737640.07432613005247230.0371630650262361
1030.9533595761543360.09328084769132810.0466404238456641
1040.971279055700850.05744188859830130.0287209442991507
1050.9657619822903850.06847603541923040.0342380177096152
1060.9609233349572360.07815333008552870.0390766650427644
1070.9547282498588720.09054350028225690.0452717501411284
1080.9556781886869670.08864362262606520.0443218113130326
1090.960543296189550.07891340762090160.0394567038104508
1100.9652066577053160.06958668458936830.0347933422946842
1110.959729103613210.08054179277357810.0402708963867891
1120.9618527128726460.07629457425470860.0381472871273543
1130.948117138293890.1037657234122190.0518828617061094
1140.932347579292720.1353048414145590.0676524207072793
1150.914516423745830.170967152508340.08548357625417
1160.9152961636770180.1694076726459640.0847038363229822
1170.9166357248577860.1667285502844280.0833642751422142
1180.8991847941956590.2016304116086830.100815205804341
1190.8694807745626660.2610384508746690.130519225437334
1200.9508538629328750.09829227413425070.0491461370671254
1210.9330640590925080.1338718818149830.0669359409074917
1220.9151810448581350.1696379102837290.0848189551418647
1230.889428723733170.2211425525336600.110571276266830
1240.8537121357839220.2925757284321550.146287864216078
1250.8659493800953560.2681012398092890.134050619904644
1260.8400549272403370.3198901455193250.159945072759663
1270.7994598386101680.4010803227796640.200540161389832
1280.8089447290743740.3821105418512510.191055270925626
1290.7613436499088050.477312700182390.238656350091195
1300.7188426693390330.5623146613219330.281157330660967
1310.680717515318510.638564969362980.31928248468149
1320.6972953468691920.6054093062616160.302704653130808
1330.808190433480790.383619133038420.19180956651921
1340.8006387989628640.3987224020742710.199361201037136
1350.8528041602257760.2943916795484480.147195839774224
1360.8319678044653560.3360643910692880.168032195534644
1370.7648800051349630.4702399897300740.235119994865037
1380.9777962066908890.04440758661822310.0222037933091115
1390.9969003748723040.006199250255392150.00309962512769608
1400.9946625281614930.01067494367701320.0053374718385066
1410.9855112849043420.02897743019131650.0144887150956582
1420.9571379691765960.08572406164680820.0428620308234041
1430.8924988434413030.2150023131173940.107501156558697


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level10.00763358778625954OK
5% type I error level200.152671755725191NOK
10% type I error level540.412213740458015NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/26/t12907671438731sldmtdk4eqf/10zn5d1290767180.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t12907671438731sldmtdk4eqf/10zn5d1290767180.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t12907671438731sldmtdk4eqf/1t48j1290767180.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t12907671438731sldmtdk4eqf/1t48j1290767180.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t12907671438731sldmtdk4eqf/2ld7m1290767180.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t12907671438731sldmtdk4eqf/2ld7m1290767180.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t12907671438731sldmtdk4eqf/3ld7m1290767180.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t12907671438731sldmtdk4eqf/3ld7m1290767180.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t12907671438731sldmtdk4eqf/4e4o71290767180.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t12907671438731sldmtdk4eqf/4e4o71290767180.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t12907671438731sldmtdk4eqf/5e4o71290767180.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t12907671438731sldmtdk4eqf/5e4o71290767180.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t12907671438731sldmtdk4eqf/6e4o71290767180.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t12907671438731sldmtdk4eqf/6e4o71290767180.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t12907671438731sldmtdk4eqf/7pd6s1290767180.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t12907671438731sldmtdk4eqf/7pd6s1290767180.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t12907671438731sldmtdk4eqf/8zn5d1290767180.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t12907671438731sldmtdk4eqf/8zn5d1290767180.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t12907671438731sldmtdk4eqf/9zn5d1290767180.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t12907671438731sldmtdk4eqf/9zn5d1290767180.ps (open in new window)


 
Parameters (Session):
par1 = 2 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 2 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
R code (references can be found in the software module):
library(lattice)
library(lmtest)
n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
par1 <- as.numeric(par1)
x <- t(y)
k <- length(x[1,])
n <- length(x[,1])
x1 <- cbind(x[,par1], x[,1:k!=par1])
mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
colnames(x1) <- mycolnames #colnames(x)[par1]
x <- x1
if (par3 == 'First Differences'){
x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
for (i in 1:n-1) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
x <- x2
}
if (par2 == 'Include Monthly Dummies'){
x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
for (i in 1:11){
x2[seq(i,n,12),i] <- 1
}
x <- cbind(x, x2)
}
if (par2 == 'Include Quarterly Dummies'){
x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
for (i in 1:3){
x2[seq(i,n,4),i] <- 1
}
x <- cbind(x, x2)
}
k <- length(x[1,])
if (par3 == 'Linear Trend'){
x <- cbind(x, c(1:n))
colnames(x)[k+1] <- 't'
}
x
k <- length(x[1,])
df <- as.data.frame(x)
(mylm <- lm(df))
(mysum <- summary(mylm))
if (n > n25) {
kp3 <- k + 3
nmkm3 <- n - k - 3
gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
numgqtests <- 0
numsignificant1 <- 0
numsignificant5 <- 0
numsignificant10 <- 0
for (mypoint in kp3:nmkm3) {
j <- 0
numgqtests <- numgqtests + 1
for (myalt in c('greater', 'two.sided', 'less')) {
j <- j + 1
gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
}
if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
}
gqarr
}
bitmap(file='test0.png')
plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
points(x[,1]-mysum$resid)
grid()
dev.off()
bitmap(file='test1.png')
plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
grid()
dev.off()
bitmap(file='test2.png')
hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
grid()
dev.off()
bitmap(file='test3.png')
densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
dev.off()
bitmap(file='test4.png')
qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
qqline(mysum$resid)
grid()
dev.off()
(myerror <- as.ts(mysum$resid))
bitmap(file='test5.png')
dum <- cbind(lag(myerror,k=1),myerror)
dum
dum1 <- dum[2:length(myerror),]
dum1
z <- as.data.frame(dum1)
z
plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
lines(lowess(z))
abline(lm(z))
grid()
dev.off()
bitmap(file='test6.png')
acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
grid()
dev.off()
bitmap(file='test7.png')
pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
grid()
dev.off()
bitmap(file='test8.png')
opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
plot(mylm, las = 1, sub='Residual Diagnostics')
par(opar)
dev.off()
if (n > n25) {
bitmap(file='test9.png')
plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
grid()
dev.off()
}
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
a<-table.row.end(a)
myeq <- colnames(x)[1]
myeq <- paste(myeq, '[t] = ', sep='')
for (i in 1:k){
if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
if (rownames(mysum$coefficients)[i] != '(Intercept)') {
myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
}
}
myeq <- paste(myeq, ' + e[t]')
a<-table.row.start(a)
a<-table.element(a, myeq)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Variable',header=TRUE)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'S.D.',header=TRUE)
a<-table.element(a,'T-STAT<br />H0: parameter = 0',header=TRUE)
a<-table.element(a,'2-tail p-value',header=TRUE)
a<-table.element(a,'1-tail p-value',header=TRUE)
a<-table.row.end(a)
for (i in 1:k){
a<-table.row.start(a)
a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
a<-table.element(a,mysum$coefficients[i,1])
a<-table.element(a, round(mysum$coefficients[i,2],6))
a<-table.element(a, round(mysum$coefficients[i,3],4))
a<-table.element(a, round(mysum$coefficients[i,4],6))
a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple R',1,TRUE)
a<-table.element(a, sqrt(mysum$r.squared))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'R-squared',1,TRUE)
a<-table.element(a, mysum$r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-squared',1,TRUE)
a<-table.element(a, mysum$adj.r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (value)',1,TRUE)
a<-table.element(a, mysum$fstatistic[1])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[2])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[3])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'p-value',1,TRUE)
a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
a<-table.element(a, mysum$sigma)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
a<-table.element(a, sum(myerror*myerror))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Time or Index', 1, TRUE)
a<-table.element(a, 'Actuals', 1, TRUE)
a<-table.element(a, 'Interpolation<br />Forecast', 1, TRUE)
a<-table.element(a, 'Residuals<br />Prediction Error', 1, TRUE)
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,i, 1, TRUE)
a<-table.element(a,x[i])
a<-table.element(a,x[i]-mysum$resid[i])
a<-table.element(a,mysum$resid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable4.tab')
if (n > n25) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-values',header=TRUE)
a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'breakpoint index',header=TRUE)
a<-table.element(a,'greater',header=TRUE)
a<-table.element(a,'2-sided',header=TRUE)
a<-table.element(a,'less',header=TRUE)
a<-table.row.end(a)
for (mypoint in kp3:nmkm3) {
a<-table.row.start(a)
a<-table.element(a,mypoint,header=TRUE)
a<-table.element(a,gqarr[mypoint-kp3+1,1])
a<-table.element(a,gqarr[mypoint-kp3+1,2])
a<-table.element(a,gqarr[mypoint-kp3+1,3])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable5.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Description',header=TRUE)
a<-table.element(a,'# significant tests',header=TRUE)
a<-table.element(a,'% significant tests',header=TRUE)
a<-table.element(a,'OK/NOK',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'1% type I error level',header=TRUE)
a<-table.element(a,numsignificant1)
a<-table.element(a,numsignificant1/numgqtests)
if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'5% type I error level',header=TRUE)
a<-table.element(a,numsignificant5)
a<-table.element(a,numsignificant5/numgqtests)
if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'10% type I error level',header=TRUE)
a<-table.element(a,numsignificant10)
a<-table.element(a,numsignificant10/numgqtests)
if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable6.tab')
}
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by