Home » date » 2008 » Nov » 26 »

Seatbelt Law

*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: Wed, 26 Nov 2008 13:46:12 -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/t1227733339w9rfwwc2pfyhxha.htm/, Retrieved Wed, 26 Nov 2008 21:02:19 +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/t1227733339w9rfwwc2pfyhxha.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:
Q3: with dummies
 
Dataseries X:
» Textbox « » Textfile « » CSV «
98,5 0 96,7 0 113,1 0 100 0 104,7 0 108,5 0 90,5 0 88,6 0 105,4 0 119,9 0 107,2 0 84,1 0 101,4 0 105,1 0 118,7 0 113,8 0 113,8 0 118,9 0 98,5 0 91 0 120,7 0 127,9 0 112,4 0 93,1 0 107,5 0 107,3 0 114,8 0 120,8 0 112,2 0 123,3 0 100,6 0 86,7 0 123,6 0 125,3 0 111,1 0 98,4 0 102,3 0 105 0 128,2 0 124,7 0 116,1 0 131,2 0 97,7 0 88,8 0 132,8 0 113,9 0 112,6 1 104,3 1 107,5 1 106 1 117,3 1 123,1 1 114,3 1 132 1 92,3 1 93,7 1 121,3 1 113,6 1 116,3 1 98,3 1 111,9 1 109,3 1 133,2 1 118 1 131,6 1 134,1 1 96,7 1 99,8 1 128,3 1 134,9 1 130,7 1 107,3 1 121,6 1 120,6 1 140,5 1 124,8 1 129,9 1 159,4 1 111 1 110,1 1 132,7 1 135 1 118,6 1 94 1 117,9 1 114,7 1 113,6 1 130,6 1 117,1 1 123,2 1 106,1 1 87,9 1
 
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 time8 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001


Multiple Linear Regression - Estimated Regression Equation
Y[t] = + 86.4631868131868 -1.87596153846154X[t] + 12.5862637362637M1[t] + 11.8554258241758M2[t] + 25.9495879120879M3[t] + 22.75625M4[t] + 20.5004120879121M5[t] + 31.6195741758242M6[t] + 1.72623626373626M7[t] -4.36710164835165M8[t] + 26.9334478021978M9[t] + 27.5043956043956M10[t] + 18.7290521978022M11[t] + 0.243337912087912t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)86.46318681318683.0308128.528100
X-1.875961538461542.970788-0.63150.529580.26479
M112.58626373626373.631923.46550.0008640.000432
M211.85542582417583.6308863.26520.0016260.000813
M325.94958791208793.6307147.147200
M422.756253.6314036.266500
M520.50041208791213.6329535.642900
M631.61957417582423.6353628.697800
M71.726236263736263.6386290.47440.6365260.318263
M8-4.367101648351653.642752-1.19880.2342170.117109
M926.93344780219783.759437.164200
M1027.50439560439563.7628387.309500
M1118.72905219780223.7486014.99633e-062e-06
t0.2433379120879120.0559194.35164.1e-052e-05


