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:14:11 +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/t1258035301gehccu34anmb0m8.htm/, Retrieved Thu, 12 Nov 2009 15:15:14 +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/t1258035301gehccu34anmb0m8.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 «
1507 0 1508 1687 1385 0 1507 1508 1632 0 1385 1507 1511 0 1632 1385 1559 0 1511 1632 1630 0 1559 1511 1579 0 1630 1559 1653 0 1579 1630 2152 0 1653 1579 2148 0 2152 1653 1752 0 2148 2152 1765 0 1752 2148 1717 0 1765 1752 1558 0 1717 1765 1575 0 1558 1717 1520 0 1575 1558 1805 0 1520 1575 1800 0 1805 1520 1719 0 1800 1805 2008 0 1719 1800 2242 0 2008 1719 2478 0 2242 2008 2030 0 2478 2242 1655 0 2030 2478 1693 0 1655 2030 1623 0 1693 1655 1805 0 1623 1693 1746 0 1805 1623 1795 0 1746 1805 1926 0 1795 1746 1619 0 1926 1795 1992 0 1619 1926 2233 0 1992 1619 2192 0 2233 1992 2080 0 2192 2233 1768 0 2080 2192 1835 0 1768 2080 1569 0 1835 1768 1976 0 1569 1835 1853 0 1976 1569 1965 0 1853 1976 1689 0 1965 1853 1778 0 1689 1965 1976 0 1778 1689 2397 0 1976 1778 2654 0 2397 1976 2097 0 2654 2397 1963 0 2097 2654 1677 0 1963 2097 1941 0 1677 1963 2003 0 1941 1677 1813 0 2003 1941 2012 0 1813 2003 1912 0 2012 1813 2084 0 1912 2012 2080 0 2084 1912 2118 0 2080 2084 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'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Y[t] = + 432.674018921448 -85.6151937996543X[t] + 0.412253807726456Y1[t] + 0.208748882344717Y2[t] + 221.708450693677M1[t] + 130.164095261294M2[t] + 304.321659011619M3[t] + 216.329773410414M4[t] + 287.012043536047M5[t] + 283.086050769294M6[t] + 314.717592403885M7[t] + 429.953249810296M8[t] + 561.771276261432M9[t] + 567.769451532068M10[t] + 38.9218710448567M11[t] -0.737951251841748t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)432.674018921448157.0255462.75540.0064850.003243
X-85.615193799654337.53598-2.28090.0237680.011884
Y10.4122538077264560.0742315.553700
Y20.2087488823447170.0733392.84640.0049540.002477
M1221.70845069367753.5106744.14335.3e-052.7e-05
M2130.16409526129462.3301832.08830.0382270.019113
M3304.32165901161958.7900685.17641e-060
M4216.32977341041465.8204223.28670.0012260.000613
M5287.01204353604758.2779374.92492e-061e-06
M6283.08605076929461.9853414.5679e-065e-06
M7314.71759240388558.6414595.366800
M8429.95324981029659.0118567.285900
M9561.77127626143260.3718079.305200
M10567.76945153206861.5890339.218700
M1138.921871044856759.896090.64980.5166630.258332
t-0.7379512518417480.239714-3.07850.0024180.001209


