Home » date » 2010 » Dec » 13 »

WS10 Multiple Regression

*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: Mon, 13 Dec 2010 13:48:19 +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/Dec/13/t1292248090f3o1mvpa7ycherb.htm/, Retrieved Mon, 13 Dec 2010 14:50:20 +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/Dec/13/t1292248090f3o1mvpa7ycherb.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 «
10.81 24563400 -0,2643 24.45 2772.73 0,0373 115.7 5,98 9.12 14163200 -0,2643 23.62 2151.83 0,0353 109.2 5,49 11.03 18184800 -0,2643 21.90 1840.26 0,0292 116.9 5,31 12.74 20810300 -0,1918 27.12 2116.24 0,0327 109.9 4,8 9.98 12843000 -0,1918 27.70 2110.49 0,0362 116.1 4,21 11.62 13866700 -0,1918 29.23 2160.54 0,0325 118.9 3,97 9.40 15119200 -0,2246 26.50 2027.13 0,0272 116.3 3,77 9.27 8301600 -0,2246 22.84 1805.43 0,0272 114.0 3,65 7.76 14039600 -0,2246 20.49 1498.80 0,0265 97.0 3,07 8.78 12139700 0,3654 23.28 1690.20 0,0213 85.3 2,49 10.65 9649000 0,3654 25.71 1930.58 0,019 84.9 2,09 10.95 8513600 0,3654 26.52 1950.40 0,0155 94.6 1,82 12.36 15278600 0,0447 25.51 1934.03 0,0114 97.8 1,73 10.85 15590900 0,0447 23.36 1731.49 0,0114 95.0 1,74 11.84 9691100 0,0447 24.15 1845.35 0,0148 110.7 1,73 12.14 10882700 -0,0312 20.92 1688.23 0,0164 108.5 1,75 11.65 10294800 -0,0312 20.38 1615.73 0,0118 110.3 1,75 8.86 16031900 -0,0312 21.90 1463.21 0,0107 106.3 1,75 7.63 13683600 -0,0048 1 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 time8 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
APPLE[t] = -85.2045348232553 + 4.38917615134893e-07VOLUME[t] + 28.1570131846652REV.GROWTH[t] + 6.5065975563462MICROSOFT[t] + 0.0881512189265601NASDAQ[t] -961.803925838046INFLATION[t] -1.98103449491010CONS.CONF[t] + 1.03003237831381FED.FUNDS.RATE[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-85.204534823255328.425357-2.99750.0033720.001686
VOLUME4.38917615134893e-0701.27030.2066710.103335
REV.GROWTH28.157013184665215.8862811.77240.079120.03956
MICROSOFT6.50659755634621.5438884.21445.2e-052.6e-05
NASDAQ0.08815121892656010.0184214.78545e-063e-06
INFLATION-961.803925838046268.539097-3.58160.0005120.000256
CONS.CONF-1.981034494910100.216208-9.162600
FED.FUNDS.RATE1.030032378313813.8098390.27040.7873940.393697


Multiple Linear Regression - Regression Statistics
Multiple R0.913298070864655
R-squared0.8341133662451
Adjusted R-squared0.823460096187447
F-TEST (value)78.2964631264382
F-TEST (DF numerator)7
F-TEST (DF denominator)109
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation31.9226167034062
Sum Squared Residuals111076.826833992


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
110.8162.719331174007-51.909331174007
29.1212.3165485930306-3.19654859303057
311.03-34.14729089509945.177290895099
412.7437.3144946138030-24.5744946138030
59.9820.8280166605108-10.8480166605108
611.6233.4089695606654-21.7889695606654
79.413.5541424133923-4.15414241339227
89.27-28.362719158901137.6327191589011
97.76-34.411092017985542.1710920179855
108.7843.9752618941057-35.1952618941057
1110.6582.475421733643-71.825421733643
1210.9572.8667462508443-61.9167462508443
1312.3656.3027536013476-43.9427536013476
1410.8530.1536918545558-19.3036918545558
1511.848.358600323553563.48139967644644
1612.14-25.282142116679537.4221421166795
1711.65-34.586271867203146.2362718672031
188.86-26.640830944383235.5008309443832
197.63-42.467379406274650.0973794062746
207.38-40.498814464525747.8788144645257
217.25-62.100345987433669.3503459874336
228.032.601073709051575.42892629094843
237.7513.0691199253444-5.31911992534443
247.16-8.757619698942515.9176196989425
257.18-20.584183947785427.7641839477854
267.514.028209905959113.48179009404089
277.0713.0014100041374-5.93141000413738
287.115.435983302321041.67401669767897
298.9810.6249259484946-1.64492594849464
309.5314.4448804594925-4.91488045949246
3110.5443.1917031351319-32.6517031351319
3211.3140.1342530329536-28.8242530329536
3310.3653.3078493361767-42.9478493361767
3411.4457.2727598180085-45.8327598180085
3510.4537.8791384671795-27.4291384671795
3610.6950.7481661995594-40.0581661995594
3711.2848.424642990894-37.144642990894
3811.9655.3586848232579-43.3986848232579
3913.5247.0782193405312-33.5582193405312
4012.8931.7444969980815-18.8544969980815
4114.0327.8845805751168-13.8545805751168
4216.2726.3456642223851-10.0756642223851
4316.1711.87592215214574.29407784785435
4417.2517.6123477229756-0.362347722975628
4519.3829.8862157063213-10.5062157063213
4626.256.8750375008186-30.6750375008186
4733.5376.4614339307148-42.9314339307148
4832.263.3780485465359-31.1780485465359
4938.4557.7205143361653-19.2705143361653
5044.8648.6570358397455-3.79703583974554
5141.6732.41143937141189.25856062858818
5236.0645.3062202578867-9.24622025788673
5339.7652.4968457444182-12.7368457444182
5436.8140.8095751396519-3.99957513965192
5542.6550.6967007326058-8.04670073260581
5646.8949.0340009471973-2.14400094719728
5753.6167.8543168254959-14.2443168254959
5857.5980.2028101607748-22.6128101607748
5967.8281.059542518191-13.2395425181909
6071.8958.908513902724812.9814860972752
6175.5167.49212952171378.01787047828636
6268.4968.985320509384-0.495320509383987
6362.7268.8908034214519-6.17080342145188
6470.3940.952236317590429.4377636824096
6559.7718.930114168514140.8398858314859
6657.2720.136279920234737.1337200797653
6767.9620.066374546445947.8936254535541
6867.8553.449737928683214.4002620713167
6976.9877.1836686205179-0.203668620517895
7081.0897.9838305532285-16.9038305532285
7191.66101.832201322439-10.1722013224393
7284.8491.7395551694772-6.89955516947724
7385.73113.226251384054-27.4962513840536
7484.6178.2402093002786.3697906997221
7592.9179.07330904240513.8366909575951
7699.8107.483918444190-7.68391844418985
77121.19116.3781366685214.81186333147939
78122.04120.1154750423551.92452495764459
79131.76105.90384339630125.8561566036990
80138.48123.28400497719615.1959950228038
81153.47142.01931804536811.4506819546316
82189.95202.944147671640-12.9941476716403
83182.22177.5834912442254.63650875577469
84198.08178.97027455676619.1097254432341
85135.36155.196026860577-19.8360268605767
86125.02129.76855374878-4.7485537487801
87143.5156.726784695558-13.2267846955583
88173.95170.7765220233803.17347797662046
89188.75184.643643420774.10635657922989
90167.44165.5152604220091.92473957799144
91158.95159.162411053746-0.21241105374623
92169.53157.95833850745811.5716614925423
93113.66137.1109921974-23.4509921974000
94107.59126.845763624126-19.2557636241260
9592.67100.868788778525-8.19878877852451
9685.35116.481247877928-31.1312478779284
9790.13161.991059648354-71.8610596483543
9889.31101.212722717554-11.9027227175536
99105.12130.549655028455-25.4296550284550
100125.83136.920775066969-11.0907750669691
101135.81122.82672994227712.9832700577233
102142.43160.272068135717-17.8420681357169
103163.39173.855587606783-10.4655876067827
104168.21162.7537442885415.45625571145851
105185.35181.3869239135723.96307608642802
106188.5195.147207171396-6.64720717139605
107199.91189.45846817730410.4515318226958
108210.73194.27254306000216.4574569399980
109192.06173.85071033356218.2092896664383
110204.62206.341607230959-1.72160723095854
111235210.36426094888124.6357390511195
112261.09218.59046403211842.499535967882
113256.88168.3666253251788.51337467483
114251.53160.90067804631490.6293219536864
115257.25197.60756287283259.6424371271679
116243.1162.58208162689280.5179183731076
117283.75203.02198814500980.7280118549914


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
119.93984868386276e-050.0001987969736772550.999900601513161
123.75528495496602e-067.51056990993203e-060.999996244715045
131.40415187592706e-072.80830375185412e-070.999999859584812
144.43679524443318e-098.87359048886636e-090.999999995563205
153.2787499481599e-106.5574998963198e-100.999999999672125
164.83938169169561e-119.67876338339122e-110.999999999951606
171.87273445471078e-123.74546890942155e-120.999999999998127
181.01078373073410e-122.02156746146819e-120.99999999999899
198.59501249251238e-141.71900249850248e-130.999999999999914
205.04829534913243e-151.00965906982649e-140.999999999999995
214.49634627660944e-168.99269255321887e-161
222.78293446701977e-175.56586893403954e-171
231.1955696367963e-182.3911392735926e-181
246.60852797051415e-201.32170559410283e-191
255.80911855173071e-211.16182371034614e-201
267.9873602976131e-221.59747205952262e-211
274.97782091111176e-239.95564182222351e-231
284.83034863825841e-249.66069727651681e-241
292.84125116913218e-255.68250233826435e-251
301.88903654283953e-263.77807308567906e-261
311.29292177584207e-272.58584355168413e-271
329.73198006053913e-291.94639601210783e-281
334.39000219102545e-308.7800043820509e-301
343.06414982941582e-316.12829965883165e-311
352.20033502101293e-324.40067004202586e-321
361.64829608112117e-333.29659216224234e-331
371.15290506131888e-342.30581012263776e-341
381.35529818143040e-352.71059636286080e-351
391.3428213006449e-352.6856426012898e-351
403.04563572334256e-366.09127144668512e-361
412.48714847361289e-364.97429694722578e-361
421.54250888690184e-363.08501777380367e-361
431.9737339055093e-373.9474678110186e-371
446.80275674278552e-371.36055134855710e-361
454.48035287166176e-358.96070574332352e-351
461.75925932315777e-343.51851864631553e-341
475.4181966750562e-321.08363933501124e-311
485.78731021919091e-311.15746204383818e-301
492.11494834863372e-314.22989669726743e-311
501.0919007730059e-282.1838015460118e-281
516.05918482025972e-261.21183696405194e-251
529.56614976926253e-271.91322995385251e-261
537.7178701517261e-261.54357403034522e-251
541.03656652612921e-252.07313305225843e-251
551.92252220674638e-223.84504441349275e-221
565.97032392482011e-201.19406478496402e-191
572.8140491823456e-175.6280983646912e-171
588.70441440649926e-161.74088288129985e-151
593.28081589555314e-126.56163179110628e-120.99999999999672
605.44923997479065e-101.08984799495813e-090.999999999455076
612.46102583235247e-074.92205166470493e-070.999999753897417
621.54566562354627e-063.09133124709254e-060.999998454334377
638.0877778880804e-061.61755557761608e-050.999991912222112
642.32825904036498e-054.65651808072995e-050.999976717409596
651.76684941687336e-053.53369883374671e-050.999982331505831
661.04032478035949e-052.08064956071899e-050.999989596752196
673.17259754812911e-056.34519509625822e-050.99996827402452
686.14290417222864e-050.0001228580834445730.999938570958278
690.0001069245161536870.0002138490323073740.999893075483846
700.0002308855981196470.0004617711962392940.99976911440188
710.0007472453768071430.001494490753614290.999252754623193
720.0009074060560187060.001814812112037410.999092593943981
730.0008690996710562750.001738199342112550.999130900328944
740.001011960140339760.002023920280679510.99898803985966
750.002389938266738310.004779876533476610.997610061733262
760.004059595840944090.008119191681888190.995940404159056
770.01642238915945410.03284477831890830.983577610840546
780.02411436982886020.04822873965772040.97588563017114
790.03691196516251770.07382393032503530.963088034837482
800.05169094917802590.1033818983560520.948309050821974
810.1018447530157180.2036895060314370.898155246984282
820.2751693855386660.5503387710773320.724830614461334
830.369991471587950.73998294317590.63000852841205
840.8839451634970990.2321096730058020.116054836502901
850.9279235093253360.1441529813493280.0720764906746642
860.9068328686529030.1863342626941930.0931671313470965
870.921977607047760.1560447859044800.0780223929522399
880.9441659343681960.1116681312636080.0558340656318039
890.9444775739355320.1110448521289360.055522426064468
900.978718739657370.0425625206852590.0212812603426295
910.9713196577815230.05736068443695390.0286803422184769
920.966549439500990.06690112099801770.0334505604990089
930.985215049979190.02956990004161790.0147849500208090
940.9816591028732060.03668179425358820.0183408971267941
950.96886462283560.06227075432880090.0311353771644004
960.9715699584213060.05686008315738770.0284300415786938
970.959293917700410.08141216459917920.0407060822995896
980.940516143218880.1189677135622400.0594838567811202
990.9548085453601690.09038290927966230.0451914546398312
1000.9304403430052740.1391193139894520.0695596569947262
1010.9731571017788290.05368579644234270.0268428982211714
1020.9628075130840470.07438497383190610.0371924869159530
1030.9460931388273150.1078137223453690.0539068611726846
1040.9336822209419740.1326355581160510.0663177790580257
1050.962572059548520.07485588090296040.0374279404514802
1060.9739777856826370.0520444286347270.0260222143173635


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level660.6875NOK
5% type I error level710.739583333333333NOK
10% type I error level820.854166666666667NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292248090f3o1mvpa7ycherb/10p2df1292248089.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292248090f3o1mvpa7ycherb/10p2df1292248089.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292248090f3o1mvpa7ycherb/1ikym1292248089.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292248090f3o1mvpa7ycherb/1ikym1292248089.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292248090f3o1mvpa7ycherb/2ikym1292248089.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292248090f3o1mvpa7ycherb/2ikym1292248089.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292248090f3o1mvpa7ycherb/3tbfo1292248089.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292248090f3o1mvpa7ycherb/3tbfo1292248089.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292248090f3o1mvpa7ycherb/4tbfo1292248089.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292248090f3o1mvpa7ycherb/4tbfo1292248089.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292248090f3o1mvpa7ycherb/5tbfo1292248089.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292248090f3o1mvpa7ycherb/5tbfo1292248089.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292248090f3o1mvpa7ycherb/6m2er1292248089.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292248090f3o1mvpa7ycherb/6m2er1292248089.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292248090f3o1mvpa7ycherb/7m2er1292248089.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292248090f3o1mvpa7ycherb/7m2er1292248089.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292248090f3o1mvpa7ycherb/8wtwu1292248089.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292248090f3o1mvpa7ycherb/8wtwu1292248089.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292248090f3o1mvpa7ycherb/9wtwu1292248089.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292248090f3o1mvpa7ycherb/9wtwu1292248089.ps (open in new window)


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