Home » date » 2010 » Dec » 21 »

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Tue, 21 Dec 2010 15:18:04 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944815dmaq6a9j507q3kg.htm/, Retrieved Tue, 21 Dec 2010 16:20:18 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944815dmaq6a9j507q3kg.htm/},
    year = {2010},
}
@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 = {2010},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
4,031636 0,5215052 9,166456 1,303763 3,702076 0,4248284 7,970589 1,416094 3,056176 0,4250311 7,104091 1,052458 3,280707 0,4771938 6,621064 1,312283 2,984728 0,8280212 7,529215 1,309429 3,693712 0,6156186 8,170938 1,492409 3,226317 0,366627 8,15745 1,026556 2,190349 0,4308883 7,378962 1,005406 2,599515 0,2810287 7,921496 1,334886 3,080288 0,4646245 8,15674 1,393873 2,929672 0,2693951 8,856365 1,128092 2,922548 0,5779049 8,817177 1,122787 3,234943 0,5661151 8,734347 1,213104 2,983081 0,5077584 9,345927 1,253528 3,284389 0,7507175 8,99297 1,094796 3,806511 0,6808395 10,78512 0,9129438 3,784579 0,7661091 8,886867 1,19513 2,645654 0,4561473 8,818847 0,9274994 3,092081 0,4977496 8,823744 0,9653326 3,204859 0,4193273 9,165298 1,198078 3,107225 0,6095514 8,652657 0,966362 3,466909 0,457337 8,173054 0,9736851 2,984404 0,5705478 7,563416 0,9948013 3,218072 0,3478996 7,595809 0,8262616 2,82731 0,3874993 8,381467 0,6888877 3,182049 0,5824285 7,216432 0,7813066 2,236319 0,2391033 6,540178 0,60479 etc...
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time6 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
firearmsuicide[t] = + 1.71199639506215 + 3.03670572133133firearmhomicide[t] -0.0130633968862607nonfirearmsuicide[t] + 0.158490113952911nonfirearmhomicide[t] -0.00960612631308565t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)1.711996395062150.3184435.37621e-060
firearmhomicide3.036705721331330.30058810.102600
nonfirearmsuicide-0.01306339688626070.032495-0.4020.6886860.344343
nonfirearmhomicide0.1584901139529110.2058710.76990.4435210.221761
t-0.009606126313085650.002101-4.57181.6e-058e-06


