Home » date » 2009 » Dec » 27 »

Case - Multiple Regression 3

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Sun, 27 Dec 2009 13:50:43 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/27/t12619472073b16l0xkyejxh88.htm/, Retrieved Sun, 27 Dec 2009 21:53:39 +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/Dec/27/t12619472073b16l0xkyejxh88.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 «
11881.4 423.4 10374.2 404.1 13828 500 13490.5 472.6 13092.2 496.1 13184.4 562 12398.4 434.8 13882.3 538.2 15861.5 577.6 13286.1 518.1 15634.9 625.2 14211 561.2 13646.8 523.3 12224.6 536.1 15916.4 607.3 16535.9 637.3 15796 606.9 14418.6 652.9 15044.5 617.2 14944.2 670.4 16754.8 729.9 14254 677.2 15454.9 710 15644.8 844.3 14568.3 748.2 12520.2 653.9 14803 742.6 15873.2 854.2 14755.3 808.4 12875.1 1819 14291.1 1936.5 14205.3 1966.1 15859.4 2083.1 15258.9 1620.1 15498.6 1527.6 15106.5 1795 15023.6 1685.1 12083 1851.8 15761.3 2164.4 16943 1981.8 15070.3 1726.5 13659.6 2144.6 14768.9 1758.2 14725.1 1672.9 15998.1 1837.3 15370.6 1596.1 14956.9 1446 15469.7 1898.4 15101.8 1964.1 11703.7 1755.9 16283.6 2255.3 16726.5 1881.2 14968.9 2117.9 14861 1656.5 14583.3 1544.1 15305.8 2098.9 17903.9 2133.3 16379.4 1963.5 15420.3 1801.2 17870.5 2365.4 15912.8 1936.5 13866.5 1667.6 17823.2 1983.5 17872 2058.6 17420.4 2448.3 16704.4 1858.1 15991.2 1625.4 16583.6 213 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 time6 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Y(Totale_export_België)[t] = + 14089.4720911269 -0.106970112958017`X(Export_farma_België)`[t] -1122.31209757918M1[t] -3382.67546988105M2[t] + 148.350628600380M3[t] + 469.703387358281M4[t] -676.882502217039M5[t] -2096.74617633866M6[t] -1643.94855487694M7[t] -1373.48568576860M8[t] + 528.958286622583M9[t] -1086.88490381533M10[t] -838.104704988366M11[t] + 62.121157076025t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)14089.4720911269571.97221824.633100
`X(Export_farma_België)`-0.1069701129580170.406747-0.2630.7930690.396535
M1-1122.31209757918632.236753-1.77510.0787440.039372
M2-3382.67546988105635.620823-5.32181e-060
M3148.350628600380631.1736270.2350.8146320.407316
M4469.703387358281629.888610.74570.4575030.228752
M5-676.882502217039630.180469-1.07410.2852130.142606
M6-2096.74617633866634.788403-3.30310.0013050.000652
M7-1643.94855487694632.652952-2.59850.0106960.005348
M8-1373.48568576860629.450286-2.1820.0313150.015657
M9528.958286622583631.7800170.83730.4043350.202168
M10-1086.88490381533631.23077-1.72190.0880140.044007
M11-838.104704988366637.924653-1.31380.191750.095875
t62.1211570760259.5431556.509500


