Home » date » 2009 » Nov » 12 »

Seatbelt

*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: Thu, 12 Nov 2009 15:10:54 +0100
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Nov/12/t1258035104fui5g595g77aupf.htm/, Retrieved Thu, 12 Nov 2009 15:11:47 +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/2009/Nov/12/t1258035104fui5g595g77aupf.htm/},
    year = {2009},
}
@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 = {2009},
    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 «
1632 0 1385 1507 1508 1687 1511 0 1632 1385 1507 1508 1559 0 1511 1632 1385 1507 1630 0 1559 1511 1632 1385 1579 0 1630 1559 1511 1632 1653 0 1579 1630 1559 1511 2152 0 1653 1579 1630 1559 2148 0 2152 1653 1579 1630 1752 0 2148 2152 1653 1579 1765 0 1752 2148 2152 1653 1717 0 1765 1752 2148 2152 1558 0 1717 1765 1752 2148 1575 0 1558 1717 1765 1752 1520 0 1575 1558 1717 1765 1805 0 1520 1575 1558 1717 1800 0 1805 1520 1575 1558 1719 0 1800 1805 1520 1575 2008 0 1719 1800 1805 1520 2242 0 2008 1719 1800 1805 2478 0 2242 2008 1719 1800 2030 0 2478 2242 2008 1719 1655 0 2030 2478 2242 2008 1693 0 1655 2030 2478 2242 1623 0 1693 1655 2030 2478 1805 0 1623 1693 1655 2030 1746 0 1805 1623 1693 1655 1795 0 1746 1805 1623 1693 1926 0 1795 1746 1805 1623 1619 0 1926 1795 1746 1805 1992 0 1619 1926 1795 1746 2233 0 1992 1619 1926 1795 2192 0 2233 1992 1619 1926 2080 0 2192 2233 1992 1619 1768 0 2080 2192 2233 1992 1835 0 1768 2080 2192 2233 1569 0 1835 1768 2080 2192 1976 0 1569 1835 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 time7 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
Y[t] = + 522.918085028905 -80.7982303933677X[t] + 0.389747913943074Y1[t] + 0.172724627545124Y2[t] + 0.0359567363109739Y3[t] + 0.0354648834548642Y4[t] + 188.662307824867M1[t] + 104.987349633496M2[t] + 181.667324587968M3[t] + 176.541027973435M4[t] + 208.395663285797M5[t] + 324.64288106546M6[t] + 458.312477153942M7[t] + 471.425528086186M8[t] -54.2481744163299M9[t] -111.187507110586M10[t] + 86.6003491334288M11[t] -0.767119250424237t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)522.918085028905164.861573.17190.0017970.000899
X-80.798230393367738.149531-2.11790.0356340.017817
Y10.3897479139430740.0767195.08021e-060
Y20.1727246275451240.0821272.10310.0369250.018463
Y30.03595673631097390.0819030.4390.6612060.330603
Y40.03546488345486420.0751740.47180.6376970.318849
M1188.66230782486756.5212583.33790.0010370.000519
M2104.98734963349663.6515671.64940.1009110.050455
M3181.66732458796863.2337672.87290.0045850.002293
M4176.54102797343568.2895052.58520.0105710.005286
M5208.39566328579762.6406013.32680.0010760.000538
M6324.6428810654666.3752764.8912e-061e-06
M7458.31247715394265.9366286.950800
M8471.42552808618673.3054386.43100
M9-54.248174416329980.31085-0.67550.500290.250145
M10-111.18750711058677.361225-1.43730.1524850.076242
M1186.600349133428862.448111.38680.1673320.083666
t-0.7671192504242370.256233-2.99380.0031660.001583


