Home » date » 2010 » Nov » 22 »

w7 3

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Mon, 22 Nov 2010 19:27:20 +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/22/t1290453992i8ym080pgurf738.htm/, Retrieved Mon, 22 Nov 2010 20:26:44 +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/22/t1290453992i8ym080pgurf738.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 «
9 24 14 11 12 24 26 9 25 11 7 8 25 23 9 17 6 17 8 30 25 9 18 12 10 8 19 23 9 18 8 12 9 22 19 9 16 10 12 7 22 29 10 20 10 11 4 25 25 10 16 11 11 11 23 21 10 18 16 12 7 17 22 10 17 11 13 7 21 25 10 23 13 14 12 19 24 10 30 12 16 10 19 18 10 23 8 11 10 15 22 10 18 12 10 8 16 15 10 15 11 11 8 23 22 10 12 4 15 4 27 28 10 21 9 9 9 22 20 10 15 8 11 8 14 12 10 20 8 17 7 22 24 10 31 14 17 11 23 20 10 27 15 11 9 23 21 10 34 16 18 11 21 20 10 21 9 14 13 19 21 10 31 14 10 8 18 23 10 19 11 11 8 20 28 10 16 8 15 9 23 24 10 20 9 15 6 25 24 10 21 9 13 9 19 24 10 22 9 16 9 24 23 10 17 9 13 6 22 23 10 24 10 9 6 25 29 10 25 16 18 16 26 24 10 26 11 18 5 29 18 10 25 8 12 7 32 25 10 17 9 17 9 25 21 10 32 16 9 6 29 26 10 33 11 9 6 28 22 10 13 16 12 5 17 22 10 32 12 18 12 28 22 10 25 12 12 7 29 23 10 29 14 18 10 26 30 10 22 9 14 9 25 23 10 18 10 15 8 14 17 10 17 9 16 5 25 23 10 20 10 10 8 26 23 10 15 12 11 8 20 25 10 20 14 14 10 18 24 10 33 14 9 6 32 24 10 29 10 12 8 25 23 10 23 14 17 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
ConcernoverMistakes[t] = -20.5406175778355 + 1.85205065543316Month[t] + 0.800753683595022Doubtsaboutactions[t] + 0.233892111076656ParentalExpectations[t] + 0.208449774615658ParentalCriticism[t] + 0.571250810176502PersonalStandards[t] -0.108334921483046Organization[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-20.540617577835519.256187-1.06670.2877980.143899
Month1.852050655433161.8962850.97670.3302830.165141
Doubtsaboutactions0.8007536835950220.1307076.126300
ParentalExpectations0.2338921110766560.1339641.74590.0828440.041422
ParentalCriticism0.2084497746156580.1695171.22970.220720.11036
PersonalStandards0.5712508101765020.0959755.952100
Organization-0.1083349214830460.103317-1.04860.2960390.148019


Multiple Linear Regression - Regression Statistics
Multiple R0.64099331025021
R-squared0.410872423785522
Adjusted R-squared0.387617387882319
F-TEST (value)17.6681053297763
F-TEST (DF numerator)6
F-TEST (DF denominator)152
p-value1.77635683940025e-15
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation4.47838506122403
Sum Squared Residuals3048.50177900237


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12423.30591189430180.694088105698213
22520.03053887537264.96946112462742
31721.0052757760804-4.00527577608043
41818.1054640311386-0.105464031138574
51817.72577540998910.274224590010878
61617.8270340131174-1.82703401311742
72020.9669353500886-0.96693535008862
81622.5176755215724-6.51767552157242
91822.3856971696195-4.3856971696195
101720.5758193389779-3.57581933897792
112322.41930099145290.580699008547053
123022.31944150967827.6805584903218
132315.22862329327667.77137670672336
141819.1104416279066-1.11044162790658
151521.7839912762424-6.7839912762424
161217.9154785487290-5.91547854872898
172119.56856849430431.43143150569570
181515.3238221486993-0.323822148699278
192019.7887124641590.211287535840979
203126.43162416030054.56837583969953
212725.30379070672121.69620929327880
223427.12452201821426.87547798178583
232119.74974079613771.25025920386235
243120.987771243585310.0122287564147
251919.4202293168146-0.420229316814625
261620.3090786014135-4.30907860141353
272021.6269845815146-1.62698458151458
282118.35704482214922.64295517785077
292222.0233101277448-0.0233101277447521
301719.5537828503148-2.55378285031481
312420.48271099123443.51728900876556
322530.5896852562428-5.58968525624278
332626.6567312769232-0.656731276923215
342524.22342508905770.776574910942284
351723.045122891964-6.045122891964
363227.89724109795974.10275890204028
373323.75556155574039.2444384442597
381321.9687976203882-8.96879762038819
393227.91204288671924.08795711328085
402525.9293572358744-0.92935723587439
412927.08746971246051.91253028753948
422222.1267767157679-0.126776715767942
431817.31922335278070.680776647219285
441721.7607618394586-4.76076183945862
452022.3547629906172-2.35476299061719
461520.5459877648588-5.54598776485879
472022.2319043156402-2.23190431564015
483328.22615600426534.77384399573473
492922.2512964025946.748703597406
502326.6319917607078-3.63199176070780
512623.33393808632892.66606191367114
521819.0572045568099-1.05720455680992
532018.85336774429631.14663225570374
541111.8569662519076-0.856966251907644
552829.1391504790434-1.13915047904336
562623.43229711430432.56770288569571
572222.3892075268383-0.389207526838316
581720.2377578196325-3.23775781963249
591215.5903486600183-3.59034866001829
601420.9635424700856-6.96354247008556
611720.8710718404720-3.87107184047204
622121.3887032327798-0.388703232779788
631922.9992127997300-3.99921279972996
641823.2468530520286-5.24685305202855
651017.9645501066114-7.96455010661136
662924.39418483978984.60581516021023
673118.593809572314712.4061904276853
681923.0436062933947-4.04360629339472
69920.1246989779693-11.1246989779693
702022.6014881321463-2.60148813214627
712817.693420131388810.3065798686112
721918.25541337044730.744586629552658
733023.17816568274856.82183431725153
742927.1412651905231.85873480947699
752621.51864966003154.48135033996846
762319.61171219467763.38828780532242
771322.7696306151473-9.76963061514733
782122.7069504145405-1.70695041454046
791921.5925083983795-2.59250839837945
802822.97737756951745.0226224304826
812325.6717631113499-2.67176311134987
821813.91937831127614.0806216887239
832120.76752594128470.232474058715270
842021.8939221074588-1.89392210745884
852320.03254882182932.96745117817070
862120.81457978351440.185420216485572
872121.8549708563638-0.854970856363823
881522.9601236544928-7.96012365449284
892827.28990740362070.710092596379342
901917.68950998953241.31049001046759
912621.24375395623234.75624604376766
921013.3592202085389-3.35922020853889
931617.1550179477001-1.15501794770007
942221.14732552051230.852674479487721
951918.91520723051540.0847927694845566
963128.86387540753292.13612459246710
973125.2303794172615.769620582739
982924.82237582056174.17762417943829
991917.46000711611391.53999288388611
1002218.91977252836733.08022747163268
1012322.44404050766840.555959492331634
1021516.2213007844847-1.22130078448470
1032021.4067774452657-1.40677744526569
1041819.5916965986423-1.59169659864227
1052322.13105499534800.868945004652039
1062520.89174259250284.10825740749719
1072116.62480889629774.37519110370226
1082419.54050889011234.4594911098877
1092525.2842542064876-0.28425420648761
1101719.5415733289438-2.54157332894384
1111314.5909200347790-1.59092003477896
1122818.31206598545469.68793401454535
1132120.32721598029360.672784019706407
1142528.2402549727791-3.24025497277913
115921.0230657884603-12.0230657884603
1161617.8649936604446-1.86499366044458
1171921.1927565169446-2.19275651694460
1181719.5105598387774-2.51055983877741
1192524.54234989280720.457650107192842
1202015.51102203613224.4889779638678
1212921.72837616400277.27162383599734
1221419.0319382805427-5.03193828054267
1232226.9807843689066-4.98078436890655
1241515.7566129258641-0.756612925864103
1251925.4706403155968-6.47064031559684
1262021.9365074008663-1.93650740086629
1271517.5261183627755-2.52611836277546
1282021.9219024004867-1.92190240048672
1291820.3175223942078-2.31752239420782
1303325.57499999310787.42500000689216
1312223.8817153183514-1.88171531835137
1321616.5259552703765-0.525955270376549
1331719.1237948992732-2.12379489927320
1341615.11555793247580.884442067524158
1352117.11003911100553.88996088899452
1362627.6211796228832-1.62117962288317
1371821.1341578075379-3.13415780753787
1381823.0934916296008-5.0934916296008
1391718.4649006478306-1.46490064783056
1402224.8487332677922-2.84873326779221
1413024.79359725135425.20640274864582
1423027.36471781443442.63528218556562
1432429.8857645038554-5.88576450385543
1442122.0669167791498-1.06691677914980
1452125.4142006337394-4.41420063373936
1462927.43919354272611.56080645727388
1473123.26179273493017.7382072650699
1482019.04820235704980.95179764295021
1491614.17357955579761.82642044420244
1502219.00322352035522.99677647964479
1512020.5031787470075-0.503178747007479
1522827.31180121681120.688198783188795
1533826.58362302307111.416376976929
1542219.26560666717552.73439333282454
1552025.7191898021532-5.71918980215318
1561718.0567002627514-1.05670026275140
1572824.54083329423793.45916670576212
1582224.1667158267939-2.16671582679388
1593126.11565976166314.8843402383369


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.09706704118348920.1941340823669780.90293295881651
110.3523937315236140.7047874630472280.647606268476386
120.741566177881040.5168676442379210.258433822118961
130.7546971831618020.4906056336763970.245302816838198
140.7254484767998240.5491030464003530.274551523200176
150.7222331260299960.5555337479400070.277766873970004
160.6523287250372230.6953425499255540.347671274962777
170.5723867571705250.855226485658950.427613242829475
180.5418594976379090.9162810047241830.458140502362091
190.4746768820354040.9493537640708080.525323117964596
200.5058427191870530.9883145616258940.494157280812947
210.4595367988993270.9190735977986550.540463201100673
220.4615022656115020.9230045312230050.538497734388498
230.3959674323419810.7919348646839630.604032567658019
240.6503967961502250.6992064076995490.349603203849775
250.5814704078358770.8370591843282460.418529592164123
260.552969220894670.8940615582106590.447030779105330
270.4892333828740320.9784667657480640.510766617125968
280.4394438196187580.8788876392375160.560556180381242
290.3755973176336090.7511946352672190.624402682366391
300.3202727906892240.6405455813784490.679727209310776
310.3629620800756570.7259241601513140.637037919924343
320.4384682808619960.8769365617239910.561531719138004
330.3923908743408210.7847817486816420.607609125659179
340.3861762224596610.7723524449193220.613823777540339
350.4024822347189310.8049644694378620.597517765281069
360.3831703545198480.7663407090396970.616829645480152
370.5397889760306880.9204220479386230.460211023969312
380.7376722030954310.5246555938091380.262327796904569
390.7285821679184440.5428356641631120.271417832081556
400.6868421397651520.6263157204696950.313157860234848
410.6576620025556650.6846759948886690.342337997444335
420.6057467149323710.7885065701352580.394253285067629
430.5565640123475080.8868719753049830.443435987652492
440.541855768363440.916288463273120.45814423163656
450.5155875849873650.968824830025270.484412415012635
460.5469266133009410.9061467733981190.453073386699059
470.5065035837407210.9869928325185580.493496416259279
480.4915276700125130.9830553400250270.508472329987487
490.5470424094874880.9059151810250230.452957590512512
500.5224991616397470.9550016767205060.477500838360253
510.4855414435183180.9710828870366360.514458556481682
520.4368307603278950.873661520655790.563169239672105
530.3948040599089580.7896081198179160.605195940091042
540.3502596862864770.7005193725729540.649740313713523
550.3118524346005220.6237048692010440.688147565399478
560.2822231878659350.564446375731870.717776812134065
570.2419653792227390.4839307584454780.758034620777261
580.2202492497407230.4404984994814460.779750750259277
590.2061169261575810.4122338523151630.793883073842419
600.2587333467365390.5174666934730790.74126665326346
610.2525009302931990.5050018605863970.747499069706801
620.2165920987111330.4331841974222650.783407901288867
630.2054603211361680.4109206422723350.794539678863832
640.2463127265104320.4926254530208640.753687273489568
650.3219235874853270.6438471749706540.678076412514673
660.3202506915878160.6405013831756320.679749308412184
670.6420223536470230.7159552927059530.357977646352977
680.637200125177770.725599749644460.36279987482223
690.8266019964675020.3467960070649960.173398003532498
700.8068219686981550.3863560626036900.193178031301845
710.919416165358110.161167669283780.08058383464189
720.9009752033729130.1980495932541740.0990247966270872
730.9254246520089450.1491506959821110.0745753479910554
740.911830087824750.1763398243504990.0881699121752496
750.9135333219133990.1729333561732030.0864666780866014
760.905613102717340.1887737945653210.0943868972826603
770.962709409449630.07458118110073890.0372905905503694
780.9539360111987650.09212797760246950.0460639888012347
790.9456252896303450.108749420739310.054374710369655
800.9485718978755230.1028562042489540.0514281021244768
810.939915985905970.1201680281880620.060084014094031
820.9385156749491290.1229686501017420.061484325050871
830.9233385316367650.1533229367264710.0766614683632353
840.908823036675180.182353926649640.09117696332482
850.8985615779932490.2028768440135030.101438422006751
860.8810927302868740.2378145394262520.118907269713126
870.8573424373495970.2853151253008050.142657562650403
880.909265767454570.1814684650908580.0907342325454292
890.891232397727670.2175352045446590.108767602272329
900.869291299282840.2614174014343200.130708700717160
910.8715605388889330.2568789222221350.128439461111067
920.8608194275341910.2783611449316170.139180572465809
930.8372287299934190.3255425400131620.162771270006581
940.8079727354703170.3840545290593650.192027264529683
950.7732820940468610.4534358119062780.226717905953139
960.7420484505183240.5159030989633520.257951549481676
970.7621318022241810.4757363955516380.237868197775819
980.756060624930660.487878750138680.24393937506934
990.7192751377394330.5614497245211330.280724862260567
1000.6937075540770250.6125848918459510.306292445922975
1010.6499134249314410.7001731501371170.350086575068559
1020.6104304153024740.7791391693950520.389569584697526
1030.5708582117825880.8582835764348240.429141788217412
1040.5284045659273710.9431908681452570.471595434072629
1050.4818238902379350.963647780475870.518176109762065
1060.4624159195561060.9248318391122120.537584080443894
1070.4578279697095250.915655939419050.542172030290475
1080.4678946111208090.9357892222416190.53210538887919
1090.4180484714399140.836096942879830.581951528560086
1100.3946709846202360.7893419692404730.605329015379764
1110.3558516400834660.7117032801669330.644148359916534
1120.5752234395915210.8495531208169570.424776560408479
1130.5673438708425450.865312258314910.432656129157455
1140.5393894291358550.9212211417282890.460610570864145
1150.7571702979817520.4856594040364970.242829702018248
1160.7329947012418050.534010597516390.267005298758195
1170.7205939496000640.5588121007998720.279406050399936
1180.6917327277600390.6165345444799230.308267272239961
1190.6408490525831830.7183018948336340.359150947416817
1200.6497517109130550.7004965781738890.350248289086945
1210.7020471644376510.5959056711246970.297952835562349
1220.7066197462562590.5867605074874820.293380253743741
1230.7123835515225260.5752328969549480.287616448477474
1240.6591790318696740.6816419362606530.340820968130326
1250.7051892455662050.589621508867590.294810754433795
1260.6753406703454730.6493186593090540.324659329654527
1270.6636775751517140.6726448496965710.336322424848286
1280.6271862085351150.745627582929770.372813791464885
1290.5997998025579530.8004003948840940.400200197442047
1300.6706639022525950.658672195494810.329336097747405
1310.612975071225680.7740498575486390.387024928774320
1320.5486312494142140.9027375011715720.451368750585786
1330.5465045273716840.9069909452566320.453495472628316
1340.4850634851079970.9701269702159950.514936514892003
1350.4425242411045130.8850484822090250.557475758895487
1360.413629289551520.827258579103040.58637071044848
1370.4172169583978580.8344339167957160.582783041602142
1380.4570914219548540.9141828439097090.542908578045145
1390.3892987441054660.7785974882109330.610701255894534
1400.3171946465217060.6343892930434130.682805353478294
1410.4194161283338520.8388322566677050.580583871666148
1420.3650626141949550.7301252283899090.634937385805045
1430.2968768573865530.5937537147731060.703123142613447
1440.2228583556791690.4457167113583380.777141644320831
1450.2664017075775650.532803415155130.733598292422435
1460.1837295032859990.3674590065719990.816270496714
1470.2387194256747620.4774388513495250.761280574325238
1480.1475795712728910.2951591425457830.852420428727109
1490.07898494244129490.1579698848825900.921015057558705


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 level20.0142857142857143OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290453992i8ym080pgurf738/10are81290454029.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290453992i8ym080pgurf738/10are81290454029.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290453992i8ym080pgurf738/1wzyy1290454029.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290453992i8ym080pgurf738/1wzyy1290454029.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290453992i8ym080pgurf738/2wzyy1290454029.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290453992i8ym080pgurf738/2wzyy1290454029.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290453992i8ym080pgurf738/3wzyy1290454029.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290453992i8ym080pgurf738/3wzyy1290454029.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290453992i8ym080pgurf738/4wzyy1290454029.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290453992i8ym080pgurf738/4wzyy1290454029.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290453992i8ym080pgurf738/5p9xk1290454029.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290453992i8ym080pgurf738/5p9xk1290454029.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290453992i8ym080pgurf738/6p9xk1290454029.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290453992i8ym080pgurf738/6p9xk1290454029.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290453992i8ym080pgurf738/70ixn1290454029.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290453992i8ym080pgurf738/70ixn1290454029.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290453992i8ym080pgurf738/80ixn1290454029.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290453992i8ym080pgurf738/80ixn1290454029.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290453992i8ym080pgurf738/9are81290454029.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290453992i8ym080pgurf738/9are81290454029.ps (open in new window)


 
Parameters (Session):
par1 = 4 ; 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