Home » date » 2010 » Nov » 28 »

paper 2

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Sun, 28 Nov 2010 12:51: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/Nov/28/t1290948649nt4uc3gbmczi3oc.htm/, Retrieved Sun, 28 Nov 2010 13:50:49 +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/Nov/28/t1290948649nt4uc3gbmczi3oc.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 «
2.462 9.939 9.321 9.769 3.695 9.336 9.939 9.321 4.831 10.195 9.336 9.939 5.134 9.464 10.195 9.336 6.250 10.010 9.464 10.195 5.760 10.213 10.010 9.464 6.249 9.563 10.213 10.010 2.917 9.890 9.563 10.213 1.741 9.305 9.890 9.563 2.359 9.391 9.305 9.890 1.511 9.928 9.391 9.305 2.059 8.686 9.928 9.391 2.635 9.843 8.686 9.928 2.867 9.627 9.843 8.686 4.403 10.074 9.627 9.843 5.720 9.503 10.074 9.627 4.502 10.119 9.503 10.074 5.749 10.000 10.119 9.503 5.627 9.313 10.000 10.119 2.846 9.866 9.313 10.000 1.762 9.172 9.866 9.313 2.429 9.241 9.172 9.866 1.169 9.659 9.241 9.172 2.154 8.904 9.659 9.241 2.249 9.755 8.904 9.659 2.687 9.080 9.755 8.904 4.359 9.435 9.080 9.755 5.382 8.971 9.435 9.080 4.459 10.063 8.971 9.435 6.398 9.793 10.063 8.971 4.596 9.454 9.793 10.063 3.024 9.759 9.454 9.793 1.887 8.820 9.759 9.454 2.070 9.403 8.820 9.759 1.351 9.676 9.403 8.820 2.218 8.642 9.676 9.403 2.461 9.402 8.642 9.676 3.028 9.610 9.402 8.642 4.784 9.294 9.610 9.402 4.975 9.448 9.294 9.610 4.6 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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
geboortes[t] = + 3.63649072146089 -0.112892682481441huwelijk[t] + 0.263683500627482`geboortes-1`[t] + 0.288035361724047`geboortes-2`[t] + 1.16087808712201M1[t] + 0.804780496030499M2[t] + 1.15406440433495M3[t] + 1.09394205740714M4[t] + 1.62510788116370M5[t] + 1.52928339577008M6[t] + 0.984223018622452M7[t] + 0.980829801148078M8[t] + 0.147756081412070M9[t] + 0.717424338136779M10[t] + 1.00090518467358M11[t] + 0.00507968162684446t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)3.636490721460891.1599363.13510.0024220.001211
huwelijk-0.1128926824814410.086241-1.3090.1943660.097183
`geboortes-1`0.2636835006274820.1135012.32320.0227770.011388
`geboortes-2`0.2880353617240470.1033062.78820.0066560.003328
M11.160878087122010.1790156.484800
M20.8047804960304990.1734084.6411.4e-057e-06
M31.154064404334950.2733834.22146.5e-053.3e-05
M41.093942057407140.3088093.54250.0006730.000336
M51.625107881163700.324645.00593e-062e-06
M61.529283395770080.3316434.61121.5e-058e-06
M70.9842230186224520.3106833.16790.0021920.001096
M80.9808298011480780.1690875.800700
M90.1477560814120700.1411531.04680.2984350.149218
M100.7174243381367790.1672584.28935.1e-052.5e-05
M111.000905184673580.1539086.503300
t0.005079681626844460.0015193.34410.0012710.000635


