Home » date » 2010 » Nov » 21 »

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

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


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time9 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
CM[t] = -1.97155708164813 + 0.810124516285502D[t] + 0.251253601241107PE[t] + 0.188518804715737PC[t] + 0.566064813317673PS[t] -0.115718741599822O[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.971557081648133.052906-0.64580.5193780.259689
D0.8101245162855020.1303356.215700
PE0.2512536012411070.132761.89250.0603070.030154
PC0.1885188047157370.1682591.12040.2642940.132147
PS0.5660648133176730.0958135.90800
O-0.1157187415998220.103024-1.12320.2631030.131551


Multiple Linear Regression - Regression Statistics
Multiple R0.638102890589065
R-squared0.40717529897812
Adjusted R-squared0.387801942735575
F-TEST (value)21.0172823893021
F-TEST (DF numerator)5
F-TEST (DF denominator)153
p-value5.55111512312578e-16
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation4.47771018087769
Sum Squared Residuals3067.63293498216


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12424.9730696546186-0.973069654618646
22521.69682752005193.30317247994806
31722.7576275344242-5.75762753442423
41819.8643239601547-1.86432396015473
51819.475921308563-1.47592130856298
61619.5619453157043-3.56194531570428
72020.9062047066683-0.906204706668275
81622.3667061957279-6.36670619572788
91822.4023995380277-4.40239953802769
101720.5201335863125-3.52013358631251
112322.31781935866780.682180641332218
123022.3274768850327.67252311496805
132315.10357659401447.89642340598557
141819.0918794530003-1.09187945300029
151521.6854310399808-6.68543103998085
161217.8354454157556-5.83544541575557
172119.41656627952531.58343372047466
181515.3176615872635-0.317661587263507
192019.77655799733790.223442002662073
203126.42032009363084.57967990636915
212725.23016665143841.76983334856159
223427.15969310080766.84030689919238
232119.6129963230411.38700367695902
243120.918508179408110.0814918205919
251919.2929241504289-0.292924150428893
261620.2171532176049-4.21715321760486
272021.5938509463785-1.5938509463785
282118.26051127813752.73948872186254
292221.9603148900490.039685109951034
301719.5088680455431-2.50886804554309
312420.31786014721823.68213985278175
322530.4697362245754-5.46973622457538
332626.7379136808267-0.737913680826711
342524.06521938270930.934780617290694
351723.0090707878074-6.00907078780739
363227.79002272300144.20997727699858
373323.63621029465559.36378970534447
381322.0253619285962-9.02536192859621
393227.83873005040544.16126994959459
402525.8389604910979-0.838960491097936
412927.0240619141111.97593808588899
422222.0238725008844-0.0238725008844258
431817.36433131679980.635668683200175
441721.7723044845037-4.77230448450369
452022.2065286208074-2.20652862080744
461520.4502048915139-5.45020489151386
472022.1848414522041-2.18484145220414
483328.09940561358314.90059438641692
492922.1429710099726.85702899002802
502326.6826557598034-3.68265575980342
512623.24301931189912.75698068810088
521818.952868498816-0.95286849881596
532018.73405323538451.2659467646155
541111.7902591765424-0.790259176542405
552828.9774711402709-0.977471140270937
562623.31296729591192.68703270408813
572222.2461608568904-0.24616085689036
581720.1978454987339-3.19784549873386
591215.4254660880949-3.42546608809486
601421.0281654373449-7.02816543734494
611720.7238630018849-3.72386300188489
622121.3354034468641-0.335403446864113
631922.9325499189927-3.93254991899267
641823.0750654036623-5.0750654036623
651017.9297721146776-7.92977211467762
662924.22013599709424.77986400290577
673118.45755519460712.542444805393
681922.9476672047626-3.94766720476257
69920.0659733838091-11.0659733838091
702022.4704044418167-2.47040444181673
712817.619597847696710.3804021523033
721918.12630763197670.873692368023276
733023.06009950396146.93990049603859
742927.1345419863581.86545801364201
752621.47813220477874.52186779522132
762319.54408442658333.45591557341674
771322.7619883304533-9.76198833045328
782122.6403328681881-1.64033286818809
791921.4342707638265-2.43427076382649
802822.94303025966695.05696974033307
812325.5488853193873-2.54888531938727
821813.7755446122484.22445538775199
832120.73380350547790.266196494522131
842021.7890552501971-1.78905525019705
852319.9536344096973.04636559030299
862120.8235483183180.176451681682022
872121.7765070663015-0.776507066301508
881522.8032661951564-7.80326619515638
892827.1471956440370.852804355962999
901917.65737118191451.3426288180855
912621.2417390294554.75826097054501
921013.1981887926427-3.1981887926427
931617.1052598018456-1.10525980184556
942221.16865598911030.831344010889731
951918.73149628220690.26850371779314
963128.77362610842912.22637389157087
973125.19904737841265.8009526215874
982924.8021196150674.19788038493298
991917.41331147894671.58668852105333
1002218.89464588438873.10535411561134
1012322.37307727969110.62692272030893
1021516.1706084549776-1.1706084549776
1032021.4483664364161-1.44836643641609
1041819.5049798788849-1.5049798788849
1052321.98461656711711.01538343288295
1062520.96389048598294.03610951401714
1072116.56355472657824.43644527342175
1082419.49049875725164.5095012427484
1092525.2360293362311-0.23602933623114
1101719.5772208157054-2.57722081570542
1111314.5703651925901-1.57036519259012
1122818.20363916640489.79636083359519
1132120.11560899930670.884391000693341
1142528.140636065485-3.14063606548499
115920.7272742072834-11.7272742072834
1161617.8284411696244-1.82844116962435
1171921.2002096254339-2.2002096254339
1181719.4548480129136-2.45484801291361
1192524.51183550200020.488164497999802
1202015.55841555861624.44158444138375
1212921.62453585610657.37546414389351
1221419.0460894061991-5.04608940619911
1232226.9144076581427-4.9144076581427
1241515.5764012107348-0.576401210734847
1251925.4228566000411-6.42285660004114
1262021.9451042791923-1.94510427919232
1271517.452226374503-2.45222637450297
1282021.7886208868992-1.78862088689923
1291820.2225815390998-2.22258153909977
1303325.46684280399097.5331571960091
1312223.7824344363272-1.78243443632724
1321616.4697006570271-0.46970065702706
1331719.0367506268633-2.03675062686334
1341615.0524322615910.94756773840901
1352117.04838769011293.95161230988708
1362627.6421945331063-1.64219453310631
1371821.1470742942904-3.14707429429043
1381823.0959206112274-5.09592061122736
1391718.3312627872462-1.33126278724619
1402224.7434940752527-2.74349407525273
1413024.72756612386955.27243387613054
1423027.27399645056832.72600354943171
1432429.9008223341231-5.90082233412311
1442121.9917911761762-0.991791176176224
1452125.3787580941457-4.3787580941457
1462927.39183778204791.60816221795207
1473123.2405082710077.75949172899296
1482018.97597105925841.0240289407416
1491614.18758051463531.81241948536466
1502218.91909894752583.08090105247424
1512020.3316462195076-0.331646219507597
1522827.32694895773190.673051042268083
1533826.595805936383511.4041940636165
1542219.33483336442922.66516663557078
1552025.6868097712468-5.68680977124681
1561718.0421110887897-1.04211108878971
1572824.45043191895543.54956808104462
1582224.1216672736301-2.12166727363008
1593126.08928147235674.91071852764329


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.2113960233023270.4227920466046550.788603976697673
100.1020763753425880.2041527506851750.897923624657412
110.2272380381920750.4544760763841490.772761961807925
120.6516882361919510.6966235276160980.348311763808049
130.6673072325423310.6653855349153380.332692767457669
140.6420154149810760.7159691700378480.357984585018924
150.6474213299422290.7051573401155420.352578670057771
160.582007170180210.835985659639580.41799282981979
170.4974416798337970.9948833596675940.502558320166203
180.4668537175174820.9337074350349640.533146282482518
190.403185159454760.806370318909520.59681484054524
200.4376092172551570.8752184345103150.562390782744843
210.396901525097770.793803050195540.60309847490223
220.4007779696537930.8015559393075850.599222030346207
230.3387699516316920.6775399032633850.661230048368308
240.6033415677282860.7933168645434290.396658432271714
250.533551201044860.9328975979102810.46644879895514
260.5035440241504270.9929119516991470.496455975849573
270.4417309983698710.8834619967397410.558269001630129
280.3951831675487850.790366335097570.604816832451215
290.3349775204123840.6699550408247670.665022479587616
300.2829189677787490.5658379355574970.717081032221252
310.3429018151285170.6858036302570340.657098184871483
320.4042320700720380.8084641401440760.595767929927962
330.3603988805327850.720797761065570.639601119467215
340.3706313728358480.7412627456716970.629368627164152
350.3853071543426160.7706143086852310.614692845657384
360.3759496983599780.7518993967199550.624050301640022
370.5549897033900570.8900205932198850.445010296609942
380.7584657462238270.4830685075523460.241534253776173
390.7545179416165120.4909641167669760.245482058383488
400.7126200474291360.5747599051417280.287379952570864
410.687613723321830.624772553356340.31238627667817
420.6381735776537390.7236528446925230.361826422346261
430.5895753437708540.8208493124582930.410424656229147
440.576187266799630.847625466400740.42381273320037
450.5417375471660.9165249056680.458262452834
460.563830488846730.872339022306540.43616951115327
470.5228104281635160.9543791436729680.477189571836484
480.5132263360401520.9735473279196960.486773663959848
490.5781190982572910.8437618034854180.421880901742709
500.5572045651713530.8855908696572940.442795434828647
510.5218326102529950.956334779494010.478167389747005
520.4725186986921830.9450373973843670.527481301307816
530.4343880243849040.8687760487698090.565611975615096
540.3875974418534480.7751948837068950.612402558146552
550.3447994330060130.6895988660120250.655200566993987
560.317679472653810.635358945307620.68232052734619
570.2747521586034920.5495043172069850.725247841396508
580.2511059244539740.5022118489079480.748894075546026
590.2314343197213690.4628686394427370.768565680278631
600.2901440782193610.5802881564387230.709855921780639
610.2784971865247180.5569943730494370.721502813475282
620.2412489614241530.4824979228483060.758751038575847
630.2286751236501960.4573502473003930.771324876349804
640.2625362638972050.525072527794410.737463736102795
650.3388384144525320.6776768289050650.661161585547468
660.3415592785387610.6831185570775220.658440721461239
670.674526217673850.6509475646522990.325473782326149
680.6672981476756110.6654037046487770.332701852324389
690.8442068400413780.3115863199172430.155793159958622
700.824478189179530.351043621640940.17552181082047
710.9305284986215070.1389430027569870.0694715013784935
720.9142375319136360.1715249361727280.0857624680863639
730.9374225765849640.1251548468300720.0625774234150359
740.925574321233510.1488513575329790.0744256787664894
750.9273220425530020.1453559148939970.0726779574469984
760.9210024044478750.157995191104250.078997595552125
770.970096122990050.0598077540198990.0299038770099495
780.9627371234349920.07452575313001510.0372628765650076
790.9553221127204190.08935577455916220.0446778872795811
800.9580010692352870.08399786152942550.0419989307647127
810.9503272401933870.09934551961322680.0496727598066134
820.9500097695588780.09998046088224390.0499902304411219
830.9371893773116470.1256212453767060.0628106226883528
840.9244295166649790.1511409666700420.0755704833350211
850.9159516728922380.1680966542155250.0840483271077623
860.9006531811342390.1986936377315220.0993468188657611
870.8797100421322960.2405799157354080.120289957867704
880.9237274000228140.1525451999543730.0762725999771865
890.9077949479771050.1844101040457910.0922050520228953
900.888521028335510.2229579433289790.11147897166449
910.8903485081722570.2193029836554870.109651491827743
920.879723294041730.2405534119165390.12027670595827
930.8584863885676740.2830272228646520.141513611432326
940.831802333240560.3363953335188810.168197666759441
950.7998917411512730.4002165176974530.200108258848727
960.7713635890097150.457272821980570.228636410990285
970.7904457067976120.4191085864047760.209554293202388
980.7852534165610850.4294931668778290.214746583438915
990.7513156992978260.4973686014043490.248684300702174
1000.7277723553648090.5444552892703830.272227644635191
1010.6864158629623090.6271682740753820.313584137037691
1020.6486695842340220.7026608315319560.351330415765978
1030.6106887359428070.7786225281143870.389311264057193
1040.5689125131836820.8621749736326370.431087486816318
1050.5233482611138840.9533034777722320.476651738886116
1060.503744802868190.992510394263620.49625519713181
1070.5006014968088180.9987970063823640.499398503191182
1080.5120668888361960.9758662223276070.487933111163804
1090.4619706071906060.9239412143812120.538029392809394
1100.4388719527451310.8777439054902620.561128047254869
1110.3992451119491250.798490223898250.600754888050876
1120.6224640031835920.7550719936328160.377535996816408
1130.61435043167660.77129913664680.3856495683234
1140.5860122340607280.8279755318785440.413987765939272
1150.7879950573792450.4240098852415110.212004942620755
1160.7660028407470510.4679943185058980.233997159252949
1170.7550532828315690.4898934343368630.244946717168431
1180.7283100276160580.5433799447678850.271689972383942
1190.6805217232468620.6389565535062760.319478276753138
1200.6898216869524180.6203566260951640.310178313047582
1210.7412504567360660.5174990865278670.258749543263934
1220.7463110920562030.5073778158875940.253688907943797
1230.7520664555156740.4958670889686520.247933544484326
1240.7027228659240830.5945542681518340.297277134075917
1250.7466719360720110.5066561278559780.253328063927989
1260.7197101758597930.5605796482804150.280289824140207
1270.7097206993921580.5805586012156840.290279300607842
1280.6760296791451590.6479406417096820.323970320854841
1290.6508809551557090.6982380896885820.349119044844291
1300.720462230266050.5590755394679010.27953776973395
1310.6669860570993350.666027885801330.333013942900665
1320.6062302143605450.787539571278910.393769785639455
1330.6058951725096340.7882096549807330.394104827490366
1340.5469647779203110.9060704441593780.453035222079689
1350.5062124791455980.9875750417088030.493787520854402
1360.4788697788589940.9577395577179870.521130221141006
1370.4851433508719940.9702867017439890.514856649128006
1380.5287334868851510.94253302622970.47126651311485
1390.461648300276760.9232966005535190.53835169972324
1400.3875089209721580.7750178419443150.612491079027842
1410.5003989923338270.9992020153323450.499601007666173
1420.4477314301060210.8954628602120420.552268569893979
1430.3779897607247860.7559795214495730.622010239275214
1440.2980098463753710.5960196927507420.701990153624629
1450.3552632752933760.7105265505867510.644736724706624
1460.2629508766098580.5259017532197160.737049123390142
1470.3405733357360290.6811466714720580.659426664263971
1480.2349212715407720.4698425430815450.765078728459228
1490.1460779735049840.2921559470099690.853922026495016
1500.09191941347048930.1838388269409790.90808058652951


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.0422535211267606OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290332008tm0mnol5qep763b/107gb31290331955.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290332008tm0mnol5qep763b/107gb31290331955.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290332008tm0mnol5qep763b/185bw1290331954.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290332008tm0mnol5qep763b/185bw1290331954.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290332008tm0mnol5qep763b/2jfah1290331954.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290332008tm0mnol5qep763b/2jfah1290331954.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290332008tm0mnol5qep763b/3jfah1290331954.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290332008tm0mnol5qep763b/3jfah1290331954.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290332008tm0mnol5qep763b/4jfah1290331954.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290332008tm0mnol5qep763b/4jfah1290331954.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290332008tm0mnol5qep763b/5jfah1290331954.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290332008tm0mnol5qep763b/5jfah1290331954.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290332008tm0mnol5qep763b/6uoa21290331954.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290332008tm0mnol5qep763b/6uoa21290331954.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290332008tm0mnol5qep763b/74xq51290331954.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290332008tm0mnol5qep763b/74xq51290331954.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290332008tm0mnol5qep763b/84xq51290331954.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290332008tm0mnol5qep763b/84xq51290331954.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290332008tm0mnol5qep763b/94xq51290331954.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290332008tm0mnol5qep763b/94xq51290331954.ps (open in new window)


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





Copyright

Creative Commons License

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

Software written by Ed van Stee & Patrick Wessa


Disclaimer

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


Privacy Policy

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

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

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

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

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

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

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

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

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


FreeStatistics.org is powered by