Home » date » 2008 » Nov » 20 »

Seatbelt law Q3 (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: Thu, 20 Nov 2008 07:52:49 -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/20/t1227192833mrhkgf31vfway33.htm/, Retrieved Thu, 20 Nov 2008 14:54:03 +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/20/t1227192833mrhkgf31vfway33.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 «
1593 0 1477.9 0 1733.7 0 1569.7 0 1843.7 0 1950.3 0 1657.5 0 1772.1 0 1568.3 0 1809.8 0 1646.7 0 1808.5 0 1763.9 0 1625.5 0 1538.8 0 1342.4 0 1645.1 0 1619.9 0 1338.1 0 1505.5 0 1529.1 0 1511.9 0 1656.7 0 1694.4 0 1662.3 0 1588.7 0 1483.3 0 1585.6 0 1658.9 0 1584.4 0 1470.6 0 1618.7 0 1407.6 0 1473.9 0 1515.3 0 1485.4 0 1496.1 0 1493.5 0 1298.4 0 1375.3 0 1507.9 0 1455.3 0 1363.3 0 1392.8 0 1348.8 0 1880.3 0 1669.2 0 1543.6 0 1701.2 0 1516.5 0 1466.8 0 1484.1 0 1577.2 0 1684.5 0 1414.7 0 1674.5 0 1598.7 0 1739.1 0 1674.6 0 1671.8 0 1802 0 1526.8 0 1580.9 0 1634.8 0 1610.3 0 1712 0 1678.8 0 1708.1 0 1680.6 0 2056 1 1624 1 2021.4 1 1861.1 1 1750.8 1 1767.5 1 1710.3 1 2151.5 1 2047.9 1 1915.4 1 1984.7 1 1896.5 1 2170.8 1 2139.9 1 2330.5 1 2121.8 1 2226.8 1 1857.9 1 2155.9 1 2341.7 1 2290.2 1 2006.5 1 2111.9 1 1731.3 1 1762.2 1 1863.2 1 1943.5 1 1975.2 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 time5 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
M[t] = + 1670.00057339450 + 404.14629204893D[t] -21.2191760639659M1[t] -112.754478848114M2[t] -172.484702312691M3[t] -155.964925777268M4[t] + 28.9798507581553M5[t] + 30.1746272935779M6[t] -157.105596170999M7[t] -41.5108196355759M8[t] -167.266043100153M9[t] -12.2270530708459M10[t] -88.8572765354229M11[t] -0.169776535423036t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)1670.0005733945061.71861927.058300
D404.1462920489353.5654597.544900
M1-21.219176063965971.42265-0.29710.7671380.383569
M2-112.75447884811473.626977-1.53140.1294660.064733
M3-172.48470231269173.592136-2.34380.021480.01074
M4-155.96492577726873.567462-2.120.036990.018495
M528.979850758155373.5529650.3940.6945920.347296
M630.174627293577973.5486510.41030.6826670.341333
M7-157.10559617099973.554522-2.13590.0356330.017817
M8-41.510819635575973.570575-0.56420.5741180.287059
M9-167.26604310015373.596804-2.27270.0256270.012813
M10-12.227053070845973.452185-0.16650.8681980.434099
M11-88.857276535422973.436885-1.210.2297210.11486
t-0.1697765354230360.865512-0.19620.8449670.422483