Multiple Linear Regression - Regression Statistics
Multiple R0.872840011786236
R-squared0.761849686174996
Adjusted R-squared0.732642572215326
F-TEST (value)26.0843877702868
F-TEST (DF numerator)13
F-TEST (DF denominator)106
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1406.87570345254
Sum Squared Residuals209805719.966299


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
111881.412983.9900047974-1102.59000479742
210374.210787.8123127516-413.61231275156
31382814370.7011344764-542.701134476354
413490.514757.1060314053-1266.60603140533
513092.213670.1275012515-577.927501251521
613184.412305.3356537620879.064346238015
712398.412833.861030668-435.461030667998
813882.313155.3843471725726.915652827491
915861.515115.7348541892745.765145810837
1013286.113568.3775425483-282.277542548279
1115634.913867.82239935351767.07760064654
121421114774.8943486472-563.894348647167
1313646.813718.7575754251-71.9575754251279
1412224.611519.1461427534705.453857246584
1515916.415104.6771262683811.722873731742
1616535.915484.94193871341050.95806128656
171579614403.72909764811392.27090235193
1814418.613041.06595540641377.53404459360
1915044.513559.80356697681484.69643302324
2014944.213886.69678315181057.50321684825
2116754.815844.8971908980909.90280910204
221425414296.8124824890-42.8124824889603
2315454.914604.2052186869850.694781313076
2415644.815490.0649945811154.735005418945
2514568.314440.1538819332128.146118066832
2612520.212251.9989483593268.201051640741
271480315835.6579548973-1032.65795489734
2815873.216207.1940061251-333.994006125149
2914755.315127.6285047993-372.328504799333
3012875.113661.7819915984-786.68199159836
3114291.114164.1317818635126.968218136457
3214205.314493.5494927044-288.249492704354
3315859.416445.5991189555-586.19911895547
3415258.914941.4042478931317.495752106854
3515498.615262.2003392447236.399660755252
3615106.516133.8223931042-1027.32239310417
3715023.615085.3874680151-61.7874680151016
381208312869.3133349592-786.31333495915
3915761.316429.0217332059-667.721733205931
401694316832.028391666110.971608334010
4115070.315774.8731290049-704.573129004878
4213659.614372.4064077315-712.806407731529
4314768.914928.6584379163-159.758437916259
4414725.115270.3670147359-545.267014735943
4515998.117217.3462576328-1219.24625763285
4615370.615689.4254155164-318.825415516439
4714956.916016.3829853744-1059.48298537442
4815469.716868.2155683366-1398.51556833661
4915101.815800.9966914121-699.196691412116
5011703.713625.0256537041-1921.32565370412
5116283.617164.7520348503-881.152034850346
5216726.517588.2434699419-861.743469941866
5314968.916478.4589117054-1509.55891170541
541486115170.0724047786-309.072404778636
5514583.315697.0146240129-1113.71462401287
5615305.815970.2516315281-664.451631528129
5717903.917931.1369891096-27.2369891095757
5816379.416395.5784809280-16.1784809279634
5915420.316723.8410861640-1303.54108616404
6017870.517563.7144104975306.785589502486
6115912.816549.4029514421-636.602951442057
6213866.514379.9249995906-513.424999590617
6317823.217939.2803964646-116.080396464635
641787218314.7208568154-442.720856815414
6517420.417188.5698712964231.830128703621
6616704.415893.9611149186810.4388850814
6715991.216433.7718387417-442.571838741683
6816583.616712.3145638597-128.714563859661
6919123.518635.6855028267487.814497173268
7017838.717112.5034367144726.196563285641
7117209.417438.7336098042-229.333609804228
7218586.518323.1171981395263.382801860461
7316258.117277.3458288631-1019.24582886313
7415141.615058.95044435682.649555644012
7519202.118630.5539191637571.546080836299
7617746.519005.0744365430-1258.57443654304
7719090.117923.80811042121166.29188957881
7818040.316623.73318127131416.56681872874
7917515.517097.4363752863418.063624713716
8017751.817435.5400592993316.259940700715
8121072.419358.80402815341713.59597184660
821717017851.2930835894-681.293083589376
8319439.518152.19273393081287.30726606921
8419795.419042.5880426143752.811957385664
8517574.917997.4691910270-422.569191026969
8616165.415770.5482885171394.851711482924
8719464.619368.434320078696.165679921426
8819932.119722.1170594537209.982940546308
8919961.218683.87411276361277.32588723645
9017343.417360.5759720904-17.1759720904340
9118924.217805.92138916031118.27861083971
9218574.118131.755601217442.34439878299
9321350.620069.09683693641281.50316306360
9418594.618584.71283079399.88716920609968
9519823.118888.45788614934.642113860005
9620844.419761.36358135491083.03641864509
9719640.218694.3907356902945.809264309782
9817735.416539.50350724631195.89649275375
9919813.620044.8069060426-231.206906042587
1002216020481.87284846851678.12715153152
10120664.319310.46280815691353.83719184309
10217877.418119.9680627212-242.568062721164
10320906.518567.55985216312338.94014783686
10421164.118905.33192882602258.76807117403
10521374.420853.8408443382520.559155661824
10622952.319280.85349363263671.44650636745
10721343.519659.08183863131684.41816136869
10823899.320484.61047081713414.68952918288
10922392.919452.90567139472939.99432860531
11018274.117286.4763677626987.623632237442
11122786.720794.61447455231992.08552544772
11222321.521207.90096086761113.5990391324
11317842.220099.3679529528-2257.16795295275
11416373.518788.7992557216-2415.29925572164
11515993.819329.2411032112-3335.44110321117
11616446.119621.2085775054-3175.10857750538
1171772921555.4583769603-3826.45837696028
1181664320026.6389858950-3383.63898589502
11916196.720364.8819026701-4168.18190267008
12018252.121237.8089919076-2985.70899190759


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.01735644485931720.03471288971863440.982643555140683
180.005867446338289720.01173489267657940.99413255366171
190.001834503448433210.003669006896866410.998165496551567
200.003071166101216110.006142332202432220.996928833898784
210.00501312683245910.01002625366491820.99498687316754
220.003974582092673640.007949164185347280.996025417907326
230.005873300034952390.01174660006990480.994126699965048
240.004538556747145820.009077113494291640.995461443252854
250.002586220081583930.005172440163167870.997413779918416
260.001880492584494520.003760985168989040.998119507415505
270.005542817640719650.01108563528143930.99445718235928
280.004639144017368930.009278288034737850.99536085598263
290.004767730414585590.009535460829171190.995232269585414
300.002775281258216880.005550562516433760.997224718741783
310.002368472839126210.004736945678252430.997631527160874
320.001168926220046370.002337852440092740.998831073779954
330.0005671352842654630.001134270568530930.999432864715735
340.0004540860065553570.0009081720131107130.999545913993445
350.0002676616848991140.0005353233697982280.999732338315101
360.0001275341784533700.0002550683569067400.999872465821547
377.73138132044735e-050.0001546276264089470.999922686186796
383.71757000782268e-057.43514001564536e-050.999962824299922
391.99637303927023e-053.99274607854045e-050.999980036269607
401.33665613327342e-052.67331226654685e-050.999986633438667
416.78838873962318e-061.35767774792464e-050.99999321161126
424.7399571099948e-069.4799142199896e-060.99999526004289
432.3551063061521e-064.7102126123042e-060.999997644893694
442.01736667827823e-064.03473335655646e-060.999997982633322
452.67231940008537e-065.34463880017073e-060.9999973276806
461.15675231685200e-062.31350463370400e-060.999998843247683
473.08937080647812e-066.17874161295624e-060.999996910629193
481.76424128077106e-063.52848256154212e-060.99999823575872
498.65014898262523e-071.73002979652505e-060.999999134985102
501.37296844426694e-062.74593688853388e-060.999998627031556
517.56550741460362e-071.51310148292072e-060.999999243449259
523.51834081840877e-077.03668163681753e-070.999999648165918
532.34733630147842e-074.69467260295684e-070.99999976526637
541.04847811536299e-072.09695623072598e-070.999999895152188
558.06066784338784e-081.61213356867757e-070.999999919393322
563.78376602886799e-087.56753205773598e-080.99999996216234
571.96564983272976e-083.93129966545953e-080.999999980343502
581.05204268311707e-082.10408536623413e-080.999999989479573
591.11147827433950e-082.22295654867900e-080.999999988885217
602.53008800787030e-085.06017601574059e-080.99999997469912
611.39411199898488e-082.78822399796976e-080.99999998605888
627.05722691463868e-091.41144538292774e-080.999999992942773
634.20090468598373e-098.40180937196747e-090.999999995799095
642.02858832943575e-094.0571766588715e-090.999999997971412
652.12939201832490e-094.25878403664979e-090.999999997870608
661.27171105151317e-092.54342210302634e-090.999999998728289
675.51490079170906e-101.10298015834181e-090.99999999944851
682.28277174860654e-104.56554349721308e-100.999999999771723
691.49484962570826e-102.98969925141653e-100.999999999850515
701.15307501768771e-102.30615003537542e-100.999999999884692
715.00160019110999e-111.00032003822200e-100.999999999949984
723.55667783502465e-117.1133556700493e-110.999999999964433
733.79806294459654e-117.59612588919309e-110.99999999996202
743.52511013757873e-117.05022027515746e-110.999999999964749
753.58749406435101e-117.17498812870201e-110.999999999964125
768.37228999438605e-111.67445799887721e-100.999999999916277
771.37858788474727e-102.75717576949454e-100.99999999986214
788.87125505973538e-111.77425101194708e-100.999999999911287
794.82171169958728e-119.64342339917457e-110.999999999951783
802.06513910997900e-114.13027821995799e-110.999999999979349
813.26572956537893e-116.53145913075785e-110.999999999967343
823.54946487487968e-117.09892974975937e-110.999999999964505
832.53727026465930e-115.07454052931861e-110.999999999974627
842.02164315260275e-114.0432863052055e-110.999999999979784
856.62987346210738e-111.32597469242148e-100.999999999933701
868.8629423503521e-111.77258847007042e-100.99999999991137
871.12767277733777e-102.25534555467555e-100.999999999887233
883.73189470098523e-107.46378940197046e-100.99999999962681
892.23138842414833e-104.46277684829666e-100.99999999977686
901.61391531148961e-103.22783062297921e-100.999999999838608
911.03244248136967e-102.06488496273934e-100.999999999896756
927.15165246291029e-111.43033049258206e-100.999999999928483
933.15619826438402e-116.31239652876805e-110.999999999968438
941.42067802830166e-102.84135605660332e-100.999999999857932
956.8511843717601e-111.37023687435202e-100.999999999931488
963.75645906373081e-107.51291812746162e-100.999999999624354
972.64623872483576e-085.29247744967153e-080.999999973537613
981.36333974713852e-072.72667949427703e-070.999999863666025
990.001468002375695480.002936004751390970.998531997624305
1000.07895280082551640.1579056016510330.921047199174484
1010.6069104615650240.7861790768699520.393089538434976
1020.7571880256942560.4856239486114870.242811974305744
1030.807537784643640.3849244307127210.192462215356360


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level780.896551724137931NOK
5% type I error level830.954022988505747NOK
10% type I error level830.954022988505747NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/27/t12619472073b16l0xkyejxh88/103ain1261947035.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/27/t12619472073b16l0xkyejxh88/103ain1261947035.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/27/t12619472073b16l0xkyejxh88/1fuu71261947035.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/27/t12619472073b16l0xkyejxh88/1fuu71261947035.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/27/t12619472073b16l0xkyejxh88/2er7w1261947035.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/27/t12619472073b16l0xkyejxh88/2er7w1261947035.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/27/t12619472073b16l0xkyejxh88/31bmn1261947035.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/27/t12619472073b16l0xkyejxh88/31bmn1261947035.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/27/t12619472073b16l0xkyejxh88/4f2ft1261947035.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/27/t12619472073b16l0xkyejxh88/4f2ft1261947035.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/27/t12619472073b16l0xkyejxh88/5bjd61261947035.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/27/t12619472073b16l0xkyejxh88/5bjd61261947035.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/27/t12619472073b16l0xkyejxh88/64ouq1261947035.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/27/t12619472073b16l0xkyejxh88/64ouq1261947035.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/27/t12619472073b16l0xkyejxh88/7jevj1261947035.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/27/t12619472073b16l0xkyejxh88/7jevj1261947035.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/27/t12619472073b16l0xkyejxh88/8kvpd1261947035.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/27/t12619472073b16l0xkyejxh88/8kvpd1261947035.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/27/t12619472073b16l0xkyejxh88/9ev3l1261947035.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/27/t12619472073b16l0xkyejxh88/9ev3l1261947035.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