Home » date » 2009 » Dec » 05 »

*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: Sat, 05 Dec 2009 12:00:47 -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/05/t12600397036idn0u5aytoe1zu.htm/, Retrieved Sat, 05 Dec 2009 20:01:55 +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/05/t12600397036idn0u5aytoe1zu.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 «
8776 0 8823 9051 8255 0 8776 8823 7969 0 8255 8776 8758 0 7969 8255 8693 0 8758 7969 8271 0 8693 8758 7790 0 8271 8693 7769 0 7790 8271 8170 0 7769 7790 8209 0 8170 7769 9395 0 8209 8170 9260 0 9395 8209 9018 0 9260 9395 8501 0 9018 9260 8500 0 8501 9018 9649 0 8500 8501 9319 0 9649 8500 8830 0 9319 9649 8436 0 8830 9319 8169 0 8436 8830 8269 0 8169 8436 7945 0 8269 8169 9144 0 7945 8269 8770 0 9144 7945 8834 0 8770 9144 7837 0 8834 8770 7792 0 7837 8834 8616 0 7792 7837 8518 0 8616 7792 7940 0 8518 8616 7545 0 7940 8518 7531 0 7545 7940 7665 0 7531 7545 7599 0 7665 7531 8444 0 7599 7665 8549 0 8444 7599 7986 0 8549 8444 7335 0 7986 8549 7287 0 7335 7986 7870 0 7287 7335 7839 0 7870 7287 7327 0 7839 7870 7259 0 7327 7839 6964 0 7259 7327 7271 0 6964 7259 6956 0 7271 6964 7608 0 6956 7271 7692 0 7608 6956 7255 0 7692 7608 6804 0 7255 7692 6655 0 6804 7255 7341 0 6655 6804 7602 0 7341 6655 7086 0 7602 7341 6625 0 7086 7602 6272 0 6625 7086 6576 0 6272 6625 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[t] = -118.273578215342 + 298.441154509799X[t] + 1.00180797541842Y1[t] + 4.4709957013409e-06Y2[t] -148.968859133025M1[t] -581.425595573577M2[t] + 150.275891664170M3[t] + 885.158588241026M4[t] + 106.834156822982M5[t] -420.644134187442M6[t] -317.677673527403M7[t] -110.768661010202M8[t] + 220.266999976515M9[t] + 121.178068938109M10[t] + 1151.52013035616M11[t] -0.0921664123525376t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-118.273578215342201.442387-0.58710.5588320.279416
X298.441154509799112.0699472.6630.0094270.004713
Y11.001807975418420.1194428.387400
Y24.4709957013409e-060.12225700.9999710.499985
M1-148.968859133025197.182234-0.75550.4522610.22613
M2-581.425595573577208.723488-2.78560.0067220.003361
M3150.275891664170249.4640860.60240.5486810.274341
M4885.158588241026181.7101134.87136e-063e-06
M5106.834156822982140.334940.76130.4488150.224408
M6-420.644134187442189.998481-2.21390.0297930.014896
M7-317.677673527403234.405891-1.35520.1793020.089651
M8-110.768661010202223.617533-0.49530.6217650.310882
M9220.266999976515204.0607551.07940.2837710.141885
M10121.178068938109173.4379060.69870.4868550.243428
M111151.52013035616186.8673976.162200
t-0.09216641235253761.683467-0.05470.9564810.478241