Multiple Linear Regression - Regression Statistics
Multiple R0.793536557853685
R-squared0.629700268650275
Adjusted R-squared0.6122743989397
F-TEST (value)36.1359449547662
F-TEST (DF numerator)4
F-TEST (DF denominator)85
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.423902038319824
Sum Squared Residuals15.2738997377946


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
14.0316363.372936586962250.65869941303775
23.7020763.103176907203790.598899092796214
33.0561763.047873017338180.00830298266181571
43.2807073.244159327820780.036547672179217
52.9847284.28759690655662-1.30286890655662
63.6937123.653604028408940.040107971591058
73.2263172.814226789854310.412090210145688
82.1903493.0065809527165-0.816231952716502
92.5995152.587027307465910.012487692534093
103.0802883.14122336803985-0.060935368039852
112.9296722.487499865751620.442172134248385
122.9225483.41441835252797-0.491870352527972
133.2349433.38440646588751-0.149463465887508
142.9830813.19600570690514-0.21292470690514
153.2843893.90364823421837-0.619259234218375
163.8065113.62960984287980.176901157120201
173.7845793.94846375406582-0.163884754065821
182.6456542.9560666242635-0.310412624263496
193.0920813.07872665710560.0133543428943958
203.2048592.863401073210480.341457926789517
213.1072253.40142169730096-0.294196697300956
223.4669092.937011114929190.529897885070814
232.9844043.2825035247878-0.298099524787795
243.2180722.569645296816660.648426703183338
252.827312.648256038720560.179053961279442
263.1820493.2604593258858-0.0784103258857988
272.2363192.189133749747910.0471852502520882
282.0332182.25260512759844-0.219387127598441
291.6448042.28189840307892-0.637094403078917
301.6279712.79903725047044-1.17106625047044
311.6775592.55235569162686-0.874796691626857
322.3308282.57757987037303-0.246751870373027
332.4936152.6664867297555-0.172871729755496
342.2571722.59101512718635-0.333843127186351
352.6555172.118601862730480.536915137269525
362.2986551.897021020747040.401633979252958
372.6004022.74471767206868-0.144315672068676
383.045232.947158239103890.0980717608961076
392.7905832.515905490900730.274677509099269
403.2270522.684489576744780.54256242325522
412.9674792.633681436691930.333797563308075
422.9388172.362235040598370.576581959401631
433.2779612.884832367289180.393128632710816
443.4239852.994532336245010.42945266375499
453.0726462.983973145392650.0886728546073463
462.7542532.82877543266636-0.0745224326663612
472.9104312.885229864304160.0252011356958406
483.1743693.071940034610060.102428965389942
493.0683872.894089676194160.174297323805842
503.0895432.970576884109010.118966115890993
512.9066542.733122301798280.173531698201724
522.9311612.841640651054120.0895203489458812
533.025662.874468605170320.151191394829684
542.9395513.30565040098829-0.366099400988293
552.6910192.523968795369940.167050204630056
563.198122.928465362437660.269654637562337
573.076393.025462938928440.0509270610715593
582.8638732.656577930035190.207295069964811
593.0138023.03875547125176-0.024953471251759
603.0533643.025737284515610.0276267154843931
612.8647533.09840593296446-0.233652932964459
623.0570623.0793341660037-0.022272166003703
632.9593653.3308664358065-0.371501435806499
643.2522582.658085529006810.594172470993186
653.6029883.291661062542320.311326937457679
663.4977043.299612480174860.198091519825142
673.2968673.002607120049010.294259879950987
683.6024173.262827420015440.339589579984557
693.30012.966803981857420.333296018142576
703.401933.55072480013786-0.148794800137863
713.5025912.973204415583940.529386584416058
723.4023482.944324562003230.458023437996767
733.4985512.928199668173010.570351331826995
743.1998233.26931375219066-0.0694907521906572
752.7000642.590328375540320.109735624459678
762.8010342.605554929292090.195479070707907
772.8986282.577169299425440.321458700574556
782.8008542.86485436154323-0.0640003615432274
792.3999422.040093628346540.359848371653462
802.4027241.867588701967810.535135298032187
812.2023312.007720309080780.194610690919225
822.1025942.60810458211481-0.505510582114813
831.7982932.18663182972079-0.388338829720795
841.2024841.80600896335049-0.603524963350491
851.4002011.97278033561879-0.572579335618785
861.2008321.90398233924564-0.703150339245641
871.2980831.72301343927642-0.424930439276422
881.0997421.59893053950116-0.499188539501157
891.0013771.50185587568484-0.500478875684836
900.83617431.38803492437419-0.551860624374186


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.4008221090367090.8016442180734180.599177890963291
90.4323258171476360.8646516342952710.567674182852364
100.3289218313095690.6578436626191370.671078168690431
110.242288703157430.484577406314860.75771129684257
120.1868200105774950.3736400211549890.813179989422505
130.2106649171336970.4213298342673950.789335082866303
140.142164322896320.284328645792640.85783567710368
150.1880119413893340.3760238827786680.811988058610666
160.1626088998361930.3252177996723850.837391100163807
170.3516759750954690.7033519501909370.648324024904531
180.2857826929388430.5715653858776860.714217307061157
190.2902301595566580.5804603191133160.709769840443342
200.2532827069278290.5065654138556590.74671729307217
210.2490959244209170.4981918488418350.750904075579083
220.4683960821834040.9367921643668080.531603917816596
230.4449566032316450.889913206463290.555043396768355
240.5511962315024340.8976075369951310.448803768497566
250.4797600804693890.9595201609387780.520239919530611
260.4542927013854940.9085854027709890.545707298614506
270.3978003277314110.7956006554628210.602199672268589
280.3902098881835890.7804197763671780.609790111816411
290.4250298382900030.8500596765800070.574970161709997
300.7684128792045330.4631742415909350.231587120795467
310.8871562233470810.2256875533058370.112843776652919
320.890504268579830.218991462840340.10949573142017
330.8910569617521040.2178860764957910.108943038247896
340.9139670103075530.1720659793848940.0860329896924468
350.9303548956700620.1392902086598750.0696451043299376
360.9114038187201710.1771923625596580.0885961812798291
370.9332406192217050.1335187615565910.0667593807782954
380.9451855383004040.1096289233991910.0548144616995955
390.9303745009964160.1392509980071670.0696254990035836
400.9463466383907520.1073067232184960.053653361609248
410.9394132680688580.1211734638622840.060586731931142
420.921602069076340.156795861847320.0783979309236601
430.9030654915794440.1938690168411120.0969345084205562
440.8776430960325090.2447138079349820.122356903967491
450.853571221380990.2928575572380210.146428778619011
460.869608504699090.2607829906018210.13039149530091
470.853011858110480.293976283779040.14698814188952
480.853208871444420.293582257111160.14679112855558
490.8955910837488150.2088178325023710.104408916251185
500.8814776938656490.2370446122687020.118522306134351
510.8747471900901730.2505056198196540.125252809909827
520.8498675110949380.3002649778101230.150132488905062
530.8521017588581030.2957964822837950.147898241141897
540.8390785824336050.3218428351327890.160921417566395
550.8100122158365660.3799755683268680.189987784163434
560.7965607277358690.4068785445282620.203439272264131
570.7486604730591760.5026790538816470.251339526940824
580.6952936439398210.6094127121203570.304706356060179
590.6878360262908890.6243279474182230.312163973709111
600.6494871910240070.7010256179519850.350512808975993
610.6409956648568470.7180086702863070.359004335143153
620.8061220798330120.3877558403339770.193877920166988
630.9703327305533340.05933453889333190.029667269446666
640.9788757519779320.04224849604413660.0211242480220683
650.976472000429160.04705599914168060.0235279995708403
660.9805041673941980.03899166521160490.0194958326058025
670.9928050042071450.01438999158571040.0071949957928552
680.9900497181062690.0199005637874630.00995028189373152
690.996088992193620.007822015612759270.00391100780637963
700.998729237900380.002541524199238650.00127076209961932
710.998828619307890.002342761384220120.00117138069211006
720.9985836185584820.002832762883035820.00141638144151791
730.997858995216160.004282009567678930.00214100478383947
740.9970335257766220.005932948446755950.00296647422337797
750.9987499657410360.002500068517927690.00125003425896384
760.9995927299345340.0008145401309320140.000407270065466007
770.9988425951396180.002314809720764460.00115740486038223
780.9966601641601050.006679671679789240.00333983583989462
790.9903042051108880.01939158977822460.0096957948891123
800.9730961102801350.05380777943972980.0269038897198649
810.9833081167224170.0333837665551650.0166918832775825
820.9854139932762580.02917201344748340.0145860067237417


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level100.133333333333333NOK
5% type I error level180.24NOK
10% type I error level200.266666666666667NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944815dmaq6a9j507q3kg/10nab51292944675.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944815dmaq6a9j507q3kg/10nab51292944675.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944815dmaq6a9j507q3kg/1g9wb1292944675.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944815dmaq6a9j507q3kg/1g9wb1292944675.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944815dmaq6a9j507q3kg/2g9wb1292944675.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944815dmaq6a9j507q3kg/2g9wb1292944675.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944815dmaq6a9j507q3kg/39jvw1292944675.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944815dmaq6a9j507q3kg/39jvw1292944675.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944815dmaq6a9j507q3kg/49jvw1292944675.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944815dmaq6a9j507q3kg/49jvw1292944675.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944815dmaq6a9j507q3kg/59jvw1292944675.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944815dmaq6a9j507q3kg/59jvw1292944675.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944815dmaq6a9j507q3kg/61acz1292944675.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944815dmaq6a9j507q3kg/61acz1292944675.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944815dmaq6a9j507q3kg/71acz1292944675.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944815dmaq6a9j507q3kg/71acz1292944675.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944815dmaq6a9j507q3kg/8u1uk1292944675.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944815dmaq6a9j507q3kg/8u1uk1292944675.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944815dmaq6a9j507q3kg/9u1uk1292944675.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944815dmaq6a9j507q3kg/9u1uk1292944675.ps (open in new window)


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