Home » date » 2008 » Nov » 20 »

Q3 Task 6 deel 2

*Unverified author*
R Software Module: rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Thu, 20 Nov 2008 10:58:57 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/Nov/20/t1227204033m62frcjgn7po4z1.htm/, Retrieved Thu, 20 Nov 2008 18:00:49 +0000
 
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/2008/Nov/20/t1227204033m62frcjgn7po4z1.htm/},
    year = {2008},
}
@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 = {2008},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
 
Feedback Forum:

Post a new message
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
3353 0 3480 0 3098 0 2944 0 3389 0 3497 0 4404 0 3849 0 3734 0 3060 0 3507 0 3287 0 3215 0 3764 0 2734 0 2837 0 2766 0 3851 0 3289 0 3848 0 3348 0 3682 0 4058 0 3655 1 3811 1 3341 1 3032 1 3475 1 3353 1 3186 1 3902 1 4164 1 3499 1 4145 1 3796 1 3711 1 3949 1 3740 1 3243 1 4407 1 4814 1 3908 1 5250 1 3937 1 4004 1 5560 1 3922 1 3759 1 4138 1 4634 1 3996 1 4308 1 4142 1 4429 1 5219 1 4929 1 5754 1 5592 1 4163 1 4962 1 5208 1 4755 1 4491 1 5732 1 5730 1 5024 1 6056 1 4901 1 5353 1 5578 1 4618 1 4724 1 5011 1 5298 1 4143 1 4617 1 4727 1 4207 1 5112 1 4190 1 4098 1 5071 1 4177 1 4598 1 3757 1 5591 1 4218 1 3780 1 4336 1 4870 1 4422 1 4727 1 4459 1
 
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 time4 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
y[t] = + 3217.70420865441 + 1028.67842323652d[t] + 66.036973918197M1[t] + 336.161973918197M2[t] -369.838026081803M3[t] + 23.2869739181971M4[t] + 167.911973918197M5[t] + 132.286973918197M6[t] + 717.536973918197M7[t] + 328.911973918197M8[t] + 291.911973918197M9[t] + 717.239774748073M10[t] + 81.9540604623588M11[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)3217.70420865441268.95158111.963900
d1028.67842323652150.4925396.835400
M166.036973918197323.5571740.20410.8387960.419398
M2336.161973918197323.5571741.0390.3019550.150977
M3-369.838026081803323.557174-1.1430.2564320.128216
M423.2869739181971323.5571740.0720.9428040.471402
M5167.911973918197323.5571740.5190.6052240.302612
M6132.286973918197323.5571740.40890.6837410.34187
M7717.536973918197323.5571742.21770.0294150.014708
M8328.911973918197323.5571741.01650.3124320.156216
M9291.911973918197323.5571740.90220.3696610.184831
M10717.239774748073334.4449272.14460.0350220.017511
M1181.9540604623588334.4449270.2450.8070490.403525


