Home » date » 2010 » Nov » 23 »

*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: Tue, 23 Nov 2010 16:03:13 +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/23/t12905281704xs6mljx4oehdz6.htm/, Retrieved Tue, 23 Nov 2010 17:02:50 +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/23/t12905281704xs6mljx4oehdz6.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 «
26 24 14 11 12 24 23 25 11 7 8 25 25 17 6 17 8 30 23 18 12 10 8 19 19 18 8 12 9 22 29 16 10 12 7 22 25 20 10 11 4 25 21 16 11 11 11 23 22 18 16 12 7 17 25 17 11 13 7 21 24 23 13 14 12 19 18 30 12 16 10 19 22 23 8 11 10 15 15 18 12 10 8 16 22 15 11 11 8 23 28 12 4 15 4 27 20 21 9 9 9 22 12 15 8 11 8 14 24 20 8 17 7 22 20 31 14 17 11 23 21 27 15 11 9 23 20 34 16 18 11 21 21 21 9 14 13 19 23 31 14 10 8 18 28 19 11 11 8 20 24 16 8 15 9 23 24 20 9 15 6 25 24 21 9 13 9 19 23 22 9 16 9 24 23 17 9 13 6 22 29 24 10 9 6 25 24 25 16 18 16 26 18 26 11 18 5 29 25 25 8 12 7 32 21 17 9 17 9 25 26 32 16 9 6 29 22 33 11 9 6 28 22 13 16 12 5 17 22 32 12 18 12 28 23 25 12 12 7 29 30 29 14 18 10 26 23 22 9 14 9 25 17 18 10 15 8 14 23 17 9 16 5 25 23 20 10 10 8 26 25 15 12 11 8 20 24 20 14 14 10 18 24 33 14 9 6 32 23 29 10 12 8 25 21 23 14 17 7 25 24 26 16 5 4 23 24 18 9 12 8 21 28 20 10 12 8 20 16 11 6 6 4 15 20 28 8 24 20 30 29 26 13 12 8 24 27 22 10 12 8 26 22 17 8 14 6 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 time19 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
YT[t] = + 17.4684655763519 -0.0593663461768209X1[t] + 0.216789584253540X2[t] -0.133176572068144X3[t] -0.253140065700683X4[t] + 0.395987020465247X5[t] -0.0148718920049206t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)17.46846557635192.0422618.553500
X1-0.05936634617682090.062074-0.95640.3403970.170199
X20.2167895842535400.1108011.95660.0522310.026115
X3-0.1331765720681440.102779-1.29580.1970250.098512
X4-0.2531400657006830.128304-1.9730.0503130.025157
X50.3959870204652470.0751815.267100
t-0.01487189200492060.006034-2.46460.0148290.007414