Multiple Linear Regression - Regression Statistics
Multiple R0.909113674036662
R-squared0.82648767232044
Adjusted R-squared0.809136439552483
F-TEST (value)47.6327926305489
F-TEST (DF numerator)17
F-TEST (DF denominator)170
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation127.324879886795
Sum Squared Residuals2755976.25649176


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
116321624.962164870317.03783512969226
215111609.33124673722-98.3312467372175
315591676.32540114441-117.325401144406
416301672.79480330307-42.7948033030729
515791744.25426449686-165.254264496858
616531849.55534041559-196.555340415592
721522006.74544956455145.254550435451
821482227.04142591574-79.0414259157364
917521786.08329108286-34.0832910828553
1017651593.91257950137171.087420498627
1117171745.15423676709-28.1542367670882
1215581626.94356155909-68.9435615590894
1315751731.00139341833-156.001393418334
1415201624.45693487588-104.456934875882
1518051674.45053850205130.549461497950
1618001765.1077716438534.8922283561497
1717191842.09834950806-123.098349508062
1820081933.4423451288074.5576548712037
1922422174.9189823683367.0810176316715
2024782325.29352321490152.706476785095
2120301938.7696132321291.2303867678834
2216551765.88233555681-110.882335556812
2316931756.15154417936-63.1515441793628
2416231611.0838558239611.9161441760431
2518051748.8881823647156.111817635295
2617461711.3565260166334.6434739833669
2717951794.540831040770.459168959230808
2819261801.61589410062124.384105899383
2916191896.55705498525-277.557054985246
3019921914.6809220977777.3190779022267
3122332146.3810219262786.6189780737299
3221922310.68966862782-118.689668627819
3320801812.41996106494267.580038935061
3417681725.8740080088942.1259919911072
3518351789.0210482910645.9789517089369
3615691668.39539165884-99.395391658839
3719761748.99961649398227.000383506021
3818531768.5842467949384.4157532050709
3919651859.6686878276105.331312172398
4016891881.38264181579-192.382641815791
4117781834.25642091437-56.2564209143736
4219761936.4170603839739.5829396160272
4323972155.91012375939241.089876240609
4426542359.95124516331294.048754836687
4520972016.6685139073080.3314860927041
4619631808.42253608640154.577463913597
4716771881.18103223541-204.181032235406
4819411648.28713329548292.712866704525
4920031865.10438492295137.895615077045
5018131835.39005884965-22.3900588496519
5120121847.30935953032164.690640469680
5219121897.7501461898314.2498538101749
5320841919.60211461405164.397885385949
5420802085.26345425645-5.26345425644624
5521182249.77741355291-131.777413552913
5621502278.88093775439-128.88093775439
5716081777.43171810334-169.431718103336
5815031515.23358132895-12.2335813289512
5915481580.21232036230-32.2123203622983
6013821473.89374740365-91.8937474036534
6117311581.86596635789149.134033642112
6217981602.66786308097195.332136919032
6317791760.6018255603018.3981744397026
6418871765.53747969497121.462520305033
6520041850.22234819798153.777651802018
6620772031.65018163545.3498183649984
6720922216.42253234963-124.422532349626
6820512255.26072611289-204.260726112894
6915771722.20534241639-145.205342416386
7013561475.80495707021-119.804957070208
7116521503.87767868906148.122321310936
7213821475.20589691184-93.2058969118374
7315191584.23884499268-65.2388449926761
7414211509.36203702842-88.3620370284215
7514421571.53215783841-129.532157838408
7615431552.24698900862-9.2469890086225
7716561627.661190432128.3388095679010
7815611801.90752350292-240.907523502917
7919051921.67822434894-16.6782243489416
8021992059.33366324247139.666336757527
8114731707.48764194518-234.487641945176
8216551426.60519833885228.394801661146
8314071591.93317645622-184.933176456224
8413951423.66619280166-28.666192801664
8515301544.84531939797-14.8453193979652
8613091508.48385299161-199.483852991607
8715261512.3534725002913.6465274997104
8813271557.29179207403-230.29179207403
8916271545.1420379802781.8579620197308
9017481743.139182346914.86081765309311
9119581975.55903421944-17.5590342194350
9222742094.38121684803179.618783151966
9316481742.36313781567-94.3631378156688
9414011507.09763957023-106.097639570226
9514111518.53497917642-107.534979176420
9614031381.0999931694221.9000068305806
9713941536.52211379621-142.522113796213
9815201438.7902492583381.2097507416726
9915281562.32381541536-34.3238154153577
10016431580.7043562381962.2956437618072
10115151662.20604424803-147.206044248034
10216851752.41797116605-67.4179711660492
10320001933.8875847920566.1124152079459
10422152097.84329539812117.156704601882
10519561711.17967291030244.820327089704
10614621607.01970830184-145.019708301844
10715631585.67143386851-22.6714338685113
10814591450.654694023878.34530597612882
10914461588.51325437786-142.513254377861
11016221467.15307073082154.846929269182
11116571609.2585917833647.7414082166392
11216381643.25010190300-5.25010190300413
11316431678.84511166992-35.8451116699208
11416831800.49248710446-117.492487104458
11520501950.4065965689899.5934034310243
11622622112.20494866562149.795051334379
11718131733.3962168473979.603783152614
11814451551.92529014615-106.925290146154
11917621548.60387736679213.396122633205
12014611512.59781545509-51.5978154550942
12115561608.77677723080-52.7767772308038
12214311507.71784702171-76.7178470217067
12314271551.74044352525-124.740443525246
12415541515.4384175910038.5615824089955
12516451594.2075921028750.7924078971276
12616531762.51384112206-109.513841122060
12720161918.6768883559497.3231116440577
12822072081.65921302252125.340786977475
12916651695.87424091647-30.8742409164725
13013611473.25083782429-112.250837824287
13115061477.9129501792428.0870498207617
13213601381.83588420274-21.8358842027445
13314531507.72013366447-54.7201336644692
13415221428.7392187926093.2607812073961
13514601547.50079551997-87.500795519974
13615521527.5271117836724.4728882163302
13715481589.54175798733-41.541757987332
13818271719.57128990206107.428710097945
13917371961.63173318646-224.631733186458
14019411990.20946603109-49.2094660310937
14114741537.62207214042-63.6220721404223
14214581339.79776461945118.202235380549
14315421454.0634686228887.9365313771192
14414041387.1142713370916.8857286629086
14515221518.595708146783.40429185321661
14613851458.76081366389-73.7608136638874
14716411499.67673180735141.323268192647
14815101569.24424890606-59.2442489060646
14916811592.7510762660888.2489237339183
15019381756.59737733347181.402622666532
15118682023.56965707282-155.569657072819
15217262054.52616623431-328.526166234309
15314561475.95579307600-19.9557930759967
15414451295.08801076141149.911989238589
15514561433.5974728664522.4025271335545
15613651333.8729283784231.1270716215838
15714871478.229985054808.7700149451982
15815581425.62462238887132.375377611128
15914881547.40003525709-59.4000352570887
16016841527.64713140737156.352868592634
16115941629.91415873356-35.91415873356
16218501744.17200719029105.827992809706
16319981965.8697119938332.1302880061727
16420792083.83085047994-4.83085047993892
16514941620.53593961774-126.535939617738
16610571282.42002959262-225.420029592616
16712181216.238319471701.76168052830480
16811681097.9775678133870.0224321866176
16912361257.73397513645-21.7339751364453
17010761181.44940494181-105.449404941814
17111741210.65987850872-36.659878508723
17211391215.99763169937-76.9976316993702
17314271247.02951853790179.970481462103
17414871466.5610331243620.4389668756409
17514831674.81015033969-191.810150339689
17615131705.07483715508-192.074837155084
17713571202.00684492392154.993155076085
17811651090.6655232925274.334476707483
17912821186.8464614675195.1535385324919
18011101107.371066165462.62893383453497
18112971236.0021797738160.9978202261871
18211851192.13200682666-7.13200682666083
18312221254.65743423875-32.6574342387546
18412841244.4634826405539.5365173594474
18514441308.71095932536135.289040674639
18615751494.6179832898580.3820167101494
18717371709.7548956007827.2451043992194
18817631815.81881613375-52.8188161337465


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
210.8016492668011580.3967014663976840.198350733198842
220.7228217753356120.5543564493287770.277178224664388
230.6785323575887340.6429352848225330.321467642411266
240.5679789227661470.8640421544677050.432021077233853
250.4490784278374440.8981568556748880.550921572162556
260.3686115901088470.7372231802176950.631388409891153
270.3344753676919530.6689507353839060.665524632308047
280.2534019305198960.5068038610397910.746598069480105
290.3846916391049420.7693832782098830.615308360895058
300.3034946659246770.6069893318493550.696505334075323
310.3156191791871610.6312383583743220.684380820812839
320.4108515903987280.8217031807974570.589148409601272
330.3675715824295520.7351431648591050.632428417570448
340.3084593527086260.6169187054172520.691540647291374
350.2451489067367430.4902978134734860.754851093263257
360.2898301591335210.5796603182670420.710169840866479
370.3175729398729160.6351458797458320.682427060127084
380.2748645219073150.549729043814630.725135478092685
390.2312150726641150.4624301453282310.768784927335885
400.3948002311630540.7896004623261070.605199768836946
410.3387799568673540.6775599137347090.661220043132646
420.2910086162552530.5820172325105050.708991383744747
430.2741187046947510.5482374093895020.725881295305249
440.372191420537360.744382841074720.62780857946264
450.3300695948350560.6601391896701120.669930405164944
460.3042311984943520.6084623969887030.695768801505648
470.3820380020461890.7640760040923790.61796199795381
480.4841639967727970.9683279935455940.515836003227203
490.4755416042674040.9510832085348090.524458395732596
500.4426660845942390.8853321691884780.557333915405761
510.4378597840646750.875719568129350.562140215935325
520.3965443556270430.7930887112540860.603455644372957
530.4639825133802650.927965026760530.536017486619735
540.4228629944859520.8457259889719030.577137005514048
550.6614372024275550.6771255951448910.338562797572445
560.8400852024202990.3198295951594020.159914797579701
570.9508020218811350.09839595623772960.0491979781188648
580.9500359044238080.09992819115238360.0499640955761918
590.936445100935460.1271097981290790.0635548990645394
600.9357217396241350.1285565207517300.0642782603758652
610.9341030660988460.1317938678023070.0658969339011536
620.949431706552320.1011365868953600.0505682934476802
630.9451727729023040.1096544541953920.0548272270976961
640.9477000952913480.1045998094173040.0522999047086518
650.965892226528350.06821554694329850.0341077734716493
660.9688295602158070.06234087956838670.0311704397841934
670.9814587322191560.03708253556168740.0185412677808437
680.9864258616237350.02714827675252930.0135741383762647
690.9861492419969650.02770151600607030.0138507580030352
700.9847405393831280.03051892123374420.0152594606168721
710.987304944556210.02539011088758010.0126950554437900
720.9861942947899930.02761141042001430.0138057052100071
730.9852918095984910.02941638080301720.0147081904015086
740.981995498947730.03600900210454080.0180045010522704
750.9808923586563040.03821528268739190.0191076413436960
760.9748087723939330.05038245521213390.0251912276060670
770.9692512258716540.0614975482566910.0307487741283455
780.9829441039034690.03411179219306290.0170558960965314
790.9775147104450060.04497057910998890.0224852895549944
800.98001176091570.03997647816859810.0199882390842990
810.9881644371108360.02367112577832730.0118355628891637
820.9939947513514320.01201049729713630.00600524864856816
830.9951508600403350.009698279919329370.00484913995966469
840.9933259220417750.01334815591644990.00667407795822497
850.9914255843432310.01714883131353710.00857441565676853
860.9948703755188820.01025924896223570.00512962448111783
870.993018938022790.01396212395442070.00698106197721033
880.9967868761003820.006426247799236310.00321312389961816
890.9963754773614720.00724904527705540.0036245226385277
900.995376381020420.009247237959157950.00462361897957897
910.9937424339516550.01251513209669080.00625756604834539
920.9961200102397230.007759979520553170.00387998976027658
930.995293580438050.009412839123902630.00470641956195132
940.9944862877970780.01102742440584410.00551371220292203
950.994102965765670.01179406846865960.00589703423432981
960.9923674283481860.01526514330362750.00763257165181375
970.9934006227634080.01319875447318350.00659937723659175
980.991774920359590.01645015928082140.00822507964041072
990.989027569114610.02194486177078140.0109724308853907
1000.98634436050740.02731127898519880.0136556394925994
1010.9890796445574930.0218407108850150.0109203554425075
1020.988050850058130.0238982998837390.0119491499418695
1030.9845631232457920.0308737535084160.015436876754208
1040.9829051660127480.03418966797450380.0170948339872519
1050.9944455094897330.01110898102053480.00555449051026739
1060.9937231782098410.01255364358031830.00627682179015915
1070.9912654227447440.01746915451051180.00873457725525589
1080.988246372239390.02350725552121910.0117536277606096
1090.9894139433418850.02117211331622940.0105860566581147
1100.990865121378140.01826975724372210.00913487862186103
1110.9890050695458280.02198986090834390.0109949304541720
1120.985051717409920.02989656518015850.0149482825900792
1130.9798696205286630.04026075894267430.0201303794713371
1140.9813057461082310.03738850778353740.0186942538917687
1150.9812145637441040.03757087251179150.0187854362558958
1160.989104710543480.02179057891303870.0108952894565194
1170.9924981558433490.01500368831330230.00750184415665114
1180.9908077448497140.01838451030057230.00919225515028616
1190.9976444863598440.004711027280311840.00235551364015592
1200.9966494417671960.006701116465607070.00335055823280353
1210.9955071549400870.008985690119825010.00449284505991251
1220.993945671845680.01210865630864040.00605432815432019
1230.9927710325482350.01445793490353000.00722896745176501
1240.990126738860970.01974652227805830.00987326113902914
1250.9869431026202150.02611379475957020.0130568973797851
1260.98989508081680.02020983836639880.0101049191831994
1270.9937900620505420.01241987589891640.00620993794945819
1280.9992684640227580.001463071954483230.000731535977241616
1290.9996382527493880.0007234945012246580.000361747250612329
1300.9995328192553450.0009343614893092450.000467180744654623
1310.999323176376330.001353647247337800.000676823623668898
1320.998910651746340.002178696507321710.00108934825366086
1330.9983242829969340.003351434006131370.00167571700306568
1340.9988108505381470.002378298923705310.00118914946185266
1350.9981330765327480.00373384693450340.0018669234672517
1360.9977032221621970.004593555675605560.00229677783780278
1370.9963996511423260.007200697715347080.00360034885767354
1380.9950807480887380.009838503822524640.00491925191126232
1390.9954273539756710.009145292048657340.00457264602432867
1400.994639726173890.01072054765221770.00536027382610884
1410.99199433414740.01601133170519920.00800566585259961
1420.991150431206840.01769913758631820.0088495687931591
1430.991268340550110.01746331889978090.00873165944989044
1440.9875382763183240.02492344736335170.0124617236816759
1450.9851346396522060.02973072069558820.0148653603477941
1460.9781627644157360.04367447116852730.0218372355842636
1470.990834749581750.01833050083650010.00916525041825007
1480.9858162179653030.02836756406939410.0141837820346971
1490.9843032058840680.03139358823186480.0156967941159324
1500.9982785513035540.00344289739289210.00172144869644605
1510.9970684058115040.005863188376991590.00293159418849580
1520.9981092763578130.003781447284373380.00189072364218669
1530.9968034485494280.006393102901144480.00319655145057224
1540.9952663686729860.009467262654027150.00473363132701357
1550.9955492616512730.008901476697454170.00445073834872708
1560.9918215639787250.01635687204255090.00817843602127547
1570.9852645985170040.02947080296599200.0147354014829960
1580.9752156235517640.04956875289647270.0247843764482364
1590.9566488579750460.08670228404990790.0433511420249539
1600.9800517422216550.03989651555669050.0199482577783453
1610.9755125167426580.04897496651468340.0244874832573417
1620.952897259310870.0942054813782590.0471027406891295
1630.9350419532825260.1299160934349490.0649580467174743
1640.9595678882478080.08086422350438360.0404321117521918
1650.9137467658777670.1725064682444670.0862532341222334
1660.8268312710697080.3463374578605840.173168728930292
1670.7572851461861840.4854297076276310.242714853813816


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level270.183673469387755NOK
5% type I error level920.625850340136054NOK
10% type I error level1010.687074829931973NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Nov/12/t1258035104fui5g595g77aupf/10w26w1258035046.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/12/t1258035104fui5g595g77aupf/10w26w1258035046.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/12/t1258035104fui5g595g77aupf/1dig31258035046.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/12/t1258035104fui5g595g77aupf/1dig31258035046.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/12/t1258035104fui5g595g77aupf/2qizy1258035046.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/12/t1258035104fui5g595g77aupf/2qizy1258035046.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/12/t1258035104fui5g595g77aupf/3civb1258035046.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/12/t1258035104fui5g595g77aupf/3civb1258035046.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/12/t1258035104fui5g595g77aupf/43pxf1258035046.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/12/t1258035104fui5g595g77aupf/43pxf1258035046.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/12/t1258035104fui5g595g77aupf/5bqil1258035046.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/12/t1258035104fui5g595g77aupf/5bqil1258035046.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/12/t1258035104fui5g595g77aupf/6zb8i1258035046.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/12/t1258035104fui5g595g77aupf/6zb8i1258035046.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/12/t1258035104fui5g595g77aupf/7qc3v1258035046.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/12/t1258035104fui5g595g77aupf/7qc3v1258035046.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/12/t1258035104fui5g595g77aupf/8munu1258035046.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/12/t1258035104fui5g595g77aupf/8munu1258035046.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/12/t1258035104fui5g595g77aupf/95i9z1258035046.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/12/t1258035104fui5g595g77aupf/95i9z1258035046.ps (open in new window)


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