Home » date » 2009 » Nov » 17 »

workshop 7 berekening 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: Tue, 17 Nov 2009 11:53:04 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Nov/17/t12584840501gnp4he8tozx921.htm/, Retrieved Tue, 17 Nov 2009 19:54:22 +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/2009/Nov/17/t12584840501gnp4he8tozx921.htm/},
    year = {2009},
}
@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 = {2009},
    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 «
6.70 2.04 6.40 2.16 6.30 2.75 6.80 2.79 7.30 2.88 7.10 3.36 7.00 2.97 6.80 3.10 6.60 2.49 6.30 2.20 6.10 2.25 6.10 2.09 6.30 2.79 6.30 3.14 6.00 2.93 6.20 2.65 6.40 2.67 6.80 2.26 7.50 2.35 7.50 2.13 7.60 2.18 7.60 2.90 7.40 2.63 7.30 2.67 7.10 1.81 6.90 1.33 6.80 0.88 7.50 1.28 7.60 1.26 7.80 1.26 8.00 1.29 8.10 1.10 8.20 1.37 8.30 1.21 8.20 1.74 8.00 1.76 7.90 1.48 7.60 1.04 7.60 1.62 8.30 1.49 8.40 1.79 8.40 1.80 8.40 1.58 8.40 1.86 8.60 1.74 8.90 1.59 8.80 1.26 8.30 1.13 7.50 1.92 7.20 2.61 7.40 2.26 8.80 2.41 9.30 2.26 9.30 2.03 8.70 2.86 8.20 2.55 8.30 2.27 8.50 2.26 8.60 2.57 8.50 3.07 8.20 2.76 8.10 2.51 7.90 2.87 8.60 3.14 8.70 3.11 8.70 3.16 8.50 2.47 8.40 2.57 8.50 2.89 8.70 2.63 8.70 2.38 8.60 1.69 8.50 1.96 8.30 2.19 8.00 1.87 8.20 1.60 8.10 1.63 8.10 1.22 8.00 1.21 7.90 1.49 7.90 1.64 8.00 1.66 8.00 1.77 7.90 1.82 8.00 1.78 7.70 1.28 7.20 1.29 7.50 1.37 7.30 1.12 7.00 1.51 7.00 2.24 7.00 2.94 7.20 3.09 7 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'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Y[t] = + 8.2080736047586 -0.227269357735311X[t] -0.285606603475968M1[t] -0.488132148027806M2[t] -0.567930427340223M3[t] + 0.0969684240333393M4[t] + 0.239140339633371M5[t] + 0.204544398757064M6[t] + 0.117423325161279M7[t] -0.0252531392571213M8[t] + 0.0601006132443807M9[t] + 0.224999629350884M10[t] + 0.179040055854871M11[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)8.20807360475860.2960727.723400
X-0.2272693577353110.071332-3.18610.0019520.000976
M1-0.2856066034759680.359081-0.79540.4283740.214187
M2-0.4881321480278060.359332-1.35840.177540.08877
M3-0.5679304273402230.3597-1.57890.1176830.058841
M40.09696842403333930.3599070.26940.7881860.394093
M50.2391403396333710.3596170.6650.5076710.253835
M60.2045443987570640.3595920.56880.5708190.285409
M70.1174233251612790.3594220.32670.7446130.372307
M8-0.02525313925712130.359132-0.07030.9440890.472045
M90.06010061324438070.3589950.16740.8674010.4337
M100.2249996293508840.3589830.62680.5323140.266157
M110.1790400558548710.3589730.49880.6191040.309552