Multiple Linear Regression - Regression Statistics
Multiple R0.502249529664989
R-squared0.252254590048702
Adjusted R-squared0.222738323866414
F-TEST (value)8.5462906619291
F-TEST (DF numerator)6
F-TEST (DF denominator)152
p-value5.24699078630064e-08
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.44273447491298
Sum Squared Residuals1801.56794104266


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12624.0649209656611.93507903433902
22325.2815675462592-2.28156754625918
32525.3058478840459-0.305847884045926
42323.1087259307447-0.108725930744719
51922.8951635532844-3.89516355328441
62923.93888365354165.06111634645843
72525.7671042073953-0.767104207395301
82123.6425327835159-2.64253278351593
92223.0963376883682-1.09633768836818
102523.50765573106521.49234426893478
112421.37931398900442.6206860109956
121820.9720150767733-2.97201507677327
132219.58748404947172.41251595052833
141521.7720459492998-6.77204594929977
152224.3572160827604-2.35721608276036
162825.06671819590232.93328180409774
172023.1549211111529-3.15492111115287
181220.0983484697977-8.09834846979775
192422.40862164392251.59137835607748
202022.4248842071563-2.42488420715633
212124.1696068479225-3.16960684792246
222021.7254699401245-1.72546994012447
232120.19928557458410.80071442541585
242322.07711773838950.922882261610534
252822.78307071660815.21692928339187
262422.69804381779551.30195618220447
272424.2138903633694-0.213890363369409
282421.27066294943042.72933705056958
292322.77683009737050.223169902629514
302323.4257658086257-0.425765808625657
312924.93278642730484.06721357269516
322422.82528290948951.17471709051053
331825.6395985341433-7.63959853414328
342526.5144645979578-1.51446459795780
352123.2472409246222-2.24724092462217
362627.2681817852479-1.26818178524791
372225.7140086053332-3.71400860533322
382223.4681646825109-1.46816468251095
392223.2429912089363-1.24299120893634
402326.1044305215467-3.10443052154670
413023.53923172243496.46076827756508
422323.2458356659081-0.245835665908053
431719.4493250113788-2.44932501137878
442324.2591307314488-1.25913073144876
452324.718575640939-1.71857564093898
462522.92501595346562.07498404653438
472421.34910761054742.65089238945262
482427.7847346279007-3.7847346279007
492323.4624507927264-0.462450792726373
502124.2581925201565-3.25819252015650
512426.0643657791175-2.06436577911748
522422.27012725854211.72987274145789
532821.95732523797186.04267476202816
541621.4412767174295-5.44127671742951
552020.3431420674669-0.343142067466901
562923.79082831951785.20917168048223
572724.155027100392.84497289961
582223.4513607170967-1.45136071709669
592824.16307306667023.83692693332979
601620.7842692974064-4.7842692974064
612523.13046757236971.86953242763029
622423.72116350494490.278836495055051
632823.87228683603194.12771316396808
642424.4263501754649-0.426350175464861
652322.86913574438600.130864255614047
663026.96129024899423.03870975100577
672421.58766038644952.41233961355052
682124.2155561910099-3.2155561910099
692523.39941978167121.60058021832883
702524.03440433253610.965595667463887
712221.03426130966230.965738690337692
722322.5659928541720.434007145828005
732622.96867371320333.03132628679670
742321.82414774342971.17585225657035
752523.14384147007231.85615852992771
762121.4371726833282-0.437172683328207
772523.65221316990411.34778683009587
782422.23222159127261.76777840872739
792923.51791576605985.48208423394016
802223.6506816303374-1.65068163033742
812723.57044995917453.42955004082551
822619.72283023584106.27716976415897
832221.35621770762110.643782292378905
842422.00366609996451.99633390003548
852723.06662345720753.93337654279254
862421.34440981731432.65559018268571
872424.6608334555894-0.660833455589399
882924.18828986329814.81171013670194
892222.1009479856673-0.100947985667271
902120.53161058427150.468389415728455
912420.44883939620613.55116060379393
922421.53003638948912.46996361051086
932321.78769337864661.21230662135342
942022.1275694295439-2.12756942954389
952721.19816599682055.80183400317952
962623.20549890798222.79450109201783
972521.82716349795983.17283650204017
982119.98852906017331.0114709398267
992120.57696099243900.423039007561034
1001920.2144630083883-1.21446300838830
1012121.3475265969951-0.347526596995136
1022120.98535861879030.0146413812096625
1031619.5584249175939-3.5584249175939
1042220.37418944242691.62581055757310
1052921.49994259286657.50005740713355
1061521.4440772756156-6.44407727561556
1071720.3888167239287-3.38881672392871
1081519.6496724848056-4.64967248480563
1092121.3278500194504-0.327850019450360
1102120.68122979831110.318770201688875
1111918.95395869932630.0460413006736844
1122417.83413307975416.16586692024592
1132021.7961238039561-1.79612380395608
1141724.4842650194948-7.48426501949475
1152324.1583086799554-1.15830867995539
1162421.84651290336122.1534870966388
1171421.5117844008051-7.5117844008051
1181922.2913507280418-3.29135072804180
1192421.68541123080252.31458876919748
1201319.9510554657143-6.95105546571428
1212224.6828942962343-2.68289429623433
1221620.5693313552517-4.56933135525173
1231922.6188802033758-3.61888020337582
1242522.07001303180972.92998696819027
1252523.50367053583781.49632946416220
1262320.81857086599072.18142913400929
1272422.79094523985431.20905476014574
1282622.77584757578553.22415242421453
1292620.82228794857985.1777120514202
1302523.41668408516811.58331591483193
1311821.5867258661787-3.58672586617873
1322119.21917348817591.78082651182413
1332622.80944116242113.19055883757895
1342321.17670413985011.82329586014985
1352319.09451566553053.90548433446945
1362221.82135829210810.178641707891905
1372021.5874808656089-1.58748086560890
1381321.2551966611107-8.25519666111074
1392420.56570935033663.43429064966338
1401520.7213804063778-5.72138040637781
1411422.2564443286843-8.25644432868427
1422223.1317158928542-1.13171589285421
1431017.0087352770752-7.00873527707519
1442423.44985471852300.550145281477034
1452220.94277158405591.05722841594408
1462424.7520455181703-0.752045518170322
1471920.7504601735956-1.75046017359557
1482021.1100095714849-1.11000957148492
1491316.3372891356001-3.33728913560006
1502019.18980657709620.810193422903831
1512222.1054696978879-0.105469697887947
1522422.36205645917981.63794354082021
1532922.23676549182526.76323450817484
1541219.9636818356675-7.96368183566751
1552019.91001701453590.0899829854640947
1562120.36394635460990.63605364539008
1572422.52000069098881.47999930901117
1582220.81357683118691.18642316881314
1592016.88329479154833.11670520845174


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.6804502239025820.6390995521948370.319549776097418
110.6359845469964390.7280309060071230.364015453003561
120.5773228279576080.8453543440847830.422677172042392
130.5810684053236670.8378631893526660.418931594676333
140.733906275182730.5321874496345410.266093724817270
150.6530798437767330.6938403124465350.346920156223267
160.6521921436071140.6956157127857720.347807856392886
170.5662070335618460.8675859328763090.433792966438154
180.7101504908974660.5796990182050690.289849509102534
190.6481914631670740.7036170736658530.351808536832926
200.5945304762171820.8109390475656360.405469523782818
210.5250896662042780.9498206675914450.474910333795722
220.4515235697875960.9030471395751930.548476430212404
230.4402156067594470.8804312135188940.559784393240553
240.4900986527266980.9801973054533970.509901347273302
250.6606311602823570.6787376794352860.339368839717643
260.5963980430771340.8072039138457320.403601956922866
270.5329678721165310.9340642557669370.467032127883469
280.5126520826509830.9746958346980340.487347917349017
290.4483144602000610.8966289204001230.551685539799939
300.387221748699750.77444349739950.61277825130025
310.3878114895475070.7756229790950150.612188510452493
320.3278855329750030.6557710659500060.672114467024997
330.5978659080943530.8042681838112940.402134091905647
340.5567158145458820.8865683709082360.443284185454118
350.526900675558120.946198648883760.47309932444188
360.4715891415402060.9431782830804130.528410858459794
370.4576603193029050.915320638605810.542339680697095
380.4060765840963740.8121531681927480.593923415903626
390.3577383449375540.7154766898751080.642261655062446
400.335245493623020.670490987246040.66475450637698
410.4995362704088980.9990725408177950.500463729591102
420.445767272141390.891534544282780.55423272785861
430.4181992280897680.8363984561795350.581800771910232
440.3718402798165750.743680559633150.628159720183425
450.3330373451354030.6660746902708050.666962654864597
460.3065409991508890.6130819983017790.69345900084911
470.2827636255501930.5655272511003860.717236374449807
480.2792870119279530.5585740238559060.720712988072047
490.2426668848939640.4853337697879280.757333115106036
500.2433026211488810.4866052422977620.756697378851119
510.2237179986766630.4474359973533270.776282001323337
520.1941482242719290.3882964485438580.80585177572807
530.2612842700945020.5225685401890040.738715729905498
540.3412991503500420.6825983007000830.658700849649958
550.3258444337044220.6516888674088440.674155566295578
560.3859336818903160.7718673637806310.614066318109684
570.3627597123779650.725519424755930.637240287622035
580.3326722507384280.6653445014768560.667327749261572
590.3326737070879120.6653474141758250.667326292912088
600.413942083191980.827884166383960.58605791680802
610.3702021789942050.740404357988410.629797821005795
620.3284034420652220.6568068841304440.671596557934778
630.3298858217698780.6597716435397560.670114178230122
640.2964275365194090.5928550730388180.703572463480591
650.2580870371891340.5161740743782670.741912962810866
660.2419390080926370.4838780161852740.758060991907363
670.2140437762634570.4280875525269150.785956223736543
680.2368802300568610.4737604601137230.763119769943138
690.2040719147096400.4081438294192800.79592808529036
700.1722071065926520.3444142131853030.827792893407348
710.1441737298473970.2883474596947940.855826270152603
720.1198343477874190.2396686955748380.88016565221258
730.1042005502491520.2084011004983040.895799449750848
740.08467717065167990.1693543413033600.91532282934832
750.06887227522000030.1377445504400010.93112772478
760.05760255258594770.1152051051718950.942397447414052
770.04561983679789480.09123967359578960.954380163202105
780.03554720378930190.07109440757860380.964452796210698
790.04059782692434940.08119565384869890.95940217307565
800.03731986826958460.07463973653916920.962680131730415
810.03128642940627170.06257285881254350.968713570593728
820.04152705267152790.08305410534305590.958472947328472
830.03243673017945610.06487346035891230.967563269820544
840.02539268363400810.05078536726801610.974607316365992
850.02331818975169080.04663637950338170.97668181024831
860.01845570837262840.03691141674525680.981544291627372
870.01503378454415610.03006756908831220.984966215455844
880.01546107106068370.03092214212136750.984538928939316
890.01300566474350210.02601132948700420.986994335256498
900.009835150672791340.01967030134558270.990164849327209
910.00840214339541550.0168042867908310.991597856604585
920.00686449231056660.01372898462113320.993135507689433
930.005058387650097450.01011677530019490.994941612349903
940.004820755449273970.009641510898547940.995179244550726
950.007192716380490060.01438543276098010.99280728361951
960.005871846263454180.01174369252690840.994128153736546
970.005023763093092230.01004752618618450.994976236906908
980.003851196784266910.007702393568533810.996148803215733
990.002911770444099870.005823540888199730.9970882295559
1000.002425581687420700.004851163374841390.99757441831258
1010.001912568333834170.003825136667668350.998087431666166
1020.001408128273150770.002816256546301540.99859187172685
1030.001735412085738820.003470824171477630.998264587914261
1040.001357701594012320.002715403188024640.998642298405988
1050.005962919851494380.01192583970298880.994037080148506
1060.01447366928777810.02894733857555620.985526330712222
1070.01530064899359630.03060129798719250.984699351006404
1080.02084117505882950.04168235011765910.97915882494117
1090.01631170216579540.03262340433159070.983688297834205
1100.01189681279474490.02379362558948990.988103187205255
1110.008646927914932860.01729385582986570.991353072085067
1120.02493434159919390.04986868319838780.975065658400806
1130.02507739235758040.05015478471516070.97492260764242
1140.0619512220529110.1239024441058220.93804877794709
1150.05330245910814060.1066049182162810.94669754089186
1160.04501058892531990.09002117785063980.95498941107468
1170.1160999017866240.2321998035732490.883900098213376
1180.1100225462523990.2200450925047990.8899774537476
1190.09882388731906950.1976477746381390.90117611268093
1200.1702983093600650.3405966187201310.829701690639935
1210.1678873785131340.3357747570262680.832112621486866
1220.2123224307058730.4246448614117460.787677569294127
1230.2125495016621860.4250990033243710.787450498337814
1240.2025957436443630.4051914872887250.797404256355637
1250.1772626885288170.3545253770576350.822737311471183
1260.1439701944702380.2879403889404750.856029805529762
1270.1143083954034220.2286167908068440.885691604596578
1280.1121201606485000.2242403212970000.8878798393515
1290.1560469377507500.3120938755014990.84395306224925
1300.1366434140822420.2732868281644850.863356585917758
1310.1161721983223270.2323443966446540.883827801677673
1320.1044256611782450.2088513223564890.895574338821755
1330.1030839063850610.2061678127701220.896916093614939
1340.09302892207644720.1860578441528940.906971077923553
1350.2102191741486180.4204383482972350.789780825851382
1360.1714376967481820.3428753934963630.828562303251818
1370.1466139592307180.2932279184614360.853386040769282
1380.2046025977773900.4092051955547790.79539740222261
1390.4642828774942660.9285657549885320.535717122505734
1400.4103980470633120.8207960941266240.589601952936688
1410.5654613320190340.8690773359619330.434538667980966
1420.4768371488295760.9536742976591520.523162851170424
1430.6484408287010840.7031183425978330.351559171298916
1440.6035184164988610.7929631670022780.396481583501139
1450.5137474154065660.9725051691868670.486252584593434
1460.4098380138521350.819676027704270.590161986147865
1470.4153038536241730.8306077072483460.584696146375827
1480.2855480842012740.5710961684025470.714451915798726
1490.1989602590167680.3979205180335360.801039740983232


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level80.0571428571428571NOK
5% type I error level280.2NOK
10% type I error level380.271428571428571NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905281704xs6mljx4oehdz6/10zpxa1290528170.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905281704xs6mljx4oehdz6/10zpxa1290528170.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905281704xs6mljx4oehdz6/1t6ih1290528170.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905281704xs6mljx4oehdz6/1t6ih1290528170.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905281704xs6mljx4oehdz6/280781290528170.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905281704xs6mljx4oehdz6/280781290528170.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905281704xs6mljx4oehdz6/380781290528170.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905281704xs6mljx4oehdz6/380781290528170.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905281704xs6mljx4oehdz6/480781290528170.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905281704xs6mljx4oehdz6/480781290528170.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905281704xs6mljx4oehdz6/5w6hn1290528170.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905281704xs6mljx4oehdz6/5w6hn1290528170.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905281704xs6mljx4oehdz6/6w6hn1290528170.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905281704xs6mljx4oehdz6/6w6hn1290528170.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905281704xs6mljx4oehdz6/77gz81290528170.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905281704xs6mljx4oehdz6/77gz81290528170.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905281704xs6mljx4oehdz6/87gz81290528170.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905281704xs6mljx4oehdz6/87gz81290528170.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905281704xs6mljx4oehdz6/9zpxa1290528170.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905281704xs6mljx4oehdz6/9zpxa1290528170.ps (open in new window)


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