Multiple Linear Regression - Regression Statistics
Multiple R0.89006531777351
R-squared0.79221626990326
Adjusted R-squared0.75758564822047
F-TEST (value)22.8761781165759
F-TEST (DF numerator)13
F-TEST (DF denominator)78
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation7.0122100219102
Sum Squared Residuals3835.34497252747


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
198.599.2927884615385-0.792788461538534
296.798.8052884615385-2.10528846153846
3113.1113.142788461538-0.0427884615384666
4100110.192788461538-10.1927884615385
5104.7108.180288461538-3.48028846153846
6108.5119.542788461538-11.0427884615385
790.589.89278846153850.607211538461545
888.684.04278846153854.55721153846154
9105.4115.586675824176-10.1866758241758
10119.9116.4009615384623.49903846153846
11107.2107.868956043956-0.668956043956028
1284.189.3832417582418-5.28324175824176
13101.4102.212843406593-0.812843406593395
14105.1101.7253434065933.37465659340658
15118.7116.0628434065932.6371565934066
16113.8113.1128434065930.687156593406594
17113.8111.1003434065932.69965659340659
18118.9122.462843406593-3.56284340659340
1998.592.81284340659345.68715659340659
209186.96284340659344.0371565934066
21120.7118.5067307692312.19326923076923
22127.9119.3210164835168.57898351648352
23112.4110.7890109890111.61098901098902
2493.192.30329670329670.796703296703296
25107.5105.1328983516482.36710164835166
26107.3104.6453983516482.65460164835165
27114.8118.982898351648-4.18289835164835
28120.8116.0328983516484.76710164835165
29112.2114.020398351648-1.82039835164835
30123.3125.382898351648-2.08289835164835
31100.695.73289835164834.86710164835165
3286.789.8828983516484-3.18289835164835
33123.6121.4267857142862.17321428571427
34125.3122.2410714285713.05892857142856
35111.1113.709065934066-2.60906593406594
3698.495.22335164835173.17664835164836
37102.3108.052953296703-5.75295329670329
38105107.565453296703-2.56545329670330
39128.2121.9029532967036.2970467032967
40124.7118.9529532967035.74704670329671
41116.1116.940453296703-0.8404532967033
42131.2128.3029532967032.8970467032967
4397.798.6529532967033-0.952953296703295
4488.892.8029532967033-4.0029532967033
45132.8124.3468406593418.45315934065935
46113.9125.161126373626-11.2611263736264
47112.6114.753159340659-2.15315934065935
48104.396.2674450549458.03255494505495
49107.5109.097046703297-1.59704670329669
50106108.609546703297-2.6095467032967
51117.3122.947046703297-5.6470467032967
52123.1119.9970467032973.10295329670330
53114.3117.984546703297-3.6845467032967
54132129.3470467032972.6529532967033
5592.399.6970467032967-7.3970467032967
5693.793.8470467032967-0.1470467032967
57121.3125.390934065934-4.09093406593407
58113.6126.205219780220-12.6052197802198
59116.3117.673214285714-1.37321428571429
6098.399.1875-0.887500000000006
61111.9112.017101648352-0.117101648351631
62109.3111.529601648352-2.22960164835165
63133.2125.8671016483527.33289835164835
64118122.917101648352-4.91710164835164
65131.6120.90460164835210.6953983516483
66134.1132.2671016483521.83289835164834
6796.7102.617101648352-5.91710164835165
6899.896.76710164835173.03289835164834
69128.3128.310989010989-0.0109890109889980
70134.9129.1252747252755.77472527472528
71130.7120.59326923076910.1067307692308
72107.3102.1075549450555.19244505494506
73121.6114.9371565934076.66284340659341
74120.6114.4496565934076.1503434065934
75140.5128.78715659340711.7128434065934
76124.8125.837156593407-1.03715659340659
77129.9123.8246565934076.07534340659341
78159.4135.18715659340724.2128434065934
79111105.5371565934075.46284340659341
80110.199.687156593406610.4128434065934
81132.7131.2310439560441.46895604395603
82135132.0453296703302.95467032967033
83118.6123.513324175824-4.91332417582418
8494105.027609890110-11.0276098901099
85117.9117.8572115384620.0427884615384749
86114.7117.369711538462-2.66971153846153
87113.6131.707211538462-18.1072115384615
88130.6128.7572115384621.84278846153846
89117.1126.744711538462-9.64471153846155
90123.2138.107211538462-14.9072115384615
91106.1108.457211538462-2.35721153846155
9287.9102.607211538462-14.7072115384615


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.1093441658770230.2186883317540460.890655834122977
180.04590352102346320.09180704204692640.954096478976537
190.01576829391572730.03153658783145450.984231706084273
200.01282813285799450.02565626571598910.987171867142005
210.01553455264242840.03106910528485680.984465447357572
220.006637771092101430.01327554218420290.993362228907899
230.00309679252787020.00619358505574040.99690320747213
240.001146186428907300.002292372857814590.998853813571093
250.0007495524701859090.001499104940371820.999250447529814
260.0005257372624862140.001051474524972430.999474262737514
270.003358680426490250.006717360852980510.99664131957351
280.002300612618540980.004601225237081960.99769938738146
290.002044452844717660.004088905689435320.997955547155282
300.001004201496263540.002008402992527080.998995798503736
310.0005349564872164930.001069912974432990.999465043512784
320.001836115819661360.003672231639322720.998163884180339
330.0009889786917518810.001977957383503760.999011021308248
340.0008662256045874720.001732451209174940.999133774395413
350.0006734351728690510.001346870345738100.999326564827131
360.0003583955476596750.000716791095319350.99964160445234
370.0006445608176068520.001289121635213700.999355439182393
380.0005326621540669420.001065324308133880.999467337845933
390.0003817776795178560.0007635553590357120.999618222320482
400.0002709858014978550.000541971602995710.999729014198502
410.0001425985849684160.0002851971699368320.999857401415032
420.0001026864120902730.0002053728241805460.99989731358791
430.0001003324418097280.0002006648836194550.99989966755819
440.0001072771333951120.0002145542667902240.999892722866605
450.0001795799653510600.0003591599307021210.999820420034649
460.00167885202291570.00335770404583140.998321147977084
470.0009784221992823550.001956844398564710.999021577800718
480.0009248978591039070.001849795718207810.999075102140896
490.0005789643922033130.001157928784406630.999421035607797
500.0003804546512118640.0007609093024237280.999619545348788
510.0003494952933868150.000698990586773630.999650504706613
520.0001951848877204130.0003903697754408260.99980481511228
530.0001312902161416490.0002625804322832980.999868709783858
549.31377158575369e-050.0001862754317150740.999906862284142
550.0001399041265738180.0002798082531476370.999860095873426
567.35407161435815e-050.0001470814322871630.999926459283856
575.10374520836822e-050.0001020749041673640.999948962547916
580.0003698381290852360.0007396762581704730.999630161870915
590.0002765558577228120.0005531117154456240.999723444142277
600.0001517509565397130.0003035019130794260.99984824904346
610.0001240171819033890.0002480343638067790.999875982818097
620.0001174451597116960.0002348903194233920.999882554840288
638.96686079923559e-050.0001793372159847120.999910331392008
640.0001466100729414240.0002932201458828480.999853389927059
650.0001844676298098610.0003689352596197220.99981553237019
660.0002682015177035770.0005364030354071540.999731798482296
670.002200131842609430.004400263685218860.99779986815739
680.003227512428994480.006455024857988950.996772487571006
690.004956200384759070.009912400769518140.99504379961524
700.006649143316729650.01329828663345930.99335085668327
710.004689654056594230.009379308113188460.995310345943406
720.00220277086334880.00440554172669760.997797229136651
730.001870398600310860.003740797200621720.99812960139969
740.001311966678641510.002623933357283030.998688033321358
750.001309474681268670.002618949362537350.998690525318731


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level520.88135593220339NOK
5% type I error level570.966101694915254NOK
10% type I error level580.983050847457627NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227733339w9rfwwc2pfyhxha/1073vh1227732359.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227733339w9rfwwc2pfyhxha/1073vh1227732359.ps (open in new window)


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


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


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


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227733339w9rfwwc2pfyhxha/41u8n1227732359.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227733339w9rfwwc2pfyhxha/41u8n1227732359.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227733339w9rfwwc2pfyhxha/578fm1227732359.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227733339w9rfwwc2pfyhxha/578fm1227732359.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227733339w9rfwwc2pfyhxha/6owwf1227732359.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227733339w9rfwwc2pfyhxha/6owwf1227732359.ps (open in new window)


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


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


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227733339w9rfwwc2pfyhxha/9o42k1227732359.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227733339w9rfwwc2pfyhxha/9o42k1227732359.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = 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