Multiple Linear Regression - Regression Statistics
Multiple R0.884336823751576
R-squared0.782051617843026
Adjusted R-squared0.740138467428223
F-TEST (value)18.6588602885558
F-TEST (DF numerator)15
F-TEST (DF denominator)78
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.26290500426931
Sum Squared Residuals5.39128521904797


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
19.9399.79611806397140.142881936028592
29.3369.33982003834253-0.00382003834253139
310.1959.5849422436420.610057756358005
49.4649.54851189946857-0.0845118994685673
510.0110.0134389079649-0.00343890796494194
610.2139.91142886053640.301571139463593
79.5639.52703870141090.0359612985890964
89.899.791960486613660.0980395133863446
99.3058.995729762687220.309270237312777
109.3919.44064273868193-0.0496427386819326
119.9289.679112356035230.248887643964767
128.6868.7877907439339-0.101790743933897
139.8439.715902409039920.127097590960079
149.6279.286035288204290.340964711795710
1510.0749.743296995223280.330703004776725
169.5039.59522555374235-0.0922255537423493
1710.11910.2471628742205-0.128162874220497
181010.0136017402415-0.0136017402414687
199.3139.63344539823076-0.320445398230761
209.8669.733659639387880.132340360612120
219.1728.975977951431170.196022048568826
229.2419.45171367616553-0.210713676165533
239.6599.7008166047626-0.0418166047625992
248.9048.72388595269290.180114047307106
259.7559.80043665483291-0.0454366548329126
269.089.4068997113737-0.326899711373707
279.4359.63963846609964-0.204638466099642
288.9719.3682903601792-0.397290360179195
2910.0639.988639220613850.0743607793861539
309.7939.83328948036081-0.0402894803608154
319.4549.74008146850483-0.286081468504825
329.7599.752076975139910.00692302486008691
338.829.03522139707908-0.215221397079078
349.4039.42956195277316-0.0265619527731571
359.6769.6825545958479-0.0065545958478985
368.6428.82876134864618-0.186761348646178
379.4029.77327110965389-0.371271109653890
389.619.260813945676470.349186054323532
399.2949.69069102821114-0.396691028211140
409.4489.59067322959655-0.142673229596545
4110.31910.11805132692490.200948673075056
429.54810.1159625132757-0.567962513275689
439.8019.786126101606040.0148738983939647
449.5969.81894793898736-0.22294793898736
458.9239.1505489048201-0.227548904820103
469.7469.452890725066830.293109274933167
479.8299.83618893649984-0.00718893649984425
489.1259.000746954897790.124253045102215
499.78210.0326371814359-0.250637181435941
509.4419.495726071993-0.0547260719930037
519.1629.82771450914803-0.665714509148029
529.9159.569612815776750.345387184223253
5310.44410.13283284376660.311167156233379
5410.20910.4312061171296-0.222206117129616
559.98510.0358189929045-0.0508189929044853
569.84210.1107978762684-0.268797876268362
579.4299.319999639407860.109000360592138
5810.1329.71135389394170.420646106058297
599.84910.1462533378513-0.297253337851294
609.1729.21834824902134-0.0463482490213426
6110.31310.11513397319650.197866026803511
629.8199.710913208444250.108086791555751
639.95510.1435476826324-0.188547682632450
6410.0489.958256148721570.0897438512784332
6510.08210.4524165853727-0.370416585372677
6610.54110.42271227014340.118287729856578
6710.20810.04268181578950.165318184210520
6810.23310.3434557969425-0.110455796942469
699.4399.54727191919747-0.108271919197471
709.9639.885536666619550.0774633333804518
7110.15810.1737685252058-0.0157685252057693
729.2259.3255388833213-0.100538883321296
7310.47410.24576496369260.228235036307415
749.7579.84211939349422-0.0851193934942226
7510.4910.23656124663790.253438753362083
7610.28110.06136786263080.219632137369164
7710.44410.7517142609246-0.30771426092463
7810.6410.62376847236060.0162315276393998
7910.69510.13545615101150.559543848988459
8010.78610.56834068839470.217659311605283
819.8329.9023336761824-0.0703336761823944
829.74710.1819710950787-0.434971095078689
8310.41110.29130564379740.119694356202638
849.5119.37992786748660.131072132513392
8510.40210.4307356441769-0.0287356441768531
869.70110.0286723424715-0.327672342471528
8710.5410.27860782840560.261392171594448
8810.11210.05006212988420.0619378701158074
8910.91510.69174398021180.223256019788156
9011.18310.77503054595200.407969454048018
9110.38410.5023513705420-0.118351370541969
9210.83410.68676059826560.147239401734355
939.8869.87891674919470.0070832508053054
9410.21610.2853292516726-0.0693292516726039


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
190.2011826338594190.4023652677188380.798817366140581
200.1047739928353370.2095479856706740.895226007164663
210.07067286281174650.1413457256234930.929327137188253
220.03407869819969780.06815739639939560.965921301800302
230.03695076193291220.07390152386582450.963049238067088
240.04639207865869590.09278415731739180.953607921341304
250.02967776033687910.05935552067375820.97032223966312
260.04523780300110190.09047560600220370.954762196998898
270.2511339678924050.5022679357848110.748866032107595
280.2532022653636210.5064045307272430.746797734636379
290.2058274693673740.4116549387347490.794172530632626
300.1615545308744480.3231090617488960.838445469125552
310.1382949374914870.2765898749829740.861705062508513
320.1032647114077280.2065294228154560.896735288592272
330.07557841358631550.1511568271726310.924421586413684
340.0941304277345390.1882608554690780.905869572265461
350.06699254251524140.1339850850304830.933007457484759
360.04819686029581750.0963937205916350.951803139704183
370.03791807845558030.07583615691116060.96208192154442
380.1433210672057040.2866421344114070.856678932794297
390.1540414809197440.3080829618394880.845958519080256
400.1688885975675490.3377771951350970.831111402432451
410.2440969863016470.4881939726032950.755903013698353
420.2648102883117030.5296205766234070.735189711688297
430.3299392819863960.6598785639727910.670060718013604
440.3335935057472890.6671870114945780.666406494252711
450.3061111486547450.612222297309490.693888851345255
460.4343530356912750.868706071382550.565646964308725
470.4183656767164870.8367313534329740.581634323283513
480.5142013464888350.971597307022330.485798653511165
490.4604659292884160.9209318585768310.539534070711584
500.4078313113082580.8156626226165160.592168688691742
510.79173253061240.4165349387751990.208267469387600
520.8432703011892330.3134593976215340.156729698810767
530.8768632734799870.2462734530400270.123136726520013
540.852611893084460.2947762138310820.147388106915541
550.8295434583703460.3409130832593090.170456541629654
560.8865763264561970.2268473470876060.113423673543803
570.8603323459541340.2793353080917330.139667654045867
580.9339982302290010.1320035395419970.0660017697709987
590.909252198090310.1814956038193780.0907478019096891
600.8763314460887960.2473371078224080.123668553911204
610.8642368068302920.2715263863394160.135763193169708
620.8983913474830030.2032173050339930.101608652516997
630.8703202157295520.2593595685408960.129679784270448
640.8522413021042360.2955173957915290.147758697895764
650.8794656961025350.2410686077949300.120534303897465
660.8361076023744520.3277847952510960.163892397625548
670.799848130419030.4003037391619420.200151869580971
680.8387270874740070.3225458250519870.161272912525993
690.8481508472290680.3036983055418650.151849152770932
700.7738066747067280.4523866505865440.226193325293272
710.7124341347608990.5751317304782030.287565865239101
720.5977337762263770.8045324475472460.402266223773623
730.4874974494068020.9749948988136040.512502550593198
740.3562878027387690.7125756054775380.643712197261231
750.2772591919422710.5545183838845420.722740808057729


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level00OK
10% type I error level70.122807017543860NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/28/t1290948649nt4uc3gbmczi3oc/100pnx1290948670.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/28/t1290948649nt4uc3gbmczi3oc/100pnx1290948670.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/28/t1290948649nt4uc3gbmczi3oc/1b6ql1290948670.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/28/t1290948649nt4uc3gbmczi3oc/1b6ql1290948670.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/28/t1290948649nt4uc3gbmczi3oc/2b6ql1290948670.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/28/t1290948649nt4uc3gbmczi3oc/2b6ql1290948670.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/28/t1290948649nt4uc3gbmczi3oc/3mgpo1290948670.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/28/t1290948649nt4uc3gbmczi3oc/3mgpo1290948670.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/28/t1290948649nt4uc3gbmczi3oc/4mgpo1290948670.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/28/t1290948649nt4uc3gbmczi3oc/4mgpo1290948670.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/28/t1290948649nt4uc3gbmczi3oc/5mgpo1290948670.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/28/t1290948649nt4uc3gbmczi3oc/5mgpo1290948670.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/28/t1290948649nt4uc3gbmczi3oc/6ep691290948670.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/28/t1290948649nt4uc3gbmczi3oc/6ep691290948670.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/28/t1290948649nt4uc3gbmczi3oc/7pgoc1290948670.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/28/t1290948649nt4uc3gbmczi3oc/7pgoc1290948670.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/28/t1290948649nt4uc3gbmczi3oc/8pgoc1290948670.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/28/t1290948649nt4uc3gbmczi3oc/8pgoc1290948670.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/28/t1290948649nt4uc3gbmczi3oc/9pgoc1290948670.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/28/t1290948649nt4uc3gbmczi3oc/9pgoc1290948670.ps (open in new window)


 
Parameters (Session):
par1 = 2 ; par2 = Include Monthly Dummies ; par3 = Linear Trend ;
 
Parameters (R input):
par1 = 2 ; 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