Home » date » 2010 » Dec » 24 »

workshop 10 - multiple regression 3 (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 20:02:20 +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/t1293220806s6a46890gvqhs1f.htm/, Retrieved Fri, 24 Dec 2010 21:00:07 +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/t1293220806s6a46890gvqhs1f.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 time6 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24
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
Dividends[t] = + 89641.0785116676 -47111.1144754121Group[t] + 0.45144769884632Costs[t] -1.88122427276785GrCosts[t] -196.042714705314Trades[t] + 3.05579768268300GrTrades[t] + 0.61601859145794GrDiv[t] + 0.00188101486872750TrDiv[t] + 0.0167804714914530`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)89641.07851166767611.48603811.777100
Group-47111.114475412118504.764751-2.54590.0125810.006291
Costs0.451447698846320.4931540.91540.3623860.181193
GrCosts-1.881224272767850.773845-2.4310.0170170.008508
Trades-196.04271470531455.429935-3.53680.000640.00032
GrTrades3.0557976826830065.598250.04660.9629470.481474
GrDiv0.616018591457940.1424394.32483.9e-052e-05
TrDiv0.001881014868727500.0004084.61191.3e-056e-06
`Wealth `0.01678047149145300.0088681.89220.0616390.03082


Multiple Linear Regression - Regression Statistics
Multiple R0.750113577231125
R-squared0.562670378746475
Adjusted R-squared0.524223818636275
F-TEST (value)14.6351293102344
F-TEST (DF numerator)8
F-TEST (DF denominator)91
p-value1.51767487466259e-13
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation36865.9122929752
Sum Squared Residuals123677689516.594


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1213118271556.7621898-58438.7621897998
281767110759.229434398-28992.2294343985
3153198124257.38820593628940.6117940639
4-26007-36490.245199074810483.2451990748
512694281193.598343056645748.4016569434
6157214124313.42780719732900.5721928035
7129352153806.745502125-24454.7455021254
8234817249288.652738246-14471.6527382465
9604485337.962484791755110.0375152083
104781861709.7612852289-13891.7612852289
11245546152345.22371935093200.7762806502
1248020100263.016672208-52243.0166722077
13-1710-6715.769429438095005.76942943809
143264866436.5254617733-33788.5254617733
159535075019.792239509820330.2077604902
16151352121038.43364392930313.5663560712
17288170143829.841252964144340.158747036
18114337107287.6720950487049.32790495192
1937884-1453.9495010299639337.9495010300
20122844118373.6302859544470.36971404615
218234084858.4813124563-2518.48131245631
227980168107.204108223411693.7958917766
23165548119209.60266050546338.3973394953
24116384108135.9535478518248.0464521491
25134028106305.81403698927722.1859630114
2663838101002.479943801-37164.4799438006
277499647448.105602459427547.8943975406
283108076381.7534582761-45301.7534582761
2932168101638.627068254-69470.6270682537
304985767075.4476553549-17218.4476553549
3187161102150.877740806-14989.8777408057
32106113101770.6963569374342.3036430629
338057092559.4326346243-11989.4326346243
34102129108970.258094779-6841.25809477869
35301670112603.176138140189066.823861860
36102313103806.243141918-1493.24314191827
3788577102565.069179618-13988.0691796185
38112477117397.576816457-4920.57681645669
39191778182292.1389743819485.86102561881
407980488610.29123114-8806.29123114004
41128294135921.655576866-7627.65557686611
4296448101212.636821359-4764.63682135877
439381195677.0735991959-1866.07359919588
44117520102311.36140142315208.6385985768
456915994014.8973874322-24855.8973874322
46101792105619.004381-3827.00438099995
47210568186400.77653386124167.2234661394
48136996145124.613196440-8128.6131964396
49121920102521.87224321019398.1277567903
507640392501.6281403057-16098.6281403057
51108094115179.377526877-7085.37752687652
52134759137275.533266458-2516.53326645753
53188873175869.10574629613003.8942537043
54146216153398.235463262-7182.23546326161
55156608153921.4001171652686.59988283512
566134889997.1829398866-28649.1829398866
575035098973.520945051-48623.5209450511
588772097667.0562584108-9947.05625841083
599948995440.0167379784048.98326202195
608741986981.1288837692437.871116230826
6194355100248.633800110-5893.63380011022
626032691102.1599397574-30776.1599397574
6394670102858.409187576-8188.40918757643
648242585318.537357861-2893.53735786104
655901790197.688862645-31180.6888626449
669082977824.389026576213004.6109734238
678079190729.7275906502-9938.72759065021
68100423108090.887559345-7667.88755934492
69131116102595.43172288028520.5682771203
70100269105278.694070491-5009.69407049134
712733050952.085744255-23622.085744255
723903992295.8875835272-53256.8875835272
7310688595938.564840055210946.4351599448
747928594883.1140766618-15598.1140766618
7511888197978.822805311420902.1771946886
767762392469.857293395-14846.8572933949
7711476897242.86082901717525.1391709829
787401592081.4240047587-18066.4240047587
796946588706.8589943515-19241.8589943515
80117869126153.671737811-8284.67173781054
816098293952.2466475115-32970.2466475115
829013196998.0947546509-6867.09475465085
83138971100921.94782669138049.0521733088
843962592813.2094663442-53188.2094663442
8510272596824.58848046725900.41151953277
866423974764.0619711108-10525.0619711108
879026296718.227321989-6456.227321989
8810396096395.26674439057564.73325560954
8910661196899.37531959329711.62468040676
9010334596717.95675390676627.0432460933
919555196283.6208096572-732.62080965723
928290394126.5774213834-11223.5774213834
936359390280.5304702878-26687.5304702878
94126910120997.1291162235912.87088377726
953752790866.7383970305-53339.7383970305
966024778170.0414337687-17923.0414337687
9711299597739.538216681615255.4617833184
987018477793.8367675531-7609.8367675531
9913014099191.291817065630948.7081829344
1007322190573.007135473-17352.0071354731


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
120.9971266159934620.005746768013076040.00287338400653802
130.9937334471640970.01253310567180520.00626655283590261
140.9984769925879980.003046014824004500.00152300741200225
150.9967984037318960.006403192536207510.00320159626810375
160.995621322281450.00875735543710020.0043786777185501
170.9999494125485560.0001011749028890715.05874514445356e-05
180.9998878345762380.0002243308475234940.000112165423761747
190.9997517586098370.0004964827803264720.000248241390163236
200.9995203868970570.0009592262058868550.000479613102943427
210.9993414209252180.001317158149564480.000658579074782239
220.9988995680965780.002200863806843700.00110043190342185
230.9981536061021640.003692787795672030.00184639389783602
240.9972599098102650.0054801803794690.0027400901897345
250.9962379106492670.007524178701466290.00376208935073314
260.9986179810108720.002764037978256590.00138201898912829
270.9976971623536140.004605675292771940.00230283764638597
280.9989381186771170.002123762645766310.00106188132288315
290.9999488240787170.0001023518425669595.11759212834793e-05
300.9999048580104680.0001902839790646149.51419895323072e-05
310.9999214859103960.0001570281792083827.85140896041911e-05
320.9998588047736520.0002823904526950730.000141195226347536
330.9998777050228530.0002445899542939940.000122294977146997
340.9998303131668540.0003393736662910030.000169686833145502
350.9999999999940821.18365330178135e-115.91826650890677e-12
360.999999999986962.60816899040654e-111.30408449520327e-11
370.9999999999766434.67136919906353e-112.33568459953177e-11
380.9999999999478261.04349068301360e-105.21745341506798e-11
390.9999999998686692.62662579211616e-101.31331289605808e-10
400.9999999997330225.33955170451638e-102.66977585225819e-10
410.9999999999901551.96909962565398e-119.84549812826988e-12
420.999999999991531.69416396153160e-118.47081980765799e-12
430.9999999999789564.20869884073385e-112.10434942036693e-11
440.9999999999760054.799093274538e-112.399546637269e-11
450.999999999953549.29213316969542e-114.64606658484771e-11
460.999999999872692.54621078667073e-101.27310539333537e-10
470.999999999925811.48380017034485e-107.41900085172423e-11
480.9999999999965536.8939773059141e-123.44698865295705e-12
490.9999999999921741.56513267665523e-117.82566338327613e-12
500.9999999999845243.09528712017229e-111.54764356008615e-11
510.9999999999555228.89550818570371e-114.44775409285186e-11
520.9999999999079451.84110125220306e-109.20550626101531e-11
530.999999999726475.47058242746945e-102.73529121373472e-10
540.999999999863662.72679968511218e-101.36339984255609e-10
550.9999999999098071.80386292692178e-109.0193146346089e-11
560.9999999997825774.34845081047319e-102.17422540523659e-10
570.9999999999830373.39250488840588e-111.69625244420294e-11
580.999999999945291.09418116532638e-105.4709058266319e-11
590.9999999998290633.41873259617551e-101.70936629808776e-10
600.9999999995020489.95904839121552e-104.97952419560776e-10
610.9999999987896762.42064693100931e-091.21032346550465e-09
620.999999996809416.38117826510781e-093.19058913255391e-09
630.9999999905775671.88448666070307e-089.42243330351535e-09
640.9999999713510375.72979262147124e-082.86489631073562e-08
650.999999925061971.49876060554727e-077.49380302773633e-08
660.9999997956949344.08610131027613e-072.04305065513807e-07
670.9999996237462497.52507502412313e-073.76253751206156e-07
680.9999990666254091.86674918253146e-069.33374591265731e-07
690.999998771146382.45770723998227e-061.22885361999114e-06
700.9999966057572846.78848543196701e-063.39424271598350e-06
710.9999932978816121.34042367761426e-056.70211838807129e-06
720.9999868068165692.63863668621131e-051.31931834310566e-05
730.9999759238826364.81522347274234e-052.40761173637117e-05
740.9999388069344840.0001223861310322836.11930655161417e-05
750.9998936241302580.0002127517394841310.000106375869742066
760.9998618708682140.0002762582635710410.000138129131785521
770.9996897724544120.0006204550911765740.000310227545588287
780.9994297260914460.001140547817107210.000570273908553603
790.998907904853410.002184190293178680.00109209514658934
800.9999719299490645.6140101871375e-052.80700509356875e-05
810.9999166132384460.0001667735231078548.33867615539269e-05
820.9998752970237120.0002494059525765440.000124702976288272
830.999659626138620.0006807477227619240.000340373861380962
840.999632831257920.0007343374841613490.000367168742080674
850.9985362974427630.002927405114474790.00146370255723739
860.9965192559755690.00696148804886250.00348074402443125
870.9979741405830170.004051718833965380.00202585941698269
880.9953840904847190.009231819030562360.00461590951528118


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


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220806s6a46890gvqhs1f/1ib371293220930.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220806s6a46890gvqhs1f/1ib371293220930.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220806s6a46890gvqhs1f/2ib371293220930.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220806s6a46890gvqhs1f/2ib371293220930.ps (open in new window)


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


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


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


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220806s6a46890gvqhs1f/63bjd1293220930.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220806s6a46890gvqhs1f/63bjd1293220930.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220806s6a46890gvqhs1f/73bjd1293220930.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220806s6a46890gvqhs1f/73bjd1293220930.ps (open in new window)


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


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


 
Parameters (Session):
par1 = 4 ; par2 = none ; par3 = 2 ; par4 = yes ;
 
Parameters (R input):
par1 = 6 ; 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