Multiple Linear Regression - Regression Statistics
Multiple R0.44743687259078
R-squared0.200199754953818
Adjusted R-squared0.0991723555795636
F-TEST (value)1.9816382109588
F-TEST (DF numerator)12
F-TEST (DF denominator)95
p-value0.034235096894344
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.76133582037846
Sum Squared Residuals55.0650619821776


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
16.77.4588375115025-0.758837511502503
26.47.22903964402252-0.82903964402252
36.37.01515244364627-0.71515244364627
46.87.67096052071042-0.87096052071042
57.37.79267819411427-0.492678194114274
67.17.64899296152502-0.548992961525018
777.650506937446-0.650506937446003
86.87.47828545652201-0.678285456522014
96.67.70227351724206-1.10227351724206
106.37.9330806470918-1.6330806470918
116.17.87575760570902-1.77575760570902
126.17.7330806470918-1.6330806470918
136.37.28838549320111-0.988385493201114
146.37.00631567344192-0.706315673441916
1566.97424395925391-0.974243959253914
166.27.70277823079336-1.50277823079336
176.47.84040475923869-1.44040475923869
186.87.89898925503386-1.09898925503386
197.57.7914139392419-0.291413939241896
207.57.69873673352526-0.198736733525265
217.67.77272701814-0.172727018140002
227.67.77399209667708-0.173992096677081
237.47.7893952497696-0.389395249769600
247.37.60126441960532-0.301264419605318
257.17.51110946378172-0.411109463781718
266.97.41767321094283-0.517673210942828
276.87.4401461426113-0.640146142611301
287.58.01413725089074-0.514137250890739
297.68.16085455364548-0.560854553645478
307.88.12625861276917-0.32625861276917
3188.03231945844133-0.0323194584413256
328.17.932824171992630.167175828007365
338.27.95681519790560.243184802094396
348.38.158077311249760.141922688750245
358.27.991664978154030.208335021845972
3687.808079535144450.191920464855549
377.97.586108351834370.31389164816563
387.67.483581324686070.116418675313931
397.67.271966817887170.328033182112829
408.37.966410685766320.333589314233677
418.48.040401794045760.359598205954238
428.48.00353315959210.396466840407898
438.47.966411344698090.433588655301915
448.47.76009946011380.639900539886202
458.67.872725535543540.727274464456462
468.98.071714955310340.828285044689662
478.88.100754269866980.699245730133024
488.37.95125923051770.348740769482304
497.57.486109834430830.0138901655691662
507.27.126768433041630.0732315669583697
517.47.126514428936570.273485571063428
528.87.757322876649841.04267712335016
539.37.933585195910171.36641480408983
549.37.951261207312981.34873879268702
558.77.675506566796891.02449343320311
568.27.603283603276430.596716396723565
578.37.752272775943820.547727224056177
588.57.919444485627680.58055551437232
598.67.803031411233720.79696858876628
608.57.51035667651120.989643323488806
618.27.295203573933170.904796426066827
628.17.149495368815160.950504631184838
637.96.987880120718030.912119879281967
648.67.591416245503061.00858375449694
658.77.740406241835150.959593758164847
668.77.694446833072081.00555316692792
678.57.764141616313660.735858383686341
688.47.598738216121730.801261783878273
698.57.611365774147930.88863422585207
708.77.835354823265610.864645176734385
718.77.846212589203430.85378741079657
728.67.823988390185920.776011609814077
738.57.477019060121421.02298093987858
748.37.222221563290461.07777843670954
7587.215149478453340.784850521546657
768.27.941411056415440.258588943584559
778.18.076764891283410.0232351087165872
788.18.13534938707858-0.035349387078583
7988.05050100706015-0.0505010070601506
807.97.844189122475860.0558108775241369
817.97.895452471317070.00454752868293115
8288.05580610026887-0.0558061002688659
8387.984846897421970.0151531025780317
847.97.794443373680330.105556626319668
8587.517927544513780.482072455486223
867.77.429036678829590.270963321170406
877.27.34696570593982-0.146965705939824
887.57.99368300869456-0.493683008694561
897.38.19267226372842-0.892672263728421
9078.06944127333534-1.06944127333534
9177.81641356859278-0.81641356859278
9277.51464855375966-0.514648553759663
937.27.56591190260087-0.365911902600868
947.37.6467212563453-0.346721256345307
957.17.55985319845694-0.459853198456938
966.87.21036112430058-0.410361124300584
976.46.97929916668109-0.57929916668109
986.16.53586810292982-0.435868102929823
996.56.321980902553570.178019097446428
1007.76.961880124576250.73811987542375
1017.97.222232106198640.677767893801356
1027.57.171727310280860.328272689719135
1036.97.25278556140921-0.352785561409210
1046.67.4691946822126-0.869194682212601
1056.97.67045580715911-0.770455807159111
1067.77.90580832416356-0.205808324163561
10787.948483800184320.0515161998156816
10888.0671666029627-0.0671666029627052


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
160.1120962105687580.2241924211375160.887903789431242
170.2277266356942710.4554532713885420.772273364305729
180.15337763207690.30675526415380.8466223679231
190.1145714281423830.2291428562847670.885428571857617
200.09412651721653580.1882530344330720.905873482783464
210.1305762709513790.2611525419027580.86942372904862
220.2960875916256680.5921751832513360.703912408374332
230.4181568104966770.8363136209933540.581843189503323
240.4745863454088450.949172690817690.525413654591155
250.461108166486620.922216332973240.538891833513379
260.4320235478726710.8640470957453410.567976452127329
270.3968198900497350.7936397800994690.603180109950265
280.4044396188614890.8088792377229780.595560381138511
290.3687179766960820.7374359533921650.631282023303918
300.3236737159745920.6473474319491840.676326284025408
310.2652878813996890.5305757627993780.73471211860031
320.2197105630893140.4394211261786270.780289436910686
330.2106895849456660.4213791698913320.789310415054334
340.2072556147841730.4145112295683450.792744385215827
350.2575683092671350.515136618534270.742431690732865
360.2805969722026140.5611939444052280.719403027797386
370.2808053056724540.5616106113449080.719194694327546
380.2411243250832470.4822486501664930.758875674916753
390.2527594313699250.505518862739850.747240568630075
400.2785719336515440.5571438673030870.721428066348456
410.2973123013592840.5946246027185680.702687698640716
420.2923951382396930.5847902764793870.707604861760307
430.2567310597917010.5134621195834020.743268940208299
440.2551080674972610.5102161349945230.744891932502739
450.2746127139579450.549225427915890.725387286042055
460.3184995328226420.6369990656452850.681500467177358
470.3176236946090160.6352473892180310.682376305390984
480.2712711089951430.5425422179902850.728728891004857
490.2369620192094760.4739240384189520.763037980790524
500.2390075297950770.4780150595901550.760992470204923
510.2316327182459700.4632654364919400.76836728175403
520.3780886194210320.7561772388420640.621911380578968
530.5793806694709450.841238661058110.420619330529055
540.7210586015254870.5578827969490270.278941398474513
550.8023611682951530.3952776634096940.197638831704847
560.7979537332333070.4040925335333860.202046266766693
570.7839675806292680.4320648387414640.216032419370732
580.771540965285470.4569180694290610.228459034714530
590.7926234144630630.4147531710738730.207376585536937
600.8459481583444250.3081036833111510.154051841655575
610.8613001463436380.2773997073127250.138699853656362
620.8732390031547560.2535219936904880.126760996845244
630.881832645954830.2363347080903420.118167354045171
640.8982636639842460.2034726720315080.101736336015754
650.9129978167718310.1740043664563380.0870021832281689
660.9363436876036950.1273126247926100.0636563123963052
670.9455221268385270.1089557463229450.0544778731614726
680.959304932955500.08139013408900210.0406950670445010
690.9730212541375630.05395749172487390.0269787458624370
700.9792746017505580.04145079649888380.0207253982494419
710.9832062464317530.03358750713649390.0167937535682469
720.9850963823596490.02980723528070190.0149036176403510
730.9898350443201640.02032991135967170.0101649556798358
740.9945947540701770.01081049185964670.00540524592982337
750.9949277440117020.01014451197659540.00507225598829768
760.9914220588009140.01715588239817170.00857794119908586
770.9856063010524720.02878739789505610.0143936989475281
780.9790084305285480.04198313894290490.0209915694714524
790.974653883698670.05069223260265860.0253461163013293
800.9752678030345870.04946439393082630.0247321969654132
810.970458363637090.05908327272581850.0295416363629093
820.9544387687997640.0911224624004730.0455612312002365
830.9305597590468160.1388804819063690.0694402409531845
840.9008086960806060.1983826078387890.0991913039193945
850.9373418528103110.1253162943793780.062658147189689
860.9690714617908830.06185707641823350.0309285382091167
870.9546227182431660.09075456351366880.0453772817568344
880.9215450228058780.1569099543882440.0784549771941222
890.9292499224578420.1415001550843160.070750077542158
900.9840634216492620.03187315670147540.0159365783507377
910.9874528601673050.02509427966539070.0125471398326954
920.9694684748498350.06106305030033030.0305315251501652


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level120.155844155844156NOK
10% type I error level200.259740259740260NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Nov/17/t12584840501gnp4he8tozx921/10a7vm1258483978.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t12584840501gnp4he8tozx921/10a7vm1258483978.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t12584840501gnp4he8tozx921/1bqp91258483978.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t12584840501gnp4he8tozx921/1bqp91258483978.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t12584840501gnp4he8tozx921/2bwbu1258483978.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t12584840501gnp4he8tozx921/2bwbu1258483978.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t12584840501gnp4he8tozx921/3dtqe1258483978.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t12584840501gnp4he8tozx921/3dtqe1258483978.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t12584840501gnp4he8tozx921/429fx1258483978.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t12584840501gnp4he8tozx921/429fx1258483978.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t12584840501gnp4he8tozx921/5v9os1258483978.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t12584840501gnp4he8tozx921/5v9os1258483978.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t12584840501gnp4he8tozx921/673hn1258483978.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t12584840501gnp4he8tozx921/673hn1258483978.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t12584840501gnp4he8tozx921/7a8qo1258483978.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t12584840501gnp4he8tozx921/7a8qo1258483978.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t12584840501gnp4he8tozx921/8zlnz1258483978.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t12584840501gnp4he8tozx921/8zlnz1258483978.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t12584840501gnp4he8tozx921/95byg1258483978.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t12584840501gnp4he8tozx921/95byg1258483978.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = No Linear Trend ;
 