Multiple Linear Regression - Regression Statistics
Multiple R0.99412317923994
R-squared0.988280895502124
Adjusted R-squared0.985997953067473
F-TEST (value)432.897860454874
F-TEST (DF numerator)15
F-TEST (DF denominator)77
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation263.319472494806
Sum Squared Residuals5338960.13381062


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
187768571.65763033812204.342369661884
282558092.0227332535162.977266746493
379698301.6898887491-332.689888749102
487588749.961008555188.03899144482334
586938761.96962462514-68.969624625143
682718169.28517641578101.714823584222
777907849.39621442217-59.3962144221709
877697574.34153759057194.658462409425
981707884.24491413222285.755085867781
1082098186.7887209333422.2112790666617
1193959256.11091984963138.889080150372
1292609292.6430562962-32.6430562961964
1390189008.343256670239.65674332976637
1485018333.35622018165167.643779818348
1585008547.02973573476-47.0297357347634
1696499280.81614641907368.183853580930
1793199653.47690787344-334.476907873443
1888308795.3149557366534.6850442633516
1984368408.3036745761527.6963254238532
2081698220.40599204924-51.4059920492399
2182698283.86499561458-14.8649956145794
2279458284.86350194981-339.863501949811
2391448990.5280600195153.471939980491
2487709040.08207717508-270.082077175078
2588348516.35022954706317.649770452944
2678378147.91536496854-310.915364968539
2777927880.7224204455-88.7224204454935
2886168570.4271341334545.5728658665474
2985188617.50010685303-99.500106853028
3079407991.7561519397-51.7561519397043
3175457515.5849982379729.4150017620344
3275317326.68510981702204.314890182977
3376657643.6015266922321.3984733077729
3475997678.6626353536-79.6626353535975
3584448642.7938030951-198.793803095101
3685498337.70895046944211.291049530560
3779868293.84154033436-307.841540334364
3873357297.2752167754437.7247832245617
3972877376.70502843286-89.7050284328615
4078708063.40586515908-193.405865159078
4178397869.04310238983-30.043102389827
4273277310.4192043195716.5807956804267
4372596900.36767655216358.632323447837
4469647039.05929117876-75.0592911787596
4572717074.46912897698196.530871023018
4669567282.84176103595-326.841761035947
4776087997.52351638052-389.52351638052
4876927499.08861122117192.911388778825
4972557434.18237070014-179.182370700141
5068046563.84375815303240.156241846973
5166556843.6357282396-188.635728239592
5273417429.15485364769-88.1548536476886
5376027337.97786077597264.022139224031
5470867071.8823520404514.1176479595488
5566256657.82489790211-32.8248979021116
5662726402.80596030529-130.805960305287
5765766380.10917842793195.890821572070
5864916585.47612724289-94.476127242889
5976497530.57370352071118.426296479288
6074007539.0546622521-139.054662252098
6169137140.54862824056-227.548628240556
6265326220.11812808095311.881871919048
6364866570.03643289702-84.036432897022
6472957258.7420927429136.2579072570855
6575567290.78794136022265.212058639782
6670887323.13413706697-235.13413706697
6769526957.16346574871-5.16346574871477
6867737027.73233477067-254.732334770670
6969177179.35159368972-262.351593689721
7073717224.43004439099146.569955609014
7182218709.50140406003-488.501404060024
7279538409.42791622922-456.427916229221
7380277991.8861536180535.1138463819479
7472877633.46984271926-346.469842719263
7580767623.74159258871452.258407411291
7689339148.95530682152-215.955306821525
7794339229.09167154032203.908328459676
7894799202.42903347007276.570966529927
7991999351.38873008486-152.388730084858
8094699277.69954873835191.300451261648
81100159879.1299447969135.870055203107
821099910326.9372090934672.062790906569
831300912342.9685930745666.031406925494
841369913204.9947263568494.00527364321
851389513747.1901905515147.809809448519
861324813510.9987358676-262.998735867622
871397313594.4391729125378.560827087544
881509515055.537592521139.4624074789058
891520115401.1527845820-200.152784582048
901482314979.7789890108-156.778989010801
911453814703.9703424759-165.970342475870
921454714625.2702255501-78.2702255500941
931440714965.2287176694-558.228717669449


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
190.2996351024655010.5992702049310030.700364897534499
200.1940842073202240.3881684146404480.805915792679776
210.1524739543877570.3049479087755150.847526045612243
220.1804426611365440.3608853222730890.819557338863456
230.1097935685934380.2195871371868760.890206431406562
240.1115455338221620.2230910676443240.888454466177838
250.1001690816152000.2003381632303990.8998309183848
260.1791749788902430.3583499577804860.820825021109757
270.1279598146867160.2559196293734320.872040185313284
280.08587774412378580.1717554882475720.914122255876214
290.06028595118917540.1205719023783510.939714048810825
300.03680836869301140.07361673738602290.963191631306989
310.02233499864612510.04466999729225020.977665001353875
320.01748748888524500.03497497777049000.982512511114755
330.01031097056009090.02062194112018170.98968902943991
340.005898319855617070.01179663971123410.994101680144383
350.005885696350155950.01177139270031190.994114303649844
360.006440077219613580.01288015443922720.993559922780386
370.006124777461454150.01224955492290830.993875222538546
380.0038121825436170.0076243650872340.996187817456383
390.002462560712441760.004925121424883530.997537439287558
400.001942051753941900.003884103507883790.998057948246058
410.001048685350853290.002097370701706580.998951314649147
420.0006003203642275340.001200640728455070.999399679635772
430.001668359626376180.003336719252752360.998331640373624
440.0008951254563632030.001790250912726410.999104874543637
450.0008521825954192150.001704365190838430.99914781740458
460.0006582757241262720.001316551448252540.999341724275874
470.001665362489446940.003330724978893880.998334637510553
480.001367399811153180.002734799622306360.998632600188847
490.0007665077774997190.001533015554999440.9992334922225
500.001036238445559150.002072476891118310.99896376155444
510.0007461586448725150.001492317289745030.999253841355128
520.0004929151768687590.0009858303537375190.999507084823131
530.0009474891438418880.001894978287683780.999052510856158
540.0006477989855514750.001295597971102950.999352201014449
550.0004152812961079530.0008305625922159050.999584718703892
560.0002834352371374040.0005668704742748080.999716564762863
570.00066902997696460.00133805995392920.999330970023035
580.0005457382629840440.001091476525968090.999454261737016
590.0005212205849460340.001042441169892070.999478779415054
600.0002705893547939190.0005411787095878380.999729410645206
610.0002339247683521020.0004678495367042040.999766075231648
620.001096620843392460.002193241686784910.998903379156608
630.01043535660949470.02087071321898950.989564643390505
640.007067836224608440.01413567244921690.992932163775392
650.00662219380418560.01324438760837120.993377806195814
660.003703145152775300.007406290305550590.996296854847225
670.009869191267154360.01973838253430870.990130808732846
680.005689409327843290.01137881865568660.994310590672157
690.02034857413627430.04069714827254870.979651425863726
700.03791478532163330.07582957064326660.962085214678367
710.03623542583094530.07247085166189060.963764574169055
720.1090865462215930.2181730924431850.890913453778407
730.07816658867493540.1563331773498710.921833411325065
740.0570658189828960.1141316379657920.942934181017104


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level260.464285714285714NOK
5% type I error level390.696428571428571NOK
10% type I error level420.75NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/05/t12600397036idn0u5aytoe1zu/10lotb1260039641.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/05/t12600397036idn0u5aytoe1zu/10lotb1260039641.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/05/t12600397036idn0u5aytoe1zu/1h6sp1260039641.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/05/t12600397036idn0u5aytoe1zu/1h6sp1260039641.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/05/t12600397036idn0u5aytoe1zu/2kls91260039641.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/05/t12600397036idn0u5aytoe1zu/2kls91260039641.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/05/t12600397036idn0u5aytoe1zu/381x01260039641.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/05/t12600397036idn0u5aytoe1zu/381x01260039641.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/05/t12600397036idn0u5aytoe1zu/4lup91260039641.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/05/t12600397036idn0u5aytoe1zu/4lup91260039641.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/05/t12600397036idn0u5aytoe1zu/5s1en1260039641.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/05/t12600397036idn0u5aytoe1zu/5s1en1260039641.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/05/t12600397036idn0u5aytoe1zu/69zih1260039641.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/05/t12600397036idn0u5aytoe1zu/69zih1260039641.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/05/t12600397036idn0u5aytoe1zu/71ey11260039641.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/05/t12600397036idn0u5aytoe1zu/71ey11260039641.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/05/t12600397036idn0u5aytoe1zu/8v3py1260039641.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/05/t12600397036idn0u5aytoe1zu/8v3py1260039641.ps (open in new window)


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