Home » date » 2008 » Nov » 26 »

Gilliam Schoorel

*Unverified author*
R Software Module: rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Wed, 26 Nov 2008 03:26:38 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/Nov/26/t1227695463j3os8qyvbc8v731.htm/, Retrieved Wed, 26 Nov 2008 10:31:13 +0000
 
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/2008/Nov/26/t1227695463j3os8qyvbc8v731.htm/},
    year = {2008},
}
@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 = {2008},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
 
Feedback Forum:

Post a new message
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
-3,3 0 -3,5 0 -3,5 0 -8,4 0 -15,7 0 -18,7 0 -22,8 0 -20,7 0 -14 0 -6,3 0 0,7 1 0,2 1 0,8 1 1,2 1 4,5 1 0,4 1 5,9 1 6,5 1 12,8 1 4,2 1 -3,3 0 -12,5 0 -16,3 0 -10,5 0 -11,8 0 -11,4 0 -17,7 0 -17,3 0 -18,6 0 -17,9 0 -21,4 0 -19,4 0 -15,5 0 -7,7 0 -0,7 0 -1,6 0 1,4 1 0,7 1 9,5 1 1,4 1 4,1 1 6,6 1 18,4 1 16,9 1 9,2 1 -4,3 0 -5,9 0 -7,7 0 -5,4 0 -2,3 0 -4,8 0 2,3 0 -5,2 0 -10 0 -17,1 0 -14,4 0 -3,9 0 3,7 1 6,5 1 0,9 1 -4,1 0 -7 0 -12,2 0 -2,5 0 4,4 1 13,7 1 12,3 1 13,4 1 2,2 1 1,7 1 -7,2 0 -4,8 0 -2,9 0 -2,4 0 -2,5 0 -5,3 0 -7,1 0 -8 0 -8,9 0 -7,7 0 -1,1 0 4 1 9,6 1 10,9 1 13 1 14,9 1 20,1 1 10,8 1 11 1 3,8 1 10,8 1 7,6 1 10,2 1 2,2 1 -0,1 0 -1,7 0 -4,8 0
 
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
Registraties[t] = -8.74107142857142 + 15.8898519163763D[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.741071428571420.809611-10.796600
D15.88985191637631.24528912.7600


Multiple Linear Regression - Regression Statistics
Multiple R0.794683173034995
R-squared0.631521345504968
Adjusted R-squared0.627642622826073
F-TEST (value)162.816833732714
F-TEST (DF numerator)1
F-TEST (DF denominator)95
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation6.05857198281356
Sum Squared Residuals3487.09797473868


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1-3.3-8.741071428571485.44107142857148
2-3.5-8.741071428571435.24107142857143
3-3.5-8.741071428571435.24107142857143
4-8.4-8.741071428571430.341071428571426
5-15.7-8.74107142857143-6.95892857142857
6-18.7-8.74107142857143-9.95892857142857
7-22.8-8.74107142857143-14.0589285714286
8-20.7-8.74107142857143-11.9589285714286
9-14-8.74107142857143-5.25892857142857
10-6.3-8.741071428571432.44107142857143
110.77.14878048780488-6.44878048780488
120.27.14878048780488-6.94878048780488
130.87.14878048780488-6.34878048780488
141.27.14878048780488-5.94878048780488
154.57.14878048780488-2.64878048780488
160.47.14878048780488-6.74878048780488
175.97.14878048780488-1.24878048780488
186.57.14878048780488-0.648780487804878
1912.87.148780487804885.65121951219512
204.27.14878048780488-2.94878048780488
21-3.3-8.741071428571435.44107142857143
22-12.5-8.74107142857143-3.75892857142857
23-16.3-8.74107142857143-7.55892857142858
24-10.5-8.74107142857143-1.75892857142857
25-11.8-8.74107142857143-3.05892857142857
26-11.4-8.74107142857143-2.65892857142857
27-17.7-8.74107142857143-8.95892857142857
28-17.3-8.74107142857143-8.55892857142858
29-18.6-8.74107142857143-9.85892857142857
30-17.9-8.74107142857143-9.15892857142857
31-21.4-8.74107142857143-12.6589285714286
32-19.4-8.74107142857143-10.6589285714286
33-15.5-8.74107142857143-6.75892857142857
34-7.7-8.741071428571431.04107142857143
35-0.7-8.741071428571438.04107142857143
36-1.6-8.741071428571437.14107142857143
371.47.14878048780488-5.74878048780488
380.77.14878048780488-6.44878048780488
399.57.148780487804882.35121951219512
401.47.14878048780488-5.74878048780488
414.17.14878048780488-3.04878048780488
426.67.14878048780488-0.548780487804878
4318.47.1487804878048811.2512195121951
4416.97.148780487804889.75121951219512
459.27.148780487804882.05121951219512
46-4.3-8.741071428571434.44107142857143
47-5.9-8.741071428571432.84107142857143
48-7.7-8.741071428571431.04107142857143
49-5.4-8.741071428571433.34107142857143
50-2.3-8.741071428571436.44107142857143
51-4.8-8.741071428571433.94107142857143
522.3-8.7410714285714311.0410714285714
53-5.2-8.741071428571433.54107142857143
54-10-8.74107142857143-1.25892857142857
55-17.1-8.74107142857143-8.35892857142858
56-14.4-8.74107142857143-5.65892857142857
57-3.9-8.741071428571434.84107142857143
583.77.14878048780488-3.44878048780488
596.57.14878048780488-0.648780487804878
600.97.14878048780488-6.24878048780488
61-4.1-8.741071428571434.64107142857143
62-7-8.741071428571431.74107142857143
63-12.2-8.74107142857143-3.45892857142857
64-2.5-8.741071428571436.24107142857143
654.47.14878048780488-2.74878048780488
6613.77.148780487804886.55121951219512
6712.37.148780487804885.15121951219512
6813.47.148780487804886.25121951219512
692.27.14878048780488-4.94878048780488
701.77.14878048780488-5.44878048780488
71-7.2-8.741071428571431.54107142857143
72-4.8-8.741071428571433.94107142857143
73-2.9-8.741071428571435.84107142857143
74-2.4-8.741071428571436.34107142857143
75-2.5-8.741071428571436.24107142857143
76-5.3-8.741071428571433.44107142857143
77-7.1-8.741071428571431.64107142857143
78-8-8.741071428571430.741071428571426
79-8.9-8.74107142857143-0.158928571428574
80-7.7-8.741071428571431.04107142857143
81-1.1-8.741071428571437.64107142857143
8247.14878048780488-3.14878048780488
839.67.148780487804882.45121951219512
8410.97.148780487804883.75121951219512
85137.148780487804885.85121951219512
8614.97.148780487804887.75121951219512
8720.17.1487804878048812.9512195121951
8810.87.148780487804883.65121951219512
89117.148780487804883.85121951219512
903.87.14878048780488-3.34878048780488
9110.87.148780487804883.65121951219512
927.67.148780487804880.451219512195121
9310.27.148780487804883.05121951219512
942.27.14878048780488-4.94878048780488
95-0.1-8.741071428571438.64107142857143
96-1.7-8.741071428571437.04107142857143
97-4.8-8.741071428571433.94107142857143


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
50.6194071781487040.7611856437025930.380592821851296
60.8153704631730280.3692590736539450.184629536826972
70.9484383095586820.1031233808826350.0515616904413175
80.9672464501208360.06550709975832830.0327535498791641
90.946901554801130.1061968903977400.0530984451988699
100.9341239730313220.1317520539373550.0658760269686775
110.9030563659655250.1938872680689500.0969436340344749
120.8663336833606750.2673326332786500.133666316639325
130.8220146174155820.3559707651688360.177985382584418
140.7712893477076040.4574213045847910.228710652292396
150.7233515964542050.553296807091590.276648403545795
160.6714647324792090.6570705350415820.328535267520791
170.6293211337436380.7413577325127240.370678866256362
180.5858699438432980.8282601123134040.414130056156702
190.6729922319911750.654015536017650.327007768008825
200.6092336353728310.7815327292543370.390766364627169
210.644887181428890.7102256371422190.355112818571109
220.5869472422155960.8261055155688080.413052757784404
230.5856787515899050.828642496820190.414321248410095
240.5206311971557360.9587376056885270.479368802844264
250.4590747717103080.9181495434206150.540925228289692
260.3979835780065780.7959671560131570.602016421993422
270.4369952102910250.873990420582050.563004789708975
280.4656787468798660.9313574937597310.534321253120134
290.5344534177753810.9310931644492390.465546582224619
300.5866376861039960.8267246277920070.413362313896004
310.7578332641260230.4843334717479530.242166735873977
320.8480542624564010.3038914750871970.151945737543599
330.8650385242767530.2699229514464940.134961475723247
340.8567419807481740.2865160385036510.143258019251826
350.9220750154775280.1558499690449440.077924984522472
360.9481559785664490.1036880428671030.0518440214335514
370.9460575406792190.1078849186415630.0539424593207814
380.9491040331856530.1017919336286940.0508959668143472
390.9427721864890940.1144556270218110.0572278135109056
400.9442287911120630.1115424177758730.0557712088879366
410.9347345821660820.1305308356678360.0652654178339178
420.9197719509051230.1604560981897530.0802280490948765
430.975593216589640.04881356682072040.0244067834103602
440.9898150071166560.02036998576668820.0101849928833441
450.9860909311585650.02781813768287020.0139090688414351
460.9852008234635740.02959835307285140.0147991765364257
470.9818667607416740.03626647851665160.0181332392583258
480.976617491981560.04676501603688070.0233825080184403
490.9717731629625930.05645367407481370.0282268370374069
500.9734860221206630.05302795575867310.0265139778793366
510.968084112463030.0638317750739390.0319158875369695
520.9858918144911640.02821637101767140.0141081855088357
530.9815806455467120.03683870890657650.0184193544532882
540.976605696230750.04678860753849890.0233943037692494
550.9910722944730730.01785541105385490.00892770552692747
560.9950122674673880.009975465065224180.00498773253261209
570.9935591196922220.01288176061555600.00644088030777801
580.9926476407840380.01470471843192350.00735235921596176
590.9894723264690410.02105534706191830.0105276735309591
600.9933880115955370.01322397680892660.00661198840446331
610.9911649287475810.01767014250483760.00883507125241882
620.9875640278342620.02487194433147530.0124359721657376
630.9908152203402630.01836955931947370.00918477965973685
640.9888558264053490.02228834718930220.0111441735946511
650.9877639314425140.02447213711497310.0122360685574865
660.9879028570989420.02419428580211630.0120971429010582
670.9854055473749980.02918890525000380.0145944526250019
680.9850272220388440.02994555592231240.0149727779611562
690.9886870635693640.02262587286127280.0113129364306364
700.9939283088287360.01214338234252770.00607169117126383
710.9913726772190430.01725464556191500.00862732278095752
720.9868848071241120.0262303857517770.0131151928758885
730.9819249203479680.03615015930406410.0180750796520320
740.9763752195566350.04724956088672980.0236247804433649
750.969168412405840.06166317518831880.0308315875941594
760.9541932368570740.09161352628585250.0458067631429263
770.9364955202815050.1270089594369890.0635044797184947
780.9208465277605850.1583069444788290.0791534722394146
790.9182252924913170.1635494150173660.081774707508683
800.9148268655605940.1703462688788110.0851731344394056
810.8858693201280530.2282613597438950.114130679871947
820.8973446939406390.2053106121187230.102655306059361
830.852071126922890.2958577461542210.147928873077110
840.7937922543593190.4124154912813620.206207745640681
850.7435175259403450.512964948119310.256482474059655
860.7375067710122390.5249864579755220.262493228987761
870.9634216336536440.07315673269271230.0365783663463562
880.9456764787256820.1086470425486370.0543235212743185
890.9312209253357250.1375581493285490.0687790746642745
900.9071872203685620.1856255592628760.0928127796314378
910.8765563250567880.2468873498864230.123443674943212
920.7576208055653480.4847583888693040.242379194434652


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level10.0113636363636364NOK
5% type I error level290.329545454545455NOK
10% type I error level360.409090909090909NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227695463j3os8qyvbc8v731/102m5g1227695192.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227695463j3os8qyvbc8v731/102m5g1227695192.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227695463j3os8qyvbc8v731/1zt241227695192.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227695463j3os8qyvbc8v731/1zt241227695192.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227695463j3os8qyvbc8v731/2c3gv1227695192.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227695463j3os8qyvbc8v731/2c3gv1227695192.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227695463j3os8qyvbc8v731/3wjor1227695192.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227695463j3os8qyvbc8v731/3wjor1227695192.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227695463j3os8qyvbc8v731/4efxx1227695192.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227695463j3os8qyvbc8v731/4efxx1227695192.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227695463j3os8qyvbc8v731/5c2ar1227695192.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227695463j3os8qyvbc8v731/5c2ar1227695192.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227695463j3os8qyvbc8v731/60vz61227695192.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227695463j3os8qyvbc8v731/60vz61227695192.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227695463j3os8qyvbc8v731/7dmrd1227695192.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227695463j3os8qyvbc8v731/7dmrd1227695192.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227695463j3os8qyvbc8v731/89pzt1227695192.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227695463j3os8qyvbc8v731/89pzt1227695192.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227695463j3os8qyvbc8v731/9phj41227695192.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227695463j3os8qyvbc8v731/9phj41227695192.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