Home » date » 2009 » Nov » 17 »

workshop 7 berekening 1

*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:48:27 -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/t1258483827wlitpc2g7t810k5.htm/, Retrieved Tue, 17 Nov 2009 19:50:39 +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/t1258483827wlitpc2g7t810k5.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 time4 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Y[t] = + 8.19716164420583 -0.23130426630238X[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.197161644205830.18384344.587900
X-0.231304266302380.071629-3.22920.0016530.000826


Multiple Linear Regression - Regression Statistics
Multiple R0.299274017301092
R-squared0.089564937431534
Adjusted R-squared0.080975927407303
F-TEST (value)10.4278534055565
F-TEST (DF numerator)1
F-TEST (DF denominator)106
p-value0.00165294208368527
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.7689867461205
Sum Squared Residuals62.6821052651534


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
16.77.72530094094887-1.02530094094887
26.47.69754442899268-1.29754442899268
36.37.56107491187428-1.26107491187428
46.87.55182274122218-0.751822741222184
57.37.53100535725497-0.23100535725497
67.17.41997930942983-0.319979309429828
777.51018797328776-0.510187973287755
86.87.48011841866845-0.680118418668446
96.67.6212140211129-1.02121402111290
106.37.68829225834059-1.38829225834059
116.17.67672704502547-1.57672704502547
126.17.71373572763385-1.61373572763385
136.37.55182274122218-1.25182274122218
146.37.47086624801635-1.17086624801635
1567.51944014393985-1.51944014393985
166.27.58420533850452-1.38420533850452
176.47.57957925317847-1.17957925317847
186.87.67441400236244-0.874414002362446
197.57.65359661839523-0.153596618395231
207.57.70448355698175-0.204483556981755
217.67.69291834366664-0.092918343666636
227.67.526379271928920.0736207280710776
237.47.58883142383056-0.188831423830564
247.37.57957925317847-0.279579253178470
257.17.77850092219852-0.678500922198517
266.97.88952697002366-0.989526970023658
276.87.99361388985973-1.19361388985973
287.57.90109218333878-0.401092183338778
297.67.90571826866483-0.305718268664826
307.87.90571826866483-0.105718268664826
3187.898779140675750.101220859324246
328.17.94272695127320.157273048726793
338.27.880274799371560.319725200628436
348.37.917283481979940.382716518020056
358.27.794692220839680.405307779160316
3687.790066135513640.209933864486365
377.97.85483133007830.0451686699216985
387.67.95660520725135-0.356605207251349
397.67.82244873279597-0.222448732795969
408.37.852518287415280.447481712584723
418.47.783127007524560.616872992475436
428.47.780813964861540.61918603513846
438.47.831700903448060.568299096551937
448.47.76693570888340.633064291116603
458.67.794692220839680.805307779160317
468.97.829387860785041.07061213921496
478.87.905718268664830.894281731335175
488.37.935787823284130.364212176715866
497.57.75305745290525-0.253057452905255
507.27.59345750915661-0.393457509156612
517.47.67441400236244-0.274414002362445
528.87.639718362417091.16028163758291
539.37.674414002362441.62558599763756
549.37.7276139836121.57238601638801
558.77.535631442581021.16436855741898
568.27.607335765134750.592664234865244
578.37.672100959699420.627899040300579
588.57.674414002362440.825585997637555
598.67.602709679808710.997290320191292
608.57.487057546657521.01294245334248
618.27.558761869211260.641238130788744
628.17.616587935786850.483412064213149
637.97.5333183999180.366681600082007
648.67.470866248016351.12913375198365
658.77.477805376005421.22219462399458
668.77.46624016269031.23375983730970
678.57.625840106438950.874159893561054
688.47.602709679808710.797290320191293
698.57.528692314591950.971307685408054
708.77.588831423830561.11116857616943
718.77.646657490406161.05334250959384
728.67.80625743415480.793742565845198
738.57.743805282253160.75619471774684
748.37.690605301003610.609394698996389
7587.764622666220370.235377333779626
768.27.827074818122020.372925181877983
778.17.820135690132950.279864309867055
788.17.914970439316920.185029560683079
7987.917283481979940.0827165180200555
807.97.852518287415280.0474817125847223
817.97.817822647469920.0821773525300793
8287.813196562143870.186803437856127
8387.787753092850610.212246907149388
847.97.77618787953550.123812120464508
8587.785440050187590.214559949812412
867.77.90109218333878-0.201092183338778
877.27.89877914067575-0.698779140675754
887.57.88027479937156-0.380274799371564
897.37.93810086594716-0.638100865947159
9077.84789220208923-0.84789220208923
9177.6790400876885-0.679040087688493
9277.51712710127683-0.517127101276827
937.27.48243146133147-0.28243146133147
947.37.39684888279959-0.0968488827995894
957.17.35521411486516-0.255214114865161
966.87.18173591513838-0.381735915138376
976.47.23724893905095-0.837248939050947
986.16.99206641677042-0.892066416770424
996.56.85559689965202-0.35559689965202
1007.76.830153430358760.869846569641242
1017.96.9504316488360.949568351164005
1027.56.934240350194830.565759649805171
1036.97.10540550725859-0.20540550725859
1046.67.47086624801635-0.870866248016351
1056.97.58883142383056-0.688831423830564
1067.77.66053574638430.0394642536156976
10787.750744410242230.249255589757769
10888.05375299909835-0.0537529990983487


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
50.1739585386954980.3479170773909960.826041461304502
60.07499130749625670.1499826149925130.925008692503743
70.03052256822712130.06104513645424260.969477431772879
80.01297212228413240.02594424456826470.987027877715868
90.004990430274026380.009980860548052770.995009569725974
100.002544643214185430.005089286428370860.997455356785815
110.00244179188871410.00488358377742820.997558208111286
120.001511378562203200.003022757124406410.998488621437797
130.00180136304339530.00360272608679060.998198636956605
140.003504684960703290.007009369921406570.996495315039297
150.00985756729117910.01971513458235820.99014243270882
160.009165825129724440.01833165025944890.990834174870276
170.006501598052707110.01300319610541420.993498401947293
180.006762084338254510.01352416867650900.993237915661745
190.03466820176603940.06933640353207890.96533179823396
200.08020669610534980.1604133922107000.91979330389465
210.1362130683284180.2724261366568350.863786931671582
220.1865457343429920.3730914686859850.813454265657008
230.1941639442465710.3883278884931430.805836055753429
240.1850423607292690.3700847214585390.81495763927073
250.1688103972227940.3376207944455880.831189602777206
260.1572798219582860.3145596439165710.842720178041715
270.1613481287296800.3226962574593610.83865187127032
280.1705464798285280.3410929596570560.829453520171472
290.1755165562978640.3510331125957280.824483443702136
300.1883732120345840.3767464240691680.811626787965416
310.2134947734886330.4269895469772660.786505226511367
320.2262235653108990.4524471306217980.773776434689101
330.255692523526880.511385047053760.74430747647312
340.2747478863535490.5494957727070980.725252113646451
350.3095353379532060.6190706759064120.690464662046794
360.3056045540199760.6112091080399520.694395445980024
370.2741738547665940.5483477095331880.725826145233406
380.2448633261328680.4897266522657370.755136673867131
390.2143793059591340.4287586119182690.785620694040866
400.2221945688157960.4443891376315910.777805431184204
410.2656517030953280.5313034061906550.734348296904672
420.303319065374130.606638130748260.69668093462587
430.3127476600681850.6254953201363710.687252339931815
440.3433761003087250.6867522006174510.656623899691275
450.3930374247574720.7860748495149440.606962575242528
460.4857639533475770.9715279066951550.514236046652423
470.5055955576409910.9888088847180170.494404442359009
480.4547486762498090.9094973524996190.545251323750191
490.4141360295534970.8282720591069950.585863970446503
500.3886404977117260.7772809954234510.611359502288274
510.3550610005988610.7101220011977230.644938999401139
520.5206655378112660.9586689243774680.479334462188734
530.7785433358533240.4429133282933510.221456664146676
540.907331604853520.1853367902929600.0926683951464799
550.9518622111827440.0962755776345130.0481377888172565
560.9502470639803320.0995058720393350.0497529360196675
570.9471571274158510.1056857451682980.0528428725841489
580.9513913144241370.0972173711517250.0486086855758625
590.9638916426904640.07221671461907170.0361083573095358
600.975274786626770.04945042674645880.0247252133732294
610.9736418196731950.05271636065361070.0263581803268053
620.9681078643493040.06378427130139210.0318921356506961
630.9600062048469940.07998759030601230.0399937951530061
640.9742973077882220.05140538442355510.0257026922117775
650.9860599056787840.02788018864243130.0139400943212156
660.9931552589935910.01368948201281720.00684474100640858
670.9942042202578680.01159155948426430.00579577974213215
680.9946754474417580.01064910511648410.00532455255824205
690.9963920945944650.007215810811070280.00360790540553514
700.9983370454053970.00332590918920640.0016629545946032
710.9992684916380830.001463016723833970.000731508361916986
720.9994946822462130.001010635507574940.000505317753787469
730.9996566059960870.0006867880078263460.000343394003913173
740.9997018807799540.0005962384400915270.000298119220045764
750.999553392505180.0008932149896383660.000446607494819183
760.9994632552441620.001073489511675460.000536744755837729
770.9992885272961040.001422945407792850.000711472703896423
780.9989987319109460.002002536178108760.00100126808905438
790.998487616961710.003024766076581100.00151238303829055
800.9976793688413170.004641262317365450.00232063115868273
810.9966109819477270.006778036104546090.00338901805227305
820.995723288641610.008553422716781870.00427671135839093
830.9949668401771360.01006631964572710.00503315982286356
840.9936362959857290.01272740802854130.00636370401427064
850.9933838661901690.01323226761966160.0066161338098308
860.9901555841962860.01968883160742770.00984441580371384
870.9850191308359860.02996173832802780.0149808691640139
880.976378979015290.0472420419694200.023621020984710
890.9639822069776950.07203558604460970.0360177930223048
900.953765471317090.09246905736581810.0462345286829090
910.9381767611155460.1236464777689070.0618232388844537
920.914049256135870.1719014877282610.0859507438641305
930.8739863297936270.2520273404127450.126013670206372
940.8200473926301860.3599052147396280.179952607369814
950.7526679824002790.4946640351994420.247332017599721
960.6845237041016430.6309525917967130.315476295898357
970.6976596171887290.6046807656225430.302340382811271
980.7962246202801320.4075507594397350.203775379719868
990.815476861677720.3690462766445590.184523138322280
1000.7595994078022730.4808011843954550.240400592197727
1010.7925128383227960.4149743233544090.207487161677204
1020.8514581140165060.2970837719669880.148541885983494
1030.8203192916939590.3593614166120830.179680708306041


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level200.202020202020202NOK
5% type I error level360.363636363636364NOK
10% type I error level480.484848484848485NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258483827wlitpc2g7t810k5/10cin61258483701.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258483827wlitpc2g7t810k5/10cin61258483701.ps (open in new window)


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


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


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


http://www.freestatistics.org/blog/date/2009/Nov/17/t1258483827wlitpc2g7t810k5/4fg601258483701.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258483827wlitpc2g7t810k5/4fg601258483701.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2009/Nov/17/t1258483827wlitpc2g7t810k5/6w4iq1258483701.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258483827wlitpc2g7t810k5/6w4iq1258483701.ps (open in new window)


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


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


http://www.freestatistics.org/blog/date/2009/Nov/17/t1258483827wlitpc2g7t810k5/9n5ma1258483701.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258483827wlitpc2g7t810k5/9n5ma1258483701.ps (open in new window)


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





Copyright

Creative Commons License

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

Software written by Ed van Stee & Patrick Wessa


Disclaimer

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


Privacy Policy

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

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

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

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

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

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

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

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

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


FreeStatistics.org is powered by