Multiple Linear Regression - Regression Statistics
Multiple R0.824238679270694
R-squared0.679369400405898
Adjusted R-squared0.629150149867063
F-TEST (value)13.5280672872753
F-TEST (DF numerator)13
F-TEST (DF denominator)83
p-value1.66533453693773e-15
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation146.863569535586
Sum Squared Residuals1790219.36870891


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
115931648.61162079511-55.6116207951106
21477.91556.90654147553-79.0065414755345
31733.71497.00654147553236.693458524465
41569.71513.3565414755356.3434585244659
51843.71698.13154147553145.568458524466
61950.31699.15654147554251.143458524464
71657.51511.70654147554145.793458524465
81772.11627.13154147553144.968458524465
91568.31501.2065414755467.0934585244646
101809.81656.07575496942153.724245030581
111646.71579.2757549694267.4242450305815
121808.51667.96325496942140.536745030581
131763.91646.57430237003117.325697629970
141625.51554.8692230504670.6307769495411
151538.81494.9692230504643.830776949541
161342.41511.31922305046-168.919223050459
171645.11696.09422305046-50.9942230504589
181619.91697.11922305046-77.2192230504584
191338.11509.66922305046-171.569223050459
201505.51625.09422305046-119.594223050459
211529.11499.1692230504629.9307769495413
221511.91654.03843654434-142.138436544342
231656.71577.2384365443479.4615634556576
241694.41665.9259365443428.4740634556576
251662.31644.5369839449517.7630160550462
261588.71552.8319046253835.8680953746177
271483.31492.93190462538-9.63190462538255
281585.61509.2819046253876.3180953746176
291658.91694.05690462538-35.1569046253822
301584.41695.08190462538-110.681904625382
311470.61507.63190462538-37.0319046253823
321618.71623.05690462538-4.3569046253822
331407.61497.13190462538-89.5319046253823
341473.91652.00111811927-178.101118119266
351515.31575.20111811927-59.9011181192661
361485.41663.88861811927-178.488618119266
371496.11642.49966551988-146.399665519877
381493.51550.79458620031-57.2945862003059
391298.41490.89458620031-192.494586200306
401375.31507.24458620031-131.944586200306
411507.91692.01958620031-184.119586200306
421455.31693.04458620031-237.744586200306
431363.31505.59458620031-142.294586200306
441392.81621.01958620031-228.219586200306
451348.81495.09458620031-146.294586200306
461880.31649.96379969419230.336200305810
471669.21573.1637996941996.0362003058104
481543.61661.85129969419-118.251299694190
491701.21640.462347094860.7376529051992
501516.51548.75726777523-32.2572677752295
511466.81488.85726777523-22.0572677752297
521484.11505.20726777523-21.1072677752295
531577.21689.98226777523-112.782267775229
541684.51691.00726777523-6.5072677752292
551414.71503.55726777523-88.8572677752293
561674.51618.9822677752355.5177322247706
571598.71493.05726777523105.642732224771
581739.11647.9264812691191.1735187308868
591674.61571.12648126911103.473518730887
601671.81659.8139812691111.9860187308868
6118021638.42502866972163.574971330276
621526.81546.71994935015-19.9199493501531
631580.91486.8199493501594.0800506498469
641634.81503.16994935015131.630050649847
651610.31687.94494935015-77.6449493501531
6617121688.9699493501523.0300506498473
671678.81501.51994935015177.280050649847
681708.11616.9449493501591.155050649847
691680.61491.01994935015189.580050649847
7020562050.035454892975.96454510703359
7116241973.23545489297-349.235454892966
722021.42061.92295489297-40.5229548929663
731861.12040.53400229358-179.434002293578
741750.81948.82892297401-198.028922974006
751767.51888.92892297401-121.428922974007
761710.31905.27892297401-194.978922974006
772151.52090.0539229740161.4460770259937
782047.92091.07892297401-43.1789229740059
791915.41903.6289229740111.771077025994
801984.72019.05392297401-34.3539229740061
811896.51893.128922974013.37107702599388
822170.82047.99813646789122.801863532110
832139.91971.19813646789168.70186353211
842330.52059.88563646789270.61436353211
852121.82038.496683868583.303316131499
862226.81946.79160454893280.00839545107
871857.91886.89160454893-28.9916045489300
882155.91903.24160454893252.658395451070
892341.72088.01660454893253.68339545107
902290.22089.04160454893201.158395451070
912006.51901.59160454893104.908395451070
922111.92017.0166045489394.8833954510703
931731.31891.09160454893-159.791604548930
941762.22045.96081804281-283.760818042813
951863.21969.16081804281-105.960818042813
961943.52057.84831804281-114.348318042814
971975.22036.45936544342-61.2593654434247


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.7462555786347330.5074888427305330.253744421365267
180.7610732469821320.4778535060357360.238926753017868
190.731074087346720.5378518253065610.268925912653281
200.6502920330017980.6994159339964040.349707966998202
210.5726267925191940.8547464149616120.427373207480806
220.5142849460109650.971430107978070.485715053989035
230.4857415168645720.9714830337291440.514258483135428
240.4004835033733080.8009670067466150.599516496626692
250.4025250451647830.8050500903295670.597474954835217
260.4211407085119030.8422814170238060.578859291488097
270.3514391560764300.7028783121528590.64856084392357
280.4480099640479140.8960199280958270.551990035952086
290.3755639556471690.7511279112943380.624436044352831
300.3192367385314450.638473477062890.680763261468555
310.2690525194041540.5381050388083090.730947480595846
320.2342045903939390.4684091807878780.765795409606061
330.1846125689436490.3692251378872990.81538743105635
340.1482918101640920.2965836203281840.851708189835908
350.1121029617809790.2242059235619580.887897038219021
360.1024725436534600.2049450873069210.89752745634654
370.07277084786569280.1455416957313860.927229152134307
380.05574093417341790.1114818683468360.944259065826582
390.04798622207371790.09597244414743580.952013777926282
400.0333830774370170.0667661548740340.966616922562983
410.02387624798837890.04775249597675790.976123752011621
420.02108374476067760.04216748952135520.978916255239322
430.01480768678123760.02961537356247520.985192313218762
440.01295197828365040.02590395656730080.98704802171635
450.008930547078675350.01786109415735070.991069452921325
460.09119910251939880.1823982050387980.908800897480601
470.1076680683968140.2153361367936280.892331931603186
480.08420968607193550.1684193721438710.915790313928065
490.09888474937535270.1977694987507050.901115250624647
500.08044151374747310.1608830274949460.919558486252527
510.06183953252385950.1236790650477190.93816046747614
520.05320491461156360.1064098292231270.946795085388436
530.04509043307900640.09018086615801270.954909566920994
540.03862137610008650.0772427522001730.961378623899914
550.03447123838398770.06894247676797540.965528761616012
560.03361599991756670.06723199983513350.966384000082433
570.03626479588758460.07252959177516920.963735204112415
580.03091978472235630.06183956944471250.969080215277644
590.02774410255331860.05548820510663720.972255897446681
600.02071102230640550.0414220446128110.979288977693594
610.02676227118412540.05352454236825080.973237728815875
620.01944618186801660.03889236373603330.980553818131983
630.01582893850554860.03165787701109720.984171061494451
640.01460374118444740.02920748236889480.985396258815553
650.01744370687946270.03488741375892530.982556293120537
660.01484268191413430.02968536382826870.985157318085866
670.01501991675792170.03003983351584330.984980083242078
680.01237036556730690.02474073113461390.987629634432693
690.009789035211669740.01957807042333950.99021096478833
700.007776930100116920.01555386020023380.992223069899883
710.01382190321563990.02764380643127990.98617809678436
720.009319184784858520.01863836956971700.990680815215142
730.006153965494008430.01230793098801690.993846034505992
740.0179897015702040.0359794031404080.982010298429796
750.01089962785451250.0217992557090250.989100372145488
760.05074123168615520.1014824633723100.949258768313845
770.07678601627286230.1535720325457250.923213983727138
780.1775733649182380.3551467298364760.822426635081762
790.2386498586524060.4772997173048120.761350141347594
800.6323143900911860.7353712198176280.367685609908814


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level200.3125NOK
10% type I error level300.46875NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227192833mrhkgf31vfway33/10y0f11227192763.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227192833mrhkgf31vfway33/10y0f11227192763.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227192833mrhkgf31vfway33/1gz3f1227192763.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227192833mrhkgf31vfway33/1gz3f1227192763.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227192833mrhkgf31vfway33/2bms91227192763.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227192833mrhkgf31vfway33/2bms91227192763.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227192833mrhkgf31vfway33/3v6bj1227192763.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227192833mrhkgf31vfway33/3v6bj1227192763.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227192833mrhkgf31vfway33/46qrn1227192763.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227192833mrhkgf31vfway33/46qrn1227192763.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227192833mrhkgf31vfway33/5oyz21227192763.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227192833mrhkgf31vfway33/5oyz21227192763.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227192833mrhkgf31vfway33/6zlwv1227192763.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227192833mrhkgf31vfway33/6zlwv1227192763.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227192833mrhkgf31vfway33/7nugi1227192763.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227192833mrhkgf31vfway33/7nugi1227192763.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227192833mrhkgf31vfway33/8ugyb1227192763.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t1227192833mrhkgf31vfway33/8ugyb1227192763.ps (open in new window)


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