Home » date » 2010 » Nov » 26 »

*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 09:19:18 +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/t1290763103cz6u52h9qf6vsre.htm/, Retrieved Fri, 26 Nov 2010 10:18:33 +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/t1290763103cz6u52h9qf6vsre.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 26 24 14 11 12 24 9 23 25 11 7 8 25 9 25 17 6 17 8 30 9 23 18 12 10 8 19 9 19 18 8 12 9 22 10 29 16 10 12 7 22 10 25 20 10 11 4 25 10 21 16 11 11 11 23 10 22 18 16 12 7 17 10 25 17 11 13 7 21 10 24 23 13 14 12 19 10 18 30 12 16 10 19 10 22 23 8 11 10 15 10 15 18 12 10 8 16 10 22 15 11 11 8 23 10 28 12 4 15 4 27 10 20 21 9 9 9 22 10 12 15 8 11 8 14 10 24 20 8 17 7 22 10 20 31 14 17 11 23 10 21 27 15 11 9 23 10 20 34 16 18 11 21 10 21 21 9 14 13 19 10 23 31 14 10 8 18 10 28 19 11 11 8 20 10 24 16 8 15 9 23 10 24 20 9 15 6 25 10 24 21 9 13 9 19 10 23 22 9 16 9 24 10 23 17 9 13 6 22 10 29 24 10 9 6 25 10 24 25 16 18 16 26 10 18 26 11 18 5 29 10 25 25 8 12 7 32 10 21 17 9 17 9 25 10 26 32 16 9 6 29 10 22 33 11 9 6 28 10 22 13 16 12 5 17 10 22 32 12 18 12 28 10 23 25 12 12 7 29 10 30 29 14 18 10 26 10 23 22 9 14 9 25 10 17 18 10 15 8 14 10 23 17 9 16 5 25 10 23 20 10 10 8 26 10 25 15 12 11 8 20 10 24 20 14 14 10 18 10 24 33 14 9 6 32 10 23 29 10 12 8 25 10 21 23 14 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
O[t] = + 6.67822358754374 + 1.09089428266750maand[t] -0.0608903034875092CM[t] + 0.214416815593605D[t] -0.142213186036547PE[t] -0.240815534408649PC[t] + 0.399817197705633PS[t] -0.016068024633864t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)6.6782235875437416.6400620.40130.6887420.344371
maand1.090894282667501.6695450.65340.5144870.257243
CM-0.06089030348750920.062235-0.97840.3294440.164722
D0.2144168155936050.111071.93050.0554230.027711
PE-0.1422131860365470.103898-1.36880.1731020.086551
PC-0.2408155344086490.129923-1.85350.0657590.03288
PS0.3998171977056330.0755515.29200
t-0.0160680246338640.006317-2.54380.0119710.005986


