Home » date » 2010 » Dec » 24 »

workshop 10 - multiple regression 1 (jonas poels)

*Unverified author*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Fri, 24 Dec 2010 19:58:59 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220624mkzw7ndlst6eoty.htm/, Retrieved Fri, 24 Dec 2010 20:57:06 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220624mkzw7ndlst6eoty.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 «
1 162556 162556 1081 1081 213118 213118 230380558 6282929 1 29790 29790 309 309 81767 81767 25266003 4324047 1 87550 87550 458 458 153198 153198 70164684 4108272 0 84738 0 588 0 -26007 0 -15292116 -1212617 1 54660 54660 299 299 126942 126942 37955658 1485329 1 42634 42634 156 156 157214 157214 24525384 1779876 0 40949 0 481 0 129352 0 62218312 1367203 1 42312 42312 323 323 234817 234817 75845891 2519076 1 37704 37704 452 452 60448 60448 27322496 912684 1 16275 16275 109 109 47818 47818 5212162 1443586 0 25830 0 115 0 245546 0 28237790 1220017 0 12679 0 110 0 48020 0 5282200 984885 1 18014 18014 239 239 -1710 -1710 -408690 1457425 0 43556 0 247 0 32648 0 8064056 -572920 1 24524 24524 497 497 95350 95350 47388950 929144 0 6532 0 103 0 151352 0 15589256 1151176 0 7123 0 109 0 288170 0 31410530 790090 1 20813 20813 502 502 114337 114337 57397174 774497 1 37597 37597 248 248 37884 37884 9395232 990576 0 17821 0 373 0 122844 0 45820812 454195 1 12988 12988 119 119 82340 82340 9798460 876607 1 2 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 time5 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk
R Framework
error message
The field 'Names of X columns' contains a hard return which cannot be interpreted.
Please, resubmit your request without hard returns in the 'Names of X columns'.


Multiple Linear Regression - Estimated Regression Equation
Costs[t] = + 2063.55395662252 -11913.6029498857Group[t] + 1.21878029308951GrCosts[t] + 75.2638113483493Trades[t] -32.7684671272523GrTrades[t] + 0.0202124527097466Dividends[t] + 0.060607189985472GrDiv[t] -0.000411636898666929TrDiv[t] -0.00112908749933964`Wealth `[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)2063.553956622522549.6299950.80940.4204230.210211
Group-11913.60294988573855.329102-3.09020.0026540.001327
GrCosts1.218780293089510.11058611.021100
Trades75.26381134834939.7068487.753700
GrTrades-32.768467127252313.448677-2.43660.0167740.008387
Dividends0.02021245270974660.022080.91540.3623860.181193
GrDiv0.0606071899854720.0324761.86620.0652360.032618
TrDiv-0.0004116368986669298.6e-05-4.80916e-063e-06
`Wealth `-0.001129087499339640.001909-0.59140.5557520.277876