R code (references can be found in the software module):
library(lattice)
library(lmtest)
n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
par1 <- as.numeric(par1)
x <- t(y)
k <- length(x[1,])
n <- length(x[,1])
x1 <- cbind(x[,par1], x[,1:k!=par1])
mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
colnames(x1) <- mycolnames #colnames(x)[par1]
x <- x1
if (par3 == 'First Differences'){
x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
for (i in 1:n-1) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
x <- x2
}
if (par2 == 'Include Monthly Dummies'){
x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
for (i in 1:11){
x2[seq(i,n,12),i] <- 1
}
x <- cbind(x, x2)
}
if (par2 == 'Include Quarterly Dummies'){
x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
for (i in 1:3){
x2[seq(i,n,4),i] <- 1
}
x <- cbind(x, x2)
}
k <- length(x[1,])
if (par3 == 'Linear Trend'){
x <- cbind(x, c(1:n))
colnames(x)[k+1] <- 't'
}
x
k <- length(x[1,])
df <- as.data.frame(x)
(mylm <- lm(df))
(mysum <- summary(mylm))
if (n > n25) {
kp3 <- k + 3
nmkm3 <- n - k - 3
gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
numgqtests <- 0
numsignificant1 <- 0
numsignificant5 <- 0
numsignificant10 <- 0
for (mypoint in kp3:nmkm3) {
j <- 0
numgqtests <- numgqtests + 1
for (myalt in c('greater', 'two.sided', 'less')) {
j <- j + 1
gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
}
if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
}
gqarr
}
bitmap(file='test0.png')
plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
points(x[,1]-mysum$resid)
grid()
dev.off()
bitmap(file='test1.png')
plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
grid()
dev.off()
bitmap(file='test2.png')
hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
grid()
dev.off()
bitmap(file='test3.png')
densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
dev.off()
bitmap(file='test4.png')
qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
qqline(mysum$resid)
grid()
dev.off()
(myerror <- as.ts(mysum$resid))
bitmap(file='test5.png')
dum <- cbind(lag(myerror,k=1),myerror)
dum
dum1 <- dum[2:length(myerror),]
dum1
z <- as.data.frame(dum1)
z
plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
lines(lowess(z))
abline(lm(z))
grid()
dev.off()
bitmap(file='test6.png')
acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
grid()
dev.off()
bitmap(file='test7.png')
pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
grid()
dev.off()
bitmap(file='test8.png')
opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
plot(mylm, las = 1, sub='Residual Diagnostics')
par(opar)
dev.off()
if (n > n25) {
bitmap(file='test9.png')
plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
grid()
dev.off()
}
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
a<-table.row.end(a)
myeq <- colnames(x)[1]
myeq <- paste(myeq, '[t] = ', sep='')
for (i in 1:k){
if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
if (rownames(mysum$coefficients)[i] != '(Intercept)') {
myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
}
}
myeq <- paste(myeq, ' + e[t]')
a<-table.row.start(a)
a<-table.element(a, myeq)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Variable',header=TRUE)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'S.D.',header=TRUE)
a<-table.element(a,'T-STAT<br />H0: parameter = 0',header=TRUE)
a<-table.element(a,'2-tail p-value',header=TRUE)
a<-table.element(a,'1-tail p-value',header=TRUE)
a<-table.row.end(a)
for (i in 1:k){
a<-table.row.start(a)
a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
a<-table.element(a,mysum$coefficients[i,1])
a<-table.element(a, round(mysum$coefficients[i,2],6))
a<-table.element(a, round(mysum$coefficients[i,3],4))
a<-table.element(a, round(mysum$coefficients[i,4],6))
a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple R',1,TRUE)
a<-table.element(a, sqrt(mysum$r.squared))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'R-squared',1,TRUE)
a<-table.element(a, mysum$r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-squared',1,TRUE)
a<-table.element(a, mysum$adj.r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (value)',1,TRUE)
a<-table.element(a, mysum$fstatistic[1])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[2])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[3])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'p-value',1,TRUE)
a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
a<-table.element(a, mysum$sigma)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
a<-table.element(a, sum(myerror*myerror))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Time or Index', 1, TRUE)
a<-table.element(a, 'Actuals', 1, TRUE)
a<-table.element(a, 'Interpolation<br />Forecast', 1, TRUE)
a<-table.element(a, 'Residuals<br />Prediction Error', 1, TRUE)
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,i, 1, TRUE)
a<-table.element(a,x[i])
a<-table.element(a,x[i]-mysum$resid[i])
a<-table.element(a,mysum$resid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable4.tab')
if (n > n25) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-values',header=TRUE)
a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'breakpoint index',header=TRUE)
a<-table.element(a,'greater',header=TRUE)
a<-table.element(a,'2-sided',header=TRUE)
a<-table.element(a,'less',header=TRUE)
a<-table.row.end(a)
for (mypoint in kp3:nmkm3) {
a<-table.row.start(a)
a<-table.element(a,mypoint,header=TRUE)
a<-table.element(a,gqarr[mypoint-kp3+1,1])
a<-table.element(a,gqarr[mypoint-kp3+1,2])
a<-table.element(a,gqarr[mypoint-kp3+1,3])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable5.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Description',header=TRUE)
a<-table.element(a,'# significant tests',header=TRUE)
a<-table.element(a,'% significant tests',header=TRUE)
a<-table.element(a,'OK/NOK',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'1% type I error level',header=TRUE)
a<-table.element(a,numsignificant1)
a<-table.element(a,numsignificant1/numgqtests)
if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'5% type I error level',header=TRUE)
a<-table.element(a,numsignificant5)
a<-table.element(a,numsignificant5/numgqtests)
if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'10% type I error level',header=TRUE)
a<-table.element(a,numsignificant10)
a<-table.element(a,numsignificant10/numgqtests)
if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable6.tab')
}
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by