Multiple Linear Regression - Regression Statistics
Multiple R0.671239540120704
R-squared0.450562520221454
Adjusted R-squared0.368146898254672
F-TEST (value)5.46695528674231
F-TEST (DF numerator)12
F-TEST (DF denominator)80
p-value1.04655709964874e-06
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation624.395081779015
Sum Squared Residuals31189537.4519858


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
133533283.7411825726269.2588174273813
234803553.86618257262-73.8661825726207
330982847.86618257261250.133817427385
429443240.99118257261-296.991182572615
533893385.616182572613.38381742738651
634973349.99118257261147.008817427386
744043935.24118257261468.758817427386
838493546.61618257261302.383817427387
937343509.61618257261224.383817427388
1030603934.94398340249-874.943983402489
1135073299.65826911678207.341730883225
1232873217.7042086544269.2957913455837
1332153283.74118257261-68.7411825726129
1437643553.86618257261210.133817427387
1527342847.86618257261-113.866182572613
1628373240.99118257261-403.991182572613
1727663385.61618257261-619.616182572614
1838513349.99118257261501.008817427387
1932893935.24118257261-646.241182572614
2038483546.61618257261301.383817427386
2133483509.61618257261-161.616182572613
2236823934.94398340249-252.943983402489
2340583299.65826911678758.341730883225
2436554246.38263189093-591.382631890931
2538114312.41960580913-501.419605809128
2633414582.54460580913-1241.54460580913
2730323876.54460580913-844.544605809128
2834754269.66960580913-794.669605809128
2933534414.29460580913-1061.29460580913
3031864378.66960580913-1192.66960580913
3139024963.91960580913-1061.91960580913
3241644575.29460580913-411.294605809129
3334994538.29460580913-1039.29460580913
3441454963.622406639-818.622406639004
3537964328.33669235329-532.33669235329
3637114246.38263189093-535.382631890931
3739494312.41960580913-363.419605809128
3837404582.54460580913-842.544605809128
3932433876.54460580913-633.544605809128
4044074269.66960580913137.330394190871
4148144414.29460580913399.705394190871
4239084378.66960580913-470.669605809129
4352504963.91960580913286.080394190871
4439374575.29460580913-638.294605809129
4540044538.29460580913-534.294605809129
4655604963.622406639596.377593360996
4739224328.33669235329-406.33669235329
4837594246.38263189093-487.382631890931
4941384312.41960580913-174.419605809128
5046344582.5446058091351.4553941908722
5139963876.54460580913119.455394190871
5243084269.6696058091338.3303941908714
5341424414.29460580913-272.294605809129
5444294378.6696058091350.3303941908713
5552194963.91960580913255.080394190871
5649294575.29460580913353.705394190871
5757544538.294605809131215.70539419087
5855924963.622406639628.377593360996
5941634328.33669235329-165.33669235329
6049624246.38263189093715.617368109069
6152084312.41960580913895.580394190872
6247554582.54460580913172.455394190872
6344913876.54460580913614.455394190871
6457324269.669605809131462.33039419087
6557304414.294605809131315.70539419087
6650244378.66960580913645.330394190871
6760564963.919605809131092.08039419087
6849014575.29460580913325.705394190871
6953534538.29460580913814.705394190871
7055784963.622406639614.377593360996
7146184328.33669235329289.66330764671
7247244246.38263189093477.617368109069
7350114312.41960580913698.580394190872
7452984582.54460580913715.455394190872
7541433876.54460580913266.455394190871
7646174269.66960580913347.330394190872
7747274414.29460580913312.705394190871
7842074378.66960580913-171.669605809129
7951124963.91960580913148.080394190871
8041904575.29460580913-385.294605809129
8140984538.29460580913-440.294605809129
8250714963.622406639107.377593360996
8341774328.33669235329-151.33669235329
8445984246.38263189093351.617368109069
8537574312.41960580913-555.419605809128
8655914582.544605809131008.45539419087
8742183876.54460580913341.455394190872
8837804269.66960580913-489.669605809128
8943364414.29460580913-78.2946058091285
9048704378.66960580913491.330394190871
9144224963.91960580913-541.919605809129
9247274575.29460580913151.705394190871
9344594538.29460580913-79.2946058091287


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
160.03395300723486820.06790601446973630.966046992765132
170.0483672058049190.0967344116098380.951632794195081
180.02530775194012500.05061550388024990.974692248059875
190.1001208674767930.2002417349535860.899879132523207
200.0515334119718940.1030668239437880.948466588028106
210.03121245114149570.06242490228299130.968787548858504
220.02873885197044090.05747770394088190.97126114802956
230.02139931560697680.04279863121395360.978600684393023
240.01115917405946090.02231834811892190.988840825940539
250.005667739061224740.01133547812244950.994332260938775
260.007571996633047630.01514399326609530.992428003366952
270.004390763785904190.008781527571808390.995609236214096
280.003523457712227710.007046915424455420.996476542287772
290.002587653654347240.005175307308694480.997412346345653
300.005069197335648050.01013839467129610.994930802664352
310.004180711070750650.00836142214150130.99581928892925
320.002373655194257950.00474731038851590.997626344805742
330.002103287660024440.004206575320048890.997896712339976
340.004017951617471750.00803590323494350.995982048382528
350.002440883071780350.00488176614356070.99755911692822
360.001717102323747480.003434204647494960.998282897676253
370.001382384644834550.002764769289669090.998617615355165
380.001609093829469560.003218187658939130.99839090617053
390.001423540992954200.002847081985908390.998576459007046
400.009798467943369670.01959693588673930.99020153205663
410.05905215628543370.1181043125708670.940947843714566
420.05040762733509610.1008152546701920.949592372664904
430.08841492794117470.1768298558823490.911585072058825
440.08188533175498660.1637706635099730.918114668245013
450.08232951271810590.1646590254362120.917670487281894
460.2230578650448710.4461157300897430.776942134955129
470.1850237719109480.3700475438218950.814976228089052
480.1940679302809520.3881358605619030.805932069719048
490.1705760143436740.3411520286873490.829423985656326
500.1898269921574570.3796539843149150.810173007842543
510.1820080646140220.3640161292280440.817991935385978
520.1703104509117370.3406209018234740.829689549088263
530.1674235112188810.3348470224377620.83257648878112
540.1451875540175540.2903751080351080.854812445982446
550.131409850614960.262819701229920.86859014938504
560.1200830246339930.2401660492679870.879916975366007
570.3332380009487170.6664760018974340.666761999051283
580.348239469843890.696478939687780.65176053015611
590.2866208126492650.5732416252985290.713379187350735
600.3001370620445770.6002741240891530.699862937955423
610.3647614476985980.7295228953971960.635238552301402
620.3567586946138300.7135173892276610.64324130538617
630.3347946572506600.6695893145013210.66520534274934
640.6429884450283690.7140231099432630.357011554971631
650.8065434794055280.3869130411889430.193456520594472
660.7842622351274310.4314755297451370.215737764872569
670.904513748860660.1909725022786780.0954862511393392
680.8767261941505640.2465476116988710.123273805849436
690.9347260050869270.1305479898261460.0652739949130732
700.916591377755430.166817244489140.08340862224457
710.8829020113444090.2341959773111820.117097988655591
720.8227319383602380.3545361232795240.177268061639762
730.9195582551001670.1608834897996670.0804417448998334
740.87463188203290.2507362359342000.125368117967100
750.7843238849825920.4313522300348150.215676115017408
760.7939254832422830.4121490335154330.206074516757717
770.6781813190331720.6436373619336570.321818680966828


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level120.193548387096774NOK
5% type I error level180.290322580645161NOK
10% type I error level230.370967741935484NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227204033m62frcjgn7po4z1/10f04r1227203932.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227204033m62frcjgn7po4z1/10f04r1227203932.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227204033m62frcjgn7po4z1/1d6b31227203932.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227204033m62frcjgn7po4z1/1d6b31227203932.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227204033m62frcjgn7po4z1/2ugmn1227203932.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227204033m62frcjgn7po4z1/2ugmn1227203932.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227204033m62frcjgn7po4z1/3dhq11227203932.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227204033m62frcjgn7po4z1/3dhq11227203932.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227204033m62frcjgn7po4z1/4sihl1227203932.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227204033m62frcjgn7po4z1/4sihl1227203932.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227204033m62frcjgn7po4z1/5ra1l1227203932.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227204033m62frcjgn7po4z1/5ra1l1227203932.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227204033m62frcjgn7po4z1/6uo4i1227203932.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227204033m62frcjgn7po4z1/6uo4i1227203932.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227204033m62frcjgn7po4z1/7muap1227203932.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227204033m62frcjgn7po4z1/7muap1227203932.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227204033m62frcjgn7po4z1/8mwrm1227203932.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227204033m62frcjgn7po4z1/8mwrm1227203932.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227204033m62frcjgn7po4z1/9gwpb1227203932.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227204033m62frcjgn7po4z1/9gwpb1227203932.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 = 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