Home » date » 2008 » Nov » 20 »

Q3 task 6

*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:50:14 -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/t1227203695r0zzdx3k4gabomw.htm/, Retrieved Thu, 20 Nov 2008 17:55:05 +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/t1227203695r0zzdx3k4gabomw.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] = + 3434.52173913043 + 1014.16397515528d[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)3434.52173913043136.43575525.173200
d1014.16397515528157.2608626.448900


Multiple Linear Regression - Regression Statistics
Multiple R0.560059691689458
R-squared0.313666858255291
Adjusted R-squared0.306124735818536
F-TEST (value)41.5886722717066
F-TEST (DF numerator)1
F-TEST (DF denominator)91
p-value5.31672972314823e-09
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation654.322893245122
Sum Squared Residuals38960598.8248447


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
133533434.52173913044-81.52173913044
234803434.5217391304445.4782608695581
330983434.52173913043-336.521739130434
429443434.52173913043-490.521739130434
533893434.52173913043-45.5217391304342
634973434.5217391304362.4782608695658
744043434.52173913043969.478260869566
838493434.52173913043414.478260869566
937343434.52173913043299.478260869566
1030603434.52173913043-374.521739130434
1135073434.5217391304372.4782608695658
1232873434.52173913043-147.521739130434
1332153434.52173913043-219.521739130434
1437643434.52173913043329.478260869566
1527343434.52173913043-700.521739130434
1628373434.52173913043-597.521739130434
1727663434.52173913043-668.521739130434
1838513434.52173913043416.478260869566
1932893434.52173913043-145.521739130434
2038483434.52173913043413.478260869566
2133483434.52173913043-86.5217391304342
2236823434.52173913043247.478260869566
2340583434.52173913043623.478260869566
2436554448.68571428571-793.685714285714
2538114448.68571428571-637.685714285714
2633414448.68571428571-1107.68571428571
2730324448.68571428571-1416.68571428571
2834754448.68571428571-973.685714285714
2933534448.68571428571-1095.68571428571
3031864448.68571428571-1262.68571428571
3139024448.68571428571-546.685714285714
3241644448.68571428571-284.685714285714
3334994448.68571428571-949.685714285714
3441454448.68571428571-303.685714285714
3537964448.68571428571-652.685714285714
3637114448.68571428571-737.685714285714
3739494448.68571428571-499.685714285714
3837404448.68571428571-708.685714285714
3932434448.68571428571-1205.68571428571
4044074448.68571428571-41.6857142857143
4148144448.68571428571365.314285714286
4239084448.68571428571-540.685714285714
4352504448.68571428571801.314285714286
4439374448.68571428571-511.685714285714
4540044448.68571428571-444.685714285714
4655604448.685714285711111.31428571429
4739224448.68571428571-526.685714285714
4837594448.68571428571-689.685714285714
4941384448.68571428571-310.685714285714
5046344448.68571428571185.314285714286
5139964448.68571428571-452.685714285714
5243084448.68571428571-140.685714285714
5341424448.68571428571-306.685714285714
5444294448.68571428571-19.6857142857143
5552194448.68571428571770.314285714286
5649294448.68571428571480.314285714286
5757544448.685714285711305.31428571429
5855924448.685714285711143.31428571429
5941634448.68571428571-285.685714285714
6049624448.68571428571513.314285714286
6152084448.68571428571759.314285714286
6247554448.68571428571306.314285714286
6344914448.6857142857142.3142857142857
6457324448.685714285711283.31428571429
6557304448.685714285711281.31428571429
6650244448.68571428571575.314285714286
6760564448.685714285711607.31428571429
6849014448.68571428571452.314285714286
6953534448.68571428571904.314285714286
7055784448.685714285711129.31428571429
7146184448.68571428571169.314285714286
7247244448.68571428571275.314285714286
7350114448.68571428571562.314285714286
7452984448.68571428571849.314285714286
7541434448.68571428571-305.685714285714
7646174448.68571428571168.314285714286
7747274448.68571428571278.314285714286
7842074448.68571428571-241.685714285714
7951124448.68571428571663.314285714286
8041904448.68571428571-258.685714285714
8140984448.68571428571-350.685714285714
8250714448.68571428571622.314285714286
8341774448.68571428571-271.685714285714
8445984448.68571428571149.314285714286
8537574448.68571428571-691.685714285714
8655914448.685714285711142.31428571429
8742184448.68571428571-230.685714285714
8837804448.68571428571-668.685714285714
8943364448.68571428571-112.685714285714
9048704448.68571428571421.314285714286
9144224448.68571428571-26.6857142857143
9247274448.68571428571278.314285714286
9344594448.6857142857110.3142857142857


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
50.06953205367721720.1390641073544340.930467946322783
60.03198119663613070.06396239327226130.96801880336387
70.2869927636666270.5739855273332540.713007236333373
80.2184805289996650.4369610579993310.781519471000335
90.1450246391620720.2900492783241450.854975360837928
100.1188877913740660.2377755827481320.881112208625934
110.07021317842006590.1404263568401320.929786821579934
120.04238313219778430.08476626439556870.957616867802216
130.02622012576613250.0524402515322650.973779874233867
140.01743541197960080.03487082395920150.9825645880204
150.02790978758539000.05581957517078010.97209021241461
160.02944562335042250.05889124670084510.970554376649577
170.03364339392914330.06728678785828660.966356606070857
180.02911010401709150.0582202080341830.970889895982909
190.01803196270304710.03606392540609410.981968037296953
200.01497261698036940.02994523396073880.98502738301963
210.009005916489057150.01801183297811430.990994083510943
220.005952493521475770.01190498704295150.994047506478524
230.006723806317612430.01344761263522490.993276193682388
240.004342540299695280.008685080599390550.995657459700305
250.002716548704022960.005433097408045910.997283451295977
260.002425558766048680.004851117532097370.997574441233951
270.003525108528159690.007050217056319380.99647489147184
280.002670574693951550.005341149387903110.997329425306049
290.002285110525440930.004570221050881860.99771488947456
300.002557395750941590.005114791501883180.997442604249058
310.002522459383510500.005044918767021010.99747754061649
320.003263604799823890.006527209599647780.996736395200176
330.002915506174700250.005831012349400510.9970844938253
340.003215720083390690.006431440166781380.99678427991661
350.002616207248067130.005232414496134260.997383792751933
360.002202013790181500.004404027580362990.997797986209819
370.001887797431383730.003775594862767470.998112202568616
380.001637981458358590.003275962916717170.998362018541641
390.003295243014997230.006590486029994460.996704756985003
400.005034643352000770.01006928670400150.994965356648
410.01473151980324220.02946303960648440.985268480196758
420.01336076348602580.02672152697205170.986639236513974
430.06424976944557930.1284995388911590.93575023055442
440.05924897931512690.1184979586302540.940751020684873
450.05407896478486630.1081579295697330.945921035215134
460.2178127413151840.4356254826303680.782187258684816
470.2121576602610390.4243153205220780.78784233973896
480.2312837302746720.4625674605493430.768716269725328
490.2164927860288960.4329855720577920.783507213971104
500.2110926868378800.4221853736757590.78890731316212
510.2093605644937710.4187211289875420.79063943550623
520.1920440151319110.3840880302638220.807955984868089
530.183196885456410.366393770912820.81680311454359
540.1675070512707520.3350141025415040.832492948729248
550.2326496385896940.4652992771793870.767350361410306
560.2395537530997540.4791075061995080.760446246900246
570.4667992777828080.9335985555656150.533200722217192
580.6180277912566430.7639444174867140.381972208743357
590.5985546745797090.8028906508405830.401445325420291
600.5788384166038990.8423231667922030.421161583396101
610.5974819858481180.8050360283037640.402518014151882
620.5509698753994150.8980602492011710.449030124600585
630.4994583942990760.9989167885981510.500541605700924
640.6586275350875690.6827449298248620.341372464912431
650.7920539322975580.4158921354048850.207946067702442
660.7687587614714050.462482477057190.231241238528595
670.9415616871083040.1168766257833920.0584383128916962
680.9255689277036150.1488621445927710.0744310722963853
690.9422406744973650.115518651005270.057759325502635
700.9751782009299740.04964359814005210.0248217990700260
710.9620120298344310.07597594033113760.0379879701655688
720.9452350677804360.1095298644391270.0547649322195637
730.9381981450072860.1236037099854270.0618018549927134
740.9577185002586130.08456299948277380.0422814997413869
750.943561222970520.1128775540589610.0564387770294803
760.9160516122580190.1678967754839630.0839483877419813
770.8841222026645480.2317555946709030.115877797335452
780.8450332091842250.3099335816315510.154966790815776
790.852497748659690.295004502680620.14750225134031
800.8026723144557440.3946553710885130.197327685544256
810.7571886313916980.4856227372166050.242811368608302
820.7524916416549930.4950167166900140.247508358345007
830.6781617781374150.6436764437251710.321838221862585
840.572931403833390.8541371923332210.427068596166611
850.6135622158663820.7728755682672350.386437784133618
860.8926535611574280.2146928776851450.107346438842572
870.810471727464240.379056545071520.18952827253576
880.9289798300898460.1420403398203070.0710201699101536


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level160.190476190476190NOK
5% type I error level260.309523809523810NOK
10% type I error level350.416666666666667NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227203695r0zzdx3k4gabomw/10i28s1227203408.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227203695r0zzdx3k4gabomw/10i28s1227203408.ps (open in new window)


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


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


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227203695r0zzdx3k4gabomw/36do61227203408.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227203695r0zzdx3k4gabomw/36do61227203408.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227203695r0zzdx3k4gabomw/44cgn1227203408.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227203695r0zzdx3k4gabomw/44cgn1227203408.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227203695r0zzdx3k4gabomw/527se1227203408.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227203695r0zzdx3k4gabomw/527se1227203408.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227203695r0zzdx3k4gabomw/62hyc1227203408.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227203695r0zzdx3k4gabomw/62hyc1227203408.ps (open in new window)


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


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227203695r0zzdx3k4gabomw/805ve1227203408.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227203695r0zzdx3k4gabomw/805ve1227203408.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227203695r0zzdx3k4gabomw/9b0df1227203408.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227203695r0zzdx3k4gabomw/9b0df1227203408.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = 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