Multiple Linear Regression - Regression Statistics
Multiple R0.939496178111833
R-squared0.88265306868674
Adjusted R-squared0.872336854944916
F-TEST (value)85.5597887729104
F-TEST (DF numerator)8
F-TEST (DF denominator)91
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation7800.64963583693
Sum Squared Residuals5537362261.43854


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1162556149504.47304370513051.5269562947
22979030914.2104955658-1124.21049556582
38755095177.4694648157-7627.46946481567
48473853456.959672311231281.0403276888
55466062432.9810798445-7772.98107984454
64263449341.494277142-6707.494277142
74094913724.923589758627224.0764102414
84231240357.58042076111954.41957923888
93770447918.6769144332-10214.6769144332
101627514706.77336341681568.22663658321
11258302680.7569302602623149.2430697397
12126798026.80541613744652.1945838626
131801420645.9164216757-2631.9164216757
144355618641.025323337824914.9746766622
152452428309.5326387696-3785.53263876963
1665325158.030244523441373.96975547656
1771232270.117993922484852.88200607752
182081321588.4939540605-775.493954060504
193759744587.1792552386-6990.17925523864
201782113245.57128738994575.42871261006
211298812667.9311035726320.068896427372
222233023821.2178382579-1491.21783825786
23133265342.68749690887983.3125030912
241618912187.35344018054001.64655981947
2571466374.22074866502771.779251334977
26158245878.056083772119945.9439162279
272608830445.4298746508-4357.42987465081
281132610792.4247205906533.575279409369
2985684124.146803187084443.85319681292
301441622305.0368142044-7889.03681420438
313369707.9174263045732661.08257369543
321181912343.0737782113-524.073778211257
3366204354.18674595512265.8132540449
3445193258.996526995541260.00347300446
3522206157.11627354434-3937.11627354434
36185628842.770902670569719.22909732944
37103276648.820934598473678.17906540153
3853364648.07101532682687.928984673183
3923654861.66208537516-2496.66208537516
4040699571.39390667975-5502.39390667975
41771022584.8491287363-14874.8491287363
42137185760.381392045427957.61860795458
43452511675.6207455067-7150.62074550672
4468696795.034866618973.9651333811031
4546285933.88704869268-1305.88704869268
4636532463.537548864391189.46245113561
4712656842.03762833243-5577.03762833243
4874895331.093365689412157.90663431059
4949016104.6647571238-1203.6647571238
5022844814.40679896873-2530.40679896873
5131601884.679974363691275.32002563631
5241503574.57463674487575.425363255133
5372859651.18971391746-2366.18971391746
541134-131.0824374270841265.08243742708
5546584640.9138068353417.0861931646626
5623847676.68662854082-5292.68662854082
5737482996.63561171155751.364388288451
5853715906.09226145593-535.092261455934
5912857330.443965701-6045.44396570101
6093278781.45113559163545.548864408371
6155654172.901117839941392.09888216006
6215284936.27182289551-3408.27182289551
6331221256.34908464451865.6509153555
6473176067.895984795921249.10401520408
6526756874.896636173-4199.896636173
661325339359.7287167857-26106.7287167857
678806539.10608850677-5659.10608850677
682053368.6605356408321684.33946435917
6914246206.71932932822-4782.71932932822
7040362776.710521222781259.28947877722
713045-2397.176207448685442.17620744868
7251195325.74883139904-206.748831399038
7314314918.20313066186-3487.20313066186
745543764.39347075699-3210.39347075699
7519754951.82890970487-2976.82890970487
761286-2150.285124646923436.28512464692
7710125282.27049459243-4270.27049459243
788105181.83741258342-4371.83741258342
7912808514.99469414336-7234.99469414336
80666-1016.94444478441682.9444447844
8113804209.89449037406-2829.89449037406
8246082956.66488929011651.3351107099
838765464.98604109407-4588.98604109407
848143589.74454858877-2775.74454858877
855144163.9777535983-3649.9777535983
8656923031.405556458392660.59444354161
8736426647.80418907509-3005.80418907509
885404180.89931389035-3640.89931389035
8920995821.39841642578-3722.39841642578
905674052.19413729219-3485.19413729219
9120015420.07938520468-3419.07938520468
922949366.1212705258592582.87872947414
9322537724.82926879222-5471.82926879222
9465337221.04504686802-688.045046868016
9518895108.85467225391-3219.85467225391
963055-921.8902218089063976.89022180891
972724049.70126787434-3777.70126787434
981414-172.6409633485861586.64096334859
9925644678.71519026039-2114.71519026039
1001383-2482.480142239573865.48014223957


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
120.982412049841110.03517590031778020.0175879501588901
130.9650577091477850.06988458170443060.0349422908522153
140.999717200862580.0005655982748404510.000282799137420225
150.999404937902240.001190124195520690.000595062097760345
160.9999224460839690.0001551078320629337.75539160314665e-05
170.9999141794633030.0001716410733938578.58205366969287e-05
180.9997994785552060.0004010428895877120.000200521444793856
190.9995850539165070.0008298921669858190.000414946083492909
200.9999997192496195.6150076254598e-072.8075038127299e-07
210.9999995485393529.02921295840664e-074.51460647920332e-07
220.9999990013059871.99738802660943e-069.98694013304717e-07
230.99999939776021.20447959990695e-066.02239799953475e-07
240.9999999936150941.2769811624307e-086.38490581215352e-09
250.9999999937468951.2506209796564e-086.25310489828199e-09
260.99999999966666.66799267528029e-103.33399633764015e-10
270.9999999990964221.80715607952222e-099.0357803976111e-10
280.9999999998536282.92744284649653e-101.46372142324827e-10
290.999999999684366.31281282277885e-103.15640641138942e-10
300.9999999999998822.35200744212465e-131.17600372106232e-13
310.9999999999997634.73739588936667e-132.36869794468333e-13
320.9999999999992651.4691980856564e-127.345990428282e-13
330.999999999998283.43821406530425e-121.71910703265213e-12
340.9999999999952199.5624644134736e-124.7812322067368e-12
350.9999999999894362.1127815100711e-111.05639075503555e-11
3615.80765490780112e-172.90382745390056e-17
3716.60083000940192e-183.30041500470096e-18
3812.43805808570005e-171.21902904285003e-17
3919.42759912250955e-174.71379956125477e-17
4016.58916765459297e-173.29458382729648e-17
4117.63839522685792e-213.81919761342896e-21
4213.57015999171375e-311.78507999585688e-31
4316.75069254455245e-313.37534627227623e-31
4413.83763709048089e-331.91881854524045e-33
4512.08598694182392e-331.04299347091196e-33
4611.78077354868277e-328.90386774341384e-33
4711.41650329324055e-317.08251646620273e-32
4819.9230141448835e-314.96150707244175e-31
4912.60495806788769e-311.30247903394384e-31
5016.64811773374206e-313.32405886687103e-31
5114.19162749170413e-302.09581374585207e-30
5213.55832418458022e-291.77916209229011e-29
5313.48072221767871e-281.74036110883936e-28
5411.72235911353529e-278.61179556767646e-28
5511.46610168543675e-267.33050842718373e-27
5616.23191928200466e-263.11595964100233e-26
5714.59222146869966e-252.29611073434983e-25
5811.30836629603465e-266.54183148017327e-27
5915.4217187807301e-262.71085939036505e-26
6015.73604037120601e-252.86802018560301e-25
6114.68535608009569e-242.34267804004784e-24
6213.84218951450393e-231.92109475725196e-23
6313.60712656543017e-221.80356328271509e-22
6413.41911880535572e-211.70955940267786e-21
6512.72428309280215e-201.36214154640107e-20
6612.03684595665024e-201.01842297832512e-20
6711.66904183396575e-198.34520916982875e-20
6811.64616407018362e-188.2308203509181e-19
6911.1451658846384e-175.725829423192e-18
7011.09672187527083e-165.48360937635413e-17
7118.86030366870848e-164.43015183435424e-16
7217.14545874199412e-183.57272937099706e-18
7317.36930482823956e-173.68465241411978e-17
7418.6807136728478e-164.3403568364239e-16
750.9999999999999975.69382922614801e-152.84691461307401e-15
760.999999999999976.01780629757276e-143.00890314878638e-14
770.999999999999676.61319064075196e-133.30659532037598e-13
780.9999999999962747.45158882032533e-123.72579441016267e-12
790.9999999999946781.06435021046553e-115.32175105232763e-12
800.9999999999310421.37915019080559e-106.89575095402797e-11
810.9999999992136881.57262348979926e-097.86311744899632e-10
820.999999990818111.83637787587096e-089.1818893793548e-09
830.9999999848520953.02958102605301e-081.51479051302651e-08
840.9999997984234684.03153064678299e-072.0157653233915e-07
850.9999979692685894.06146282290381e-062.03073141145191e-06
860.999977392951624.52140967590271e-052.26070483795136e-05
870.9998091068675940.000381786264811190.000190893132405595
880.998815091799630.002369816400738750.00118490820036937


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level750.974025974025974NOK
5% type I error level760.987012987012987NOK
10% type I error level771NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220624mkzw7ndlst6eoty/10yjo01293220729.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220624mkzw7ndlst6eoty/10yjo01293220729.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220624mkzw7ndlst6eoty/12rra1293220729.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220624mkzw7ndlst6eoty/12rra1293220729.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220624mkzw7ndlst6eoty/22rra1293220729.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220624mkzw7ndlst6eoty/22rra1293220729.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220624mkzw7ndlst6eoty/3v08v1293220729.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220624mkzw7ndlst6eoty/3v08v1293220729.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220624mkzw7ndlst6eoty/4v08v1293220729.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220624mkzw7ndlst6eoty/4v08v1293220729.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220624mkzw7ndlst6eoty/5v08v1293220729.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220624mkzw7ndlst6eoty/5v08v1293220729.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220624mkzw7ndlst6eoty/6osqy1293220729.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220624mkzw7ndlst6eoty/6osqy1293220729.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220624mkzw7ndlst6eoty/7osqy1293220729.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220624mkzw7ndlst6eoty/7osqy1293220729.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220624mkzw7ndlst6eoty/8yjo01293220729.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220624mkzw7ndlst6eoty/8yjo01293220729.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220624mkzw7ndlst6eoty/9yjo01293220729.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220624mkzw7ndlst6eoty/9yjo01293220729.ps (open in new window)


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