Home » date » 2008 » Nov » 20 »

Seatbelt law Q3 (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: Thu, 20 Nov 2008 07:47:19 -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/t122719252692vthtv4xgxay8b.htm/, Retrieved Thu, 20 Nov 2008 14:48:46 +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/t122719252692vthtv4xgxay8b.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 time8 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
M[t] = + 1589.85072463768 + 403.592132505176D[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)1589.8507246376818.89040484.161800
D403.59213250517635.15993811.478700


Multiple Linear Regression - Regression Statistics
Multiple R0.762271606752324
R-squared0.58105800246077
Adjusted R-squared0.576648086697199
F-TEST (value)131.761701042169
F-TEST (DF numerator)1
F-TEST (DF denominator)95
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation156.915479798427
Sum Squared Residuals2339134.44103520


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
115931589.850724637683.14927536232137
21477.91589.85072463768-111.950724637681
31733.71589.85072463768143.849275362319
41569.71589.85072463768-20.1507246376811
51843.71589.85072463768253.849275362319
61950.31589.85072463768360.449275362319
71657.51589.8507246376867.6492753623188
81772.11589.85072463768182.249275362319
91568.31589.85072463768-21.5507246376812
101809.81589.85072463768219.949275362319
111646.71589.8507246376856.8492753623188
121808.51589.85072463768218.649275362319
131763.91589.85072463768174.049275362319
141625.51589.8507246376835.6492753623188
151538.81589.85072463768-51.0507246376812
161342.41589.85072463768-247.450724637681
171645.11589.8507246376855.2492753623187
181619.91589.8507246376830.0492753623189
191338.11589.85072463768-251.750724637681
201505.51589.85072463768-84.3507246376812
211529.11589.85072463768-60.7507246376813
221511.91589.85072463768-77.9507246376811
231656.71589.8507246376866.8492753623188
241694.41589.85072463768104.549275362319
251662.31589.8507246376872.4492753623188
261588.71589.85072463768-1.15072463768115
271483.31589.85072463768-106.550724637681
281585.61589.85072463768-4.25072463768129
291658.91589.8507246376869.0492753623189
301584.41589.85072463768-5.4507246376811
311470.61589.85072463768-119.250724637681
321618.71589.8507246376828.8492753623188
331407.61589.85072463768-182.250724637681
341473.91589.85072463768-115.950724637681
351515.31589.85072463768-74.5507246376812
361485.41589.85072463768-104.450724637681
371496.11589.85072463768-93.7507246376813
381493.51589.85072463768-96.3507246376812
391298.41589.85072463768-291.450724637681
401375.31589.85072463768-214.550724637681
411507.91589.85072463768-81.9507246376811
421455.31589.85072463768-134.550724637681
431363.31589.85072463768-226.550724637681
441392.81589.85072463768-197.050724637681
451348.81589.85072463768-241.050724637681
461880.31589.85072463768290.449275362319
471669.21589.8507246376879.3492753623188
481543.61589.85072463768-46.2507246376813
491701.21589.85072463768111.349275362319
501516.51589.85072463768-73.3507246376812
511466.81589.85072463768-123.050724637681
521484.11589.85072463768-105.750724637681
531577.21589.85072463768-12.6507246376811
541684.51589.8507246376894.6492753623188
551414.71589.85072463768-175.150724637681
561674.51589.8507246376884.6492753623188
571598.71589.850724637688.84927536231885
581739.11589.85072463768149.249275362319
591674.61589.8507246376884.7492753623187
601671.81589.8507246376881.9492753623188
6118021589.85072463768212.149275362319
621526.81589.85072463768-63.0507246376812
631580.91589.85072463768-8.9507246376811
641634.81589.8507246376844.9492753623188
651610.31589.8507246376820.4492753623188
6617121589.85072463768122.149275362319
671678.81589.8507246376888.9492753623188
681708.11589.85072463768118.249275362319
691680.61589.8507246376890.7492753623187
7020561993.4428571428662.5571428571428
7116241993.44285714286-369.442857142857
722021.41993.4428571428627.9571428571429
731861.11993.44285714286-132.342857142857
741750.81993.44285714286-242.642857142857
751767.51993.44285714286-225.942857142857
761710.31993.44285714286-283.142857142857
772151.51993.44285714286158.057142857143
782047.91993.4428571428654.4571428571429
791915.41993.44285714286-78.0428571428571
801984.71993.44285714286-8.7428571428571
811896.51993.44285714286-96.9428571428572
822170.81993.44285714286177.357142857143
832139.91993.44285714286146.457142857143
842330.51993.44285714286337.057142857143
852121.81993.44285714286128.357142857143
862226.81993.44285714286233.357142857143
871857.91993.44285714286-135.542857142857
882155.91993.44285714286162.457142857143
892341.71993.44285714286348.257142857143
902290.21993.44285714286296.757142857143
912006.51993.4428571428613.0571428571429
922111.91993.44285714286118.457142857143
931731.31993.44285714286-262.142857142857
941762.21993.44285714286-231.242857142857
951863.21993.44285714286-130.242857142857
961943.51993.44285714286-49.9428571428572
971975.21993.44285714286-18.2428571428571


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
50.6547801712679090.6904396574641820.345219828732091
60.845806917693690.3083861646126190.154193082306309
70.7561819038866810.4876361922266380.243818096113319
80.6810687007313670.6378625985372660.318931299268633
90.629655144713980.740689710572040.37034485528602
100.5957249957197850.808550008560430.404275004280215
110.5029324154415260.9941351691169490.497067584558474
120.4730129687510640.9460259375021280.526987031248936
130.4076778171974570.8153556343949130.592322182802543
140.3433733862831240.6867467725662480.656626613716876
150.3447864550552220.6895729101104440.655213544944778
160.6315162190656890.7369675618686220.368483780934311
170.5569924667292550.886015066541490.443007533270745
180.484710623051770.969421246103540.51528937694823
190.6855631674199020.6288736651601960.314436832580098
200.6595995202462940.6808009595074120.340400479753706
210.6162869318681670.7674261362636670.383713068131833
220.5792314592618550.841537081476290.420768540738145
230.5145587571146910.9708824857706180.485441242885309
240.462892026138230.925784052276460.53710797386177
250.40202012493120.80404024986240.5979798750688
260.3413867905214690.6827735810429370.658613209478531
270.326353089114850.65270617822970.67364691088515
280.2712160827254840.5424321654509680.728783917274516
290.2249784508091980.4499569016183950.775021549190802
300.1811240498794380.3622480997588760.818875950120562
310.1747536934105880.3495073868211760.825246306589412
320.1371487157553630.2742974315107270.862851284244637
330.1628090756062290.3256181512124580.837190924393771
340.1511505269700410.3023010539400820.848849473029959
350.1267839840351220.2535679680702430.873216015964878
360.1121629969142160.2243259938284310.887837003085784
370.09581401666218070.1916280333243610.90418598333782
380.08155402432363420.1631080486472680.918445975676366
390.1592931496771170.3185862993542340.840706850322883
400.19372129257390.38744258514780.8062787074261
410.1647447981202730.3294895962405450.835255201879727
420.1549254538336720.3098509076673440.845074546166328
430.1972858037698340.3945716075396680.802714196230166
440.2237656194533350.447531238906670.776234380546665
450.2945516069925050.5891032139850090.705448393007495
460.4216617998081550.843323599616310.578338200191845
470.3779186634407290.7558373268814580.622081336559271
480.3305180460322440.6610360920644890.669481953967756
490.3014954232365400.6029908464730810.69850457676346
500.2661051065601240.5322102131202490.733894893439876
510.2546264227833740.5092528455667480.745373577216626
520.2377877684160670.4755755368321330.762212231583933
530.1984319044785640.3968638089571280.801568095521436
540.1701159951964660.3402319903929330.829884004803534
550.1964599261418220.3929198522836430.803540073858178
560.1655702974420670.3311405948841340.834429702557933
570.1344939328707990.2689878657415980.865506067129201
580.1230526157485210.2461052314970430.876947384251479
590.09988431548266760.1997686309653350.900115684517332
600.07960226226799820.1592045245359960.920397737732002
610.08793020295903780.1758604059180760.912069797040962
620.0735834420560710.1471668841121420.926416557943929
630.05704794660791430.1140958932158290.942952053392086
640.04263210091203570.08526420182407130.957367899087964
650.03183028477856830.06366056955713660.968169715221432
660.02470838420050390.04941676840100790.975291615799496
670.01797090815439010.03594181630878020.98202909184561
680.013362864499710.026725728999420.98663713550029
690.009342481067776190.01868496213555240.990657518932224
700.006253316010822720.01250663202164540.993746683989177
710.02494987367242590.04989974734485180.975050126327574
720.01909515110771190.03819030221542370.980904848892288
730.01547966952168880.03095933904337760.984520330478311
740.02144972339334550.0428994467866910.978550276606655
750.02840022541621480.05680045083242950.971599774583785
760.05986452277930620.1197290455586120.940135477220694
770.06696122641221430.1339224528244290.933038773587786
780.05201943434198420.1040388686839680.947980565658016
790.04220458377691880.08440916755383750.957795416223081
800.03031264411983410.06062528823966820.969687355880166
810.02631985575432120.05263971150864230.973680144245679
820.02521432376905880.05042864753811760.974785676230941
830.02029456578685590.04058913157371170.979705434213144
840.05440440450070420.1088088090014080.945595595499296
850.04099513826852640.08199027653705280.959004861731474
860.05159172833173120.1031834566634620.948408271668269
870.04354396611459910.08708793222919820.9564560338854
880.03598811901266330.07197623802532660.964011880987337
890.1475622623796340.2951245247592670.852437737620366
900.4823873903626810.9647747807253620.517612609637319
910.3918198348757920.7836396697515840.608180165124208
920.5926816628538070.8146366742923860.407318337146193


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


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


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


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


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t122719252692vthtv4xgxay8b/403q71227192425.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t122719252692vthtv4xgxay8b/403q71227192425.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t122719252692vthtv4xgxay8b/57uso1227192425.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/20/t122719252692vthtv4xgxay8b/57uso1227192425.ps (open in new window)


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


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


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


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