Multiple Linear Regression - Regression Statistics
Multiple R0.504343958942387
R-squared0.254362828921680
Adjusted R-squared0.219796867348513
F-TEST (value)7.35876617762421
F-TEST (DF numerator)7
F-TEST (DF denominator)151
p-value1.34744991164837e-07
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.44924263771775
Sum Squared Residuals1796.48849085136


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12623.16215352715712.83784647284293
22324.3738768317412-1.37387683174123
32524.34980128520210.650198714797901
42322.15684697813620.843153021863775
51921.9573213777631-2.9573213777631
62924.06439294277634.93560705722375
72525.8688750865718-0.868875086571769
82123.8254419552097-2.82544195520972
92223.1818231669331-1.18182316693311
102523.61161697260471.38838302739528
112421.51311550474202.48688449525805
121821.0536032368461-3.05360323684612
132219.71789721361062.2821027863894
141521.8876094213482-6.88760942134818
152224.4963026894861-2.49630268948613
162825.15566605047052.84433394952951
172023.3137848280649-3.31378482806495
181220.206493389453-8.20649338945302
192422.47204784721601.52795215278396
202022.5092424378522-2.50924243785224
212124.2860626277986-3.28606262779861
222021.7814215278614-1.78142152786138
232120.34359701932750.656402980672472
242322.16382325627040.8361767437296
252822.89260963608065.10739036391945
262422.80574538969051.19425461030954
272424.2826139653374-0.282613965337378
282421.36873221982942.63126778017065
292322.86422032212650.135779677873497
302323.5020555808545-0.502055580854508
312925.04247658466483.95752341533522
322422.96376232939531.03623767060475
331825.6631423949179-7.66314239491789
342526.6358138675096-1.63581386750961
352123.3298677034300-2.32986770342995
362627.3607837179795-1.36078371797955
372225.8119241141845-3.81192411418451
382223.5019330388059-1.50193303880590
392223.3302833032171-1.33028330321708
402326.1976213889639-3.19762138896394
413023.59164846900516.40835153099488
422323.339579571665-0.339579571664999
431719.4821027501849-2.48210275018491
442324.2907308053963-1.29073080539632
452324.8370583965925-1.83705839659250
462523.01315914831301.98684085168695
472421.41356821509062.58643178490936
482427.8776950808154-3.87769508081536
492323.5405299968907-0.540529996890735
502124.2772206597823-3.27722065978226
512426.1366857961263-2.13668579612633
522422.34843365493561.65156634506439
532822.02518464121475.9748153587853
541621.5169173509197-5.51691735091971
552020.4789198645737-0.47891986457366
562923.85415798399145.1458420160086
572724.23803512193802.76196487806198
582223.4951552848874-1.49515528488743
592824.24661093775943.75338906224063
601620.8090179954004-4.80901799540038
612523.22334779542661.77665220457341
622423.75836878962570.241631210374305
632823.90988628270894.09011371729114
642424.5407734245581-0.540773424558101
652322.90611397204030.0938860279597174
663027.02977974127802.97022025872196
672421.64345290823862.3565470917614
682124.2871449575035-3.28714495750353
692523.44738027540111.55261972459895
702524.10774421259730.892255787402672
712221.06081967312650.939180326873492
722322.63363795128910.366362048710892
732623.01176958948992.98823041051014
742321.83555334415571.16444665584433
752523.14600696198681.85399303801315
762121.4729491641733-0.472949164173297
772523.66268651727531.33731348272467
782422.26581984199731.73418015800268
792923.58101790059895.41898209940105
802223.6571462351028-1.65714623510282
812723.62551803705273.37448196294728
822619.76608686435296.23391313564712
832221.36905684615630.630943153843703
842422.04684442194241.95315557805762
852723.07748635450943.92251364549055
862421.32042913066572.67957086933426
872424.6815444756721-0.681544475672106
882924.25101371006804.74898628993203
892222.1734213910241-0.173421391024079
902120.5329219745410.467078025459013
912420.42304718138723.57695281861276
922421.58601725265892.41398274734108
932321.79007625362251.20992374637753
942022.0992409303702-2.09924093037018
952721.25720040941125.74279959058881
962623.21909180412.78090819589998
972521.80947440374763.1905255962524
982119.98063719193581.01936280806420
992120.57371013494820.426289865051762
1001920.2063592950003-1.20635929500026
1012121.3624295145167-0.362429514516657
1022120.98086637592380.0191336240762448
1031619.5302432228548-3.53024322285476
1042220.39020893145411.60979106854587
1052921.52522582938497.47477417061509
1061521.3920032767024-6.39200327670237
1071720.3933948873818-3.3933948873818
1081519.6598038042491-4.65980380424906
1092121.3291392407309-0.329139240730866
1102120.63219049021050.36780950978947
1111918.93255005385080.0674499461492126
1122417.82946585153746.17053414846262
1132021.8748409742144-1.87484097421436
1141724.5188654204699-7.5188654204699
1152324.2858541101743-1.28585411017425
1162421.80767728693912.19232271306088
1171421.4880741641059-7.48807416410592
1181922.2861213929966-3.28612139299661
1192421.65009006320952.34990993679048
1201319.8964383041808-6.89643830418077
1212224.6721943043691-2.6721943043691
1221620.5376135192885-4.53761351928849
1231922.6285225854727-3.62852258547275
1242522.09488296349732.90511703650273
1252523.48319640784931.51680359215074
1262320.75538692605912.24461307394087
1272422.75909160967811.24090839032195
1282622.77598158612763.22401841387242
1292620.80037066723995.19962933276006
1302523.39515643371431.60484356628568
1311821.5991239299519-3.59912392995193
1322119.18568630267331.81431369732666
1332622.77210814775393.22789185224611
1342321.12866952896751.87133047103249
1352319.04744752692783.95255247307219
1362221.74901385158390.250986148416131
1372021.5223154968376-1.52231549683762
1381321.2268052627589-8.22680526275892
1392420.55617346527473.44382653472530
1401520.7442930612423-5.74429306124235
1411422.2452383177519-8.24523831775189
1422223.1051451975367-1.10514519753668
1431016.9966410249546-6.9966410249546
1442423.40751790512790.592482094872091
1452220.89522557790071.10477442209927
1462424.6919111512327-0.691911151232673
1471920.6777846956121-1.67778469561205
1482021.0671514035548-1.06715140355484
1491316.2728111632552-3.2728111632552
1502019.14991457267730.850085427322734
1512222.1075686181769-0.107568618176907
1522422.26424471480011.73575528519994
1532922.09602517007726.90397482992284
1541219.8635042296644-7.86350422966438
1552019.85814857464110.141851425358916
1562120.27803288387070.721967116129256
1572422.46613689062631.53386310937373
1582220.75087566294911.24912433705090
1592016.81721341458223.18278658541778


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.3549197886053460.7098395772106910.645080211394655
120.4719164566980030.9438329133960060.528083543301997
130.407737227362210.815474454724420.59226277263779
140.3036743406512440.6073486813024880.696325659348756
150.5008357235950750.9983285528098510.499164276404925
160.6004402485757070.7991195028485870.399559751424293
170.5061895913117730.9876208173764540.493810408688227
180.5955634918273260.8088730163453480.404436508172674
190.5904047334324850.819190533135030.409595266567515
200.509164409381670.981671181236660.49083559061833
210.4500813580152660.9001627160305330.549918641984734
220.3747471741177480.7494943482354960.625252825882252
230.3870389998471780.7740779996943570.612961000152822
240.4872748084027240.9745496168054470.512725191597276
250.7001726677181120.5996546645637750.299827332281888
260.6390331318615220.7219337362769550.360966868138478
270.573639752876310.852720494247380.42636024712369
280.5579572989444630.8840854021110740.442042701055537
290.4918517531149040.9837035062298080.508148246885096
300.4270967743950210.8541935487900430.572903225604979
310.4263684220418650.852736844083730.573631577958135
320.363574902249910.727149804499820.63642509775009
330.6185367063515690.7629265872968610.381463293648431
340.5813919770519420.8372160458961160.418608022948058
350.5447268223119730.9105463553760540.455273177688027
360.4887008817200230.9774017634400460.511299118279977
370.473974073410280.947948146820560.52602592658972
380.422661113659190.845322227318380.57733888634081
390.3725386062146320.7450772124292640.627461393785368
400.3477060646928820.6954121293857640.652293935307118
410.5244968408658710.9510063182682590.475503159134129
420.4698436569480260.9396873138960520.530156343051974
430.4360078912459130.8720157824918250.563992108754087
440.3877830544118900.7755661088237790.61221694558811
450.3472617260356180.6945234520712370.652738273964382
460.3230958270943190.6461916541886380.676904172905681
470.3014481512429850.6028963024859690.698551848757015
480.2968788140391390.5937576280782790.70312118596086
490.2590555129926810.5181110259853620.740944487007319
500.2566240339058390.5132480678116780.74337596609416
510.2361128904272410.4722257808544830.763887109572759
520.2063917062403480.4127834124806970.793608293759652
530.2777687684555590.5555375369111190.72223123154444
540.3559677413940770.7119354827881540.644032258605923
550.3394362076862960.6788724153725920.660563792313704
560.4016344482217160.8032688964434310.598365551778284
570.3779713644651740.7559427289303480.622028635534826
580.3465549066634640.6931098133269280.653445093336536
590.3461664627694200.6923329255388390.65383353723058
600.4234398175223220.8468796350446430.576560182477678
610.3791917105059460.7583834210118920.620808289494054
620.3369521344662710.6739042689325430.663047865533729
630.3394454175331230.6788908350662450.660554582466877
640.3052883105343780.6105766210687570.694711689465622
650.2659873424675390.5319746849350780.734012657532461
660.2495279946974880.4990559893949750.750472005302512
670.2213893676464310.4427787352928620.778610632353569
680.2436382092156170.4872764184312330.756361790784383
690.2101557679612610.4203115359225220.789844232038739
700.1774716906975830.3549433813951650.822528309302417
710.1487769011467710.2975538022935410.851223098853229
720.1236831082826130.2473662165652260.876316891717387
730.1076579889894920.2153159779789840.892342011010508
740.08754289046573250.1750857809314650.912457109534268
750.07124854544520750.1424970908904150.928751454554793
760.05951155317531680.1190231063506340.940488446824683
770.04714125077915470.09428250155830940.952858749220845
780.03673011863325460.07346023726650910.963269881366746
790.04174200201368210.08348400402736430.958257997986318
800.03824101181685740.07648202363371490.961758988183143
810.03201733480635160.06403466961270320.967982665193648
820.04223284033593990.08446568067187980.95776715966406
830.03295245186569720.06590490373139440.967047548134303
840.02575891058130410.05151782116260830.974241089418696
850.02356509472913460.04713018945826930.976434905270865
860.01859405663974450.0371881132794890.981405943360256
870.01512109980718310.03024219961436620.984878900192817
880.01548032701830740.03096065403661480.984519672981693
890.01298788197001410.02597576394002820.987012118029986
900.00980225192331650.0196045038466330.990197748076683
910.008332817191194030.01666563438238810.991667182808806
920.006784351260456410.01356870252091280.993215648739544
930.004985706996958560.009971413993917120.995014293003041
940.004735011343198830.009470022686397650.995264988656801
950.007017622301945670.01403524460389130.992982377698054
960.005705680702299040.01141136140459810.994294319297701
970.00485829763138750.0097165952627750.995141702368612
980.003709824064891810.007419648129783630.996290175935108
990.002792435160482570.005584870320965140.997207564839517
1000.002312291502123110.004624583004246230.997687708497877
1010.001812016914379980.003624033828759960.99818798308562
1020.001325473903971480.002650947807942960.998674526096029
1030.001611385652426020.003222771304852040.998388614347574
1040.001252669475850960.002505338951701920.998747330524149
1050.005495307817376450.01099061563475290.994504692182623
1060.01312153206325560.02624306412651120.986878467936744
1070.01374202532511030.02748405065022060.98625797467489
1080.01857356976407320.03714713952814640.981426430235927
1090.01438446893145960.02876893786291930.98561553106854
1100.01039184141641690.02078368283283380.989608158583583
1110.007474239515151090.01494847903030220.992525760484849
1120.02186030425490180.04372060850980360.978139695745098
1130.02195896014113760.04391792028227530.978041039858862
1140.05467608497893030.1093521699578610.94532391502107
1150.04688926585099580.09377853170199160.953110734149004
1160.03935805691945920.07871611383891830.96064194308054
1170.1025239485141640.2050478970283280.897476051485836
1180.09632814567136930.1926562913427390.90367185432863
1190.08602058769620380.1720411753924080.913979412303796
1200.1491044011898830.2982088023797660.850895598810117
1210.1460654492191760.2921308984383510.853934550780824
1220.1850908034884050.3701816069768110.814909196511595
1230.1841339221542560.3682678443085130.815866077845744
1240.1744011046192430.3488022092384850.825598895380757
1250.1509588145727630.3019176291455260.849041185427237
1260.1211508876999490.2423017753998980.878849112300051
1270.09477429155194830.1895485831038970.905225708448052
1280.09242629017886720.1848525803577340.907573709821133
1290.1302268451496480.2604536902992950.869773154850352
1300.1126165170909610.2252330341819220.887383482909039
1310.09419782492921260.1883956498584250.905802175070787
1320.08361878192875520.1672375638575100.916381218071245
1330.08194509887316380.1638901977463280.918054901126836
1340.07295335024788090.1459067004957620.92704664975212
1350.1715120388681570.3430240777363140.828487961131843
1360.1366285669904160.2732571339808310.863371433009585
1370.1142398417889610.2284796835779230.885760158211039
1380.1609553139341120.3219106278682240.839044686065888
1390.3919544582184370.7839089164368750.608045541781563
1400.3377506037674270.6755012075348550.662249396232573
1410.481408140548730.962816281097460.51859185945127
1420.3902832131320210.7805664262640420.609716786867979
1430.5534319600366770.8931360799266450.446568039963323
1440.4997416852793480.9994833705586960.500258314720652
1450.4030767509351590.8061535018703190.596923249064841
1460.2986133808187440.5972267616374870.701386619181256
1470.2901804484839530.5803608969679050.709819551516047
1480.1729023858608610.3458047717217210.82709761413914


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level100.072463768115942NOK
5% type I error level290.210144927536232NOK
10% type I error level390.282608695652174NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/26/t1290763103cz6u52h9qf6vsre/10raix1290763146.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t1290763103cz6u52h9qf6vsre/10raix1290763146.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t1290763103cz6u52h9qf6vsre/12r3l1290763146.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t1290763103cz6u52h9qf6vsre/12r3l1290763146.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t1290763103cz6u52h9qf6vsre/20lrd1290763146.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t1290763103cz6u52h9qf6vsre/20lrd1290763146.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t1290763103cz6u52h9qf6vsre/30lrd1290763146.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t1290763103cz6u52h9qf6vsre/30lrd1290763146.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t1290763103cz6u52h9qf6vsre/40lrd1290763146.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t1290763103cz6u52h9qf6vsre/40lrd1290763146.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t1290763103cz6u52h9qf6vsre/56r2r1290763146.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t1290763103cz6u52h9qf6vsre/56r2r1290763146.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t1290763103cz6u52h9qf6vsre/66r2r1290763146.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t1290763103cz6u52h9qf6vsre/66r2r1290763146.ps (open in new window)


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


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


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


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





Copyright

Creative Commons License

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

Software written by Ed van Stee & Patrick Wessa


Disclaimer

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


Privacy Policy

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

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

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

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

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

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

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

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

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


FreeStatistics.org is powered by