Multiple Linear Regression - Regression Statistics
Multiple R0.908326322560294
R-squared0.825056708255908
Adjusted R-squared0.809975390002107
F-TEST (value)54.7072009469706
F-TEST (DF numerator)15
F-TEST (DF denominator)174
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation126.806940269663
Sum Squared Residuals2797920.01749639


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
115071627.48262493032-120.482624930317
213851497.42201449866-112.422014498661
316321620.3379135721711.6620864278279
415111607.96740358150-96.967403581504
515591679.58998565954-120.589985659538
616301669.45560964810-39.4556096481024
715791739.63916673198-160.639166731977
816531847.93309933897-194.933099338972
921521998.87376331044153.126236689556
1021482225.29605467825-77.2960546782486
1117521798.22719999830-46.2271999983028
1217651594.47987431255170.520125687451
1317171738.14511584632-21.1451158463211
1415581628.78836186171-70.7883618617085
1515751726.63967257914-151.639672579138
1615201611.72707816463-91.727078164631
1718051662.54616861333142.453831386673
1818001763.8933712678136.1066287321876
1917191852.21912408017-133.219124080174
2020081932.2805273971875.7194726028235
2122422165.5932935595076.406706440505
2224782327.64933558390150.350664416097
2320301944.2029409369685.7970590630432
2416551769.11814901216-114.118149012159
2516931741.97397126614-48.9739712661412
2616231587.0764783962535.9235216037480
2718051739.5707818829865.4292181170171
2817461711.2587162720234.7412837279785
2917951794.872357076690.127642923309917
3019261798.09266557835127.907334421647
3116191893.22020000816-274.220200008159
3219921908.5020907778683.497909222136
3322332129.2669293793103.733070620701
3421922311.74365417475-119.743654174749
3520801815.56419696399264.435803036013
3617681721.1732440257946.8267559742079
3718351790.1406806343744.8593193656343
3815691660.34972777626-91.3497277762608
3919761738.09600253660237.903997463397
4018531761.6262627245391.3737372754704
4119651865.8241583622799.1758416377336
4216891881.65652828063-192.656528280634
4317781822.14794255349-44.1479425534903
4419761915.7215460685760.2784539314281
4523972147.00652572639249.993474273615
4626542367.15788150227286.842118497729
4720972031.4048578160465.5951421839577
4819631815.7681273783147.2318726217
4916771865.22348911878-188.223489118784
5019411627.0642431906313.935756809400
5120031849.61668057828153.383319421722
5218131841.55628474328-28.5562847432778
5320121846.11481085441165.885189145585
5419121883.8270869278928.1729130721122
5520841915.03632412459168.963675875409
5620802079.566796973640.433203026361845
5721182244.90266470532-126.902664705319
5821502264.99353788834-114.993537888339
5916081756.53258552563-148.532585525632
6015031500.111163676222.88883632377516
6115481564.65311907595-16.6531190759465
6213821469.00360109322-87.003601093216
6317311583.38278121462147.617218785380
6417981603.87720878888194.122791211116
6517791774.295892718654.70410728134624
6618871775.78530147035111.214698529648
6720041847.23607432301156.763925676991
6820772032.5123552748044.4876447251971
6920922218.11057767246-126.110577672461
7020512244.79327721832-193.793277218316
7115771701.43657259765-124.436572597649
7213561457.80974126248-101.809741262477
7316521488.72517896537163.274821034630
7413821472.33649636999-90.3364963699931
7515191596.23724995637-77.2372499563697
7614211507.62398652877-86.6239865287743
7714421565.7660291266-123.766029126599
7815431549.30202460048-6.30202460047699
7916561626.2169760928429.7830239071621
8015611808.38299963731-247.382999637313
8119051923.88758680755-18.8875868075472
8221992051.13197686149147.868023138506
8314731714.55868012060-241.558680120601
8416551436.97476482384218.025235176158
8514071581.42376868963-174.423768689629
8613951424.89481427598-29.8948142759807
8715301541.59765826026-11.5976582602570
8813091506.01709886215-197.017098862146
8915261513.0344253449312.9655746550732
9013271551.69605460479-224.69605460479
9116271545.8496447187881.1503552812214
9217481742.482465604695.51753439531457
9319581986.06991624230-28.0699162422966
9422742103.16205464736170.837945352643
9516481747.68599144225-99.6859914422545
9614011515.91993232973-114.919932329725
9714111504.38694091533-93.3869409153337
9814031364.6661983692338.3338016307725
9913941536.87526922935-142.875269229347
10015201442.7651570480077.2348429519955
10115281562.77471575423-34.7747157542265
10216431587.7111613728855.2888386271229
10315151667.68393070293-152.683930702927
10416851753.41927093815-68.419270938152
10520001927.8626365108272.1373634891794
10622152098.47011996205116.529880037950
10719561723.27505482277232.724945177229
10814621621.72250602903-159.722506029034
10915631584.97366392672-21.9736639267193
11014591431.2070439445827.7929560554245
11114461582.83589755632-136.835897556324
11216221467.03687743898154.963122561017
11316571606.8241310021550.1758689978507
11416381653.32887354665-15.3288735466502
11516431683.69585246466-40.6958524646623
11616831796.28859889331-113.288598893314
11720501944.90257081339105.097429186609
11822622109.80989756158152.190102438417
11918131744.2330128810568.766987118951
12014451563.72599397225-118.725993972252
12117621539.25884399797222.741156002026
12214611500.84140566018-39.8414056601791
12315561616.34601773627-60.3460177362747
12414311503.94687903148-72.946879031482
12514271542.19061576221-115.190615762214
12615541509.7840462196244.2159537803766
12716451592.1988746542552.8011253457458
12816531770.72278536971-117.722785369709
12920161924.0970393241991.9029606758149
13022072080.67538660644126.324613393559
13116651705.60617643427-40.6061764342725
13213611482.37582687768-121.375826877676
13315061464.8792745398341.1207254601673
13413601368.91410974315-8.91410974314917
13514531512.41325425355-59.4132542535541
13615221431.5456846967490.4543153032604
13714601549.34916236171-89.3491623617147
13815521533.5291551458618.4708448541353
13915481589.40766513408-41.4076651340758
14018271721.46125323345105.538746766547
14117371966.72514525905-229.72514525905
14219411993.12346475664-52.1234647566392
14314741528.85031038276-54.8503103827582
14414581339.25273187613118.747268123873
14515421456.1414423393685.858557660643
14614041395.148473386648.85152661336181
14715221529.21196653583-7.211966535827
14813851460.32073323093-75.3207332309316
14916411498.41864856287142.581351437125
15015101570.69308244103-60.6930824410261
15116811601.0211378918679.9788621081426
15219381758.66814158049179.331858419508
15318682031.39350424643-163.393504246433
15417262061.44442448697-335.444424486968
15514561458.70643028663-2.70643028662715
15614451278.09573861084166.904261389164
15714561438.1692479346117.8307520653928
15813651348.1254954295816.8745045704194
15914871486.326249130750.673750869251373
16015581428.89522852696129.104771473039
16114881553.57693139539-65.5769313953855
16216841534.87639148241149.123608517587
16315941631.95930641542-37.9593064154182
16418501750.2689508141799.7310491858294
16519981968.0986013804129.9013986195864
16620792087.81210282297-8.81210282297075
16714941622.51396409678-128.513964096778
16810571272.97912995037-215.979129950371
16912181191.6766192440926.323380755914
17011681074.5439140191893.4560859808216
17112361260.95940618884-24.9594061888386
17210761189.82538414396-113.825384143956
17311741208.00401778095-34.0040177809543
17411391210.34112574440-71.341125744397
17514271247.26322332650179.736776673497
17614871473.1838152242313.8161847757738
17714831689.11879700239-206.118797002387
17815131705.25493873096-192.254938730958
17913571187.20202569432169.797974305680
18011651089.4930758626475.5069241373646
18112821198.7460185752283.253981424784
18211101114.6176219848-4.61762198480007
18312971241.5531987886655.4468012113349
18411851194.01001621717-9.01001621717475
18512221256.81794962406-34.8179496240648
18612841244.0275216687439.9724783312599
18714441308.20455677728135.795443222715
18815751501.6053028734673.3946971265411
18917371720.0904480600716.9095519399259
19017631819.48189251771-56.481892517712


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
190.2837473952543320.5674947905086640.716252604745668
200.4438422983520260.8876845967040520.556157701647974
210.3413175178282880.6826350356565760.658682482171712
220.4119830925982180.8239661851964350.588016907401782
230.3366149237342740.6732298474685470.663385076265727
240.4308048344640920.8616096689281850.569195165535908
250.3837439189769570.7674878379539130.616256081023044
260.3247391602375910.6494783204751820.675260839762409
270.2435778973691980.4871557947383960.756422102630802
280.1775834120678390.3551668241356790.82241658793216
290.140632751517090.281265503034180.85936724848291
300.1018587039881490.2037174079762980.89814129601185
310.1936480374846510.3872960749693030.806351962515349
320.1434814180343510.2869628360687020.856518581965649
330.1420717396350960.2841434792701920.857928260364904
340.2416082397968380.4832164795936750.758391760203162
350.2284588062794050.4569176125588110.771541193720595
360.1922848703132110.3845697406264220.807715129686789
370.1481663410741560.2963326821483130.851833658925844
380.1441326647701040.2882653295402080.855867335229896
390.1573497986348270.3146995972696540.842650201365173
400.1325853416893290.2651706833786580.867414658310671
410.1056906869279280.2113813738558560.894309313072072
420.2339885162236210.4679770324472420.766011483776379
430.1935894111513910.3871788223027820.80641058884861
440.1615963806149640.3231927612299270.838403619385036
450.1543147319924290.3086294639848580.845685268007571
460.2404135556942640.4808271113885270.759586444305736
470.2077959408171300.4155918816342610.79220405918287
480.1900846477966140.3801692955932270.809915352203386
490.2754419336671110.5508838673342210.72455806633289
500.3792643021138170.7585286042276340.620735697886183
510.3706346839544050.741269367908810.629365316045595
520.3323259827305290.6646519654610570.667674017269472
530.3292920668448830.6585841336897660.670707933155117
540.2985664261239520.5971328522479040.701433573876048
550.3663700371610370.7327400743220750.633629962838963
560.3280344005329930.6560688010659850.671965599467007
570.5673338341121420.8653323317757150.432666165887858
580.8063170459707720.3873659080584560.193682954029228
590.9309328803290050.1381342393419890.0690671196709945
600.9230418065262080.1539163869475840.076958193473792
610.9043442190138760.1913115619722480.0956557809861242
620.8987146023163820.2025707953672370.101285397683618
630.8966097934056770.2067804131886460.103390206594323
640.92101445670640.1579710865871990.0789855432935993
650.9162242687429620.1675514625140760.083775731257038
660.9205827101324050.1588345797351900.0794172898675948
670.9469445301283450.1061109397433110.0530554698716554
680.951210961038870.09757807792225750.0487890389611287
690.969117568767210.06176486246558190.0308824312327910
700.9775431966102620.04491360677947590.0224568033897379
710.9782845446295530.04343091074089320.0217154553704466
720.9771670129483820.04566597410323630.0228329870516182
730.981947643311720.03610471337655910.0180523566882795
740.979513837748180.04097232450364060.0204861622518203
750.9783364458117370.04332710837652580.0216635541882629
760.9741632448772690.05167351024546290.0258367551227314
770.9730730517330220.05385389653395570.0269269482669779
780.965186259700240.06962748059952150.0348137402997607
790.9580767130312080.08384657393758370.0419232869687919
800.9767144834349360.04657103313012830.0232855165650641
810.969972038476120.06005592304776050.0300279615238802
820.973415887595830.05316822480833890.0265841124041695
830.9840883994737980.03182320105240450.0159116005262023
840.9915562205386140.01688755892277170.00844377946138584
850.9932283214080060.01354335718398710.00677167859199355
860.9907740230194980.01845195396100420.00922597698050211
870.9877727777960190.02445444440796240.0122272222039812
880.9914321813512420.01713563729751620.0085678186487581
890.9885424061469880.02291518770602480.0114575938530124
900.9950061943810890.009987611237822470.00499380561891123
910.9943311386653380.01133772266932420.0056688613346621
920.9932675031655440.01346499366891230.00673249683445614
930.990986500194550.01802699961089860.0090134998054493
940.9936319594371740.01273608112565220.00636804056282608
950.9922933682675680.01541326346486470.00770663173243235
960.9913248511536020.01735029769279640.00867514884639819
970.991851855931350.01629628813729870.00814814406864935
980.989461551871260.02107689625747950.0105384481287398
990.9914413341262510.01711733174749750.00855866587374875
1000.9895170615289670.02096587694206650.0104829384710332
1010.9865728678165260.02685426436694740.0134271321834737
1020.9831473261596220.03370534768075510.0168526738403776
1030.9874659560969450.02506808780611070.0125340439030553
1040.9861258512562630.02774829748747390.0138741487437369
1050.982129693980250.0357406120395010.0178703060197505
1060.9808912513357780.03821749732844340.0191087486642217
1070.9937193642488510.01256127150229760.00628063575114878
1080.9932421017838160.01351579643236730.00675789821618364
1090.9906919576895540.01861608462089290.00930804231044647
1100.9875688843724470.02486223125510570.0124311156275529
1110.988062257449820.02387548510035810.0119377425501791
1120.989973468810750.02005306237849860.0100265311892493
1130.987652112925870.02469577414826190.0123478870741309
1140.983577279040160.03284544191968230.0164227209598411
1150.9785503356311010.04289932873779770.0214496643688989
1160.979972806071650.04005438785670050.0200271939283502
1170.9805462677802430.03890746443951420.0194537322197571
1180.9890929483100180.0218141033799630.0109070516899815
1190.992814858641440.01437028271712110.00718514135856056
1200.9908858266575740.01822834668485310.00911417334242654
1210.9974867717672990.005026456465402430.00251322823270121
1220.9965443281305120.006911343738976050.00345567186948803
1230.995836118038990.008327763922021520.00416388196101076
1240.9941916940058260.01161661198834900.00580830599417448
1250.9927393569465160.01452128610696860.0072606430534843
1260.9901772047256670.01964559054866540.00982279527433268
1270.987006017170570.02598796565885860.0129939828294293
1280.9897325105769070.02053497884618690.0102674894230935
1290.9925596676029780.01488066479404500.00744033239702252
1300.9988989526896340.002202094620731060.00110104731036553
1310.9996272867027750.0007454265944500210.000372713297225010
1320.9994382175478850.001123564904229470.000561782452114733
1330.9991740604552350.001651879089529840.000825939544764918
1340.9986950709514480.002609858097104340.00130492904855217
1350.9979860218515950.004027956296810270.00201397814840513
1360.9983339077110840.003332184577831480.00166609228891574
1370.9974874934615230.005025013076953720.00251250653847686
1380.9967998148870220.006400370225956510.00320018511297826
1390.9953651281129120.009269743774176720.00463487188708836
1400.9938824954295580.01223500914088490.00611750457044246
1410.9947800110532650.01043997789346950.00521998894673473
1420.9941261594376030.01174768112479320.00587384056239662
1430.9910617965177520.01787640696449690.00893820348224847
1440.9893243374483970.02135132510320550.0106756625516027
1450.9864674677868350.02706506442633090.0135325322131655
1460.9810203054259980.03795938914800450.0189796945740022
1470.9733473880670790.05330522386584230.0266526119329211
1480.9627475858547040.07450482829059150.0372524141452958
1490.9815224997918420.03695500041631670.0184775002081583
1500.9727003440980970.05459931180380570.0272996559019029
1510.966674434264810.06665113147037770.0333255657351889
1520.9842506674697880.03149866506042310.0157493325302115
1530.9797351009386070.04052979812278670.0202648990613934
1540.9888917820433360.02221643591332710.0111082179566636
1550.9843894896405070.03122102071898530.0156105103594927
1560.976678216218640.04664356756271840.0233217837813592
1570.9707601722934720.05847965541305610.0292398277065280
1580.965543048199720.06891390360056170.0344569518002809
1590.9657918666798070.06841626664038660.0342081333201933
1600.9523013485512540.0953973028974920.047698651448746
1610.926149765694760.1477004686104790.0738502343052394
1620.9397456782047280.1205086435905430.0602543217952716
1630.9468972755317710.1062054489364580.0531027244682289
1640.9149151775377740.1701696449244520.085084822462226
1650.8746592871703010.2506814256593970.125340712829699
1660.9700296112690990.05994077746180270.0299703887309014
1670.941207039985490.1175859200290220.0587929600145108
1680.8941076502659350.2117846994681290.105892349734065
1690.8344947942909440.3310104114181120.165505205709056
1700.8478285302299650.3043429395400710.152171469770036
1710.7095157454468680.5809685091062650.290484254553132


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level140.0915032679738562NOK
5% type I error level770.503267973856209NOK
10% type I error level940.61437908496732NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Nov/12/t1258035301gehccu34anmb0m8/1060ja1258035237.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/12/t1258035301gehccu34anmb0m8/1060ja1258035237.ps (open in new window)


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


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


http://www.freestatistics.org/blog/date/2009/Nov/12/t1258035301gehccu34anmb0m8/36prk1258035237.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/12/t1258035301gehccu34anmb0m8/36prk1258035237.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/12/t1258035301gehccu34anmb0m8/44cb21258035237.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/12/t1258035301gehccu34anmb0m8/44cb21258035237.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/12/t1258035301gehccu34anmb0m8/525ze1258035237.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/12/t1258035301gehccu34anmb0m8/525ze1258035237.ps (open in new window)


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


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


http://www.freestatistics.org/blog/date/2009/Nov/12/t1258035301gehccu34anmb0m8/83s071258035237.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/12/t1258035301gehccu34anmb0m8/83s071258035237.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/12/t1258035301gehccu34anmb0m8/9835k1258035237.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/12/t1258035301gehccu34anmb0m8/9835k1258035237.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