Home » date » 2008 » Nov » 26 »

multiple regression

*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:48:10 -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/t1227732605rjwlvsgra16s2w1.htm/, Retrieved Wed, 26 Nov 2008 20:50:05 +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/t1227732605rjwlvsgra16s2w1.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:
hout
 
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 time6 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
y[t] = + 108.8 + 8.54130434782609x[t] + e[t]


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


Multiple Linear Regression - Regression Statistics
Multiple R0.301503020875576
R-squared0.0909040715970979
Adjusted R-squared0.0808030057259546
F-TEST (value)8.99945339994187
F-TEST (DF numerator)1
F-TEST (DF denominator)90
p-value0.00349286262717896
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation13.6546335325490
Sum Squared Residuals16780.4115217391


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
198.5108.8-10.3000000000001
296.7108.8-12.1
3113.1108.84.3
4100108.8-8.8
5104.7108.8-4.1
6108.5108.8-0.299999999999998
790.5108.8-18.3
888.6108.8-20.2
9105.4108.8-3.39999999999999
10119.9108.811.1
11107.2108.8-1.60000000000000
1284.1108.8-24.7
13101.4108.8-7.4
14105.1108.8-3.70000000000000
15118.7108.89.9
16113.8108.85
17113.8108.85
18118.9108.810.1
1998.5108.8-10.3
2091108.8-17.8
21120.7108.811.9
22127.9108.819.1
23112.4108.83.60000000000001
2493.1108.8-15.7
25107.5108.8-1.30000000000000
26107.3108.8-1.5
27114.8108.86
28120.8108.812
29112.2108.83.40000000000000
30123.3108.814.5
31100.6108.8-8.2
3286.7108.8-22.1
33123.6108.814.8
34125.3108.816.5
35111.1108.82.30000000000000
3698.4108.8-10.4
37102.3108.8-6.5
38105108.8-3.8
39128.2108.819.4
40124.7108.815.9
41116.1108.87.3
42131.2108.822.4
4397.7108.8-11.1
4488.8108.8-20
45132.8108.824
46113.9108.85.10000000000001
47112.6117.341304347826-4.74130434782609
48104.3117.341304347826-13.0413043478261
49107.5117.341304347826-9.84130434782609
50106117.341304347826-11.3413043478261
51117.3117.341304347826-0.0413043478260883
52123.1117.3413043478265.75869565217391
53114.3117.341304347826-3.04130434782609
54132117.34130434782614.6586956521739
5592.3117.341304347826-25.0413043478261
5693.7117.341304347826-23.6413043478261
57121.3117.3413043478263.95869565217391
58113.6117.341304347826-3.74130434782609
59116.3117.341304347826-1.04130434782609
6098.3117.341304347826-19.0413043478261
61111.9117.341304347826-5.44130434782608
62109.3117.341304347826-8.04130434782609
63133.2117.34130434782615.8586956521739
64118117.3413043478260.658695652173915
65131.6117.34130434782614.2586956521739
66134.1117.34130434782616.7586956521739
6796.7117.341304347826-20.6413043478261
6899.8117.341304347826-17.5413043478261
69128.3117.34130434782610.9586956521739
70134.9117.34130434782617.5586956521739
71130.7117.34130434782613.3586956521739
72107.3117.341304347826-10.0413043478261
73121.6117.3413043478264.25869565217391
74120.6117.3413043478263.25869565217391
75140.5117.34130434782623.1586956521739
76124.8117.3413043478267.45869565217391
77129.9117.34130434782612.5586956521739
78159.4117.34130434782642.0586956521739
79111117.341304347826-6.34130434782609
80110.1117.341304347826-7.24130434782609
81132.7117.34130434782615.3586956521739
82135117.34130434782617.6586956521739
83118.6117.3413043478261.25869565217391
8494117.341304347826-23.3413043478261
85117.9117.3413043478260.55869565217392
86114.7117.341304347826-2.64130434782608
87113.6117.341304347826-3.74130434782609
88130.6117.34130434782613.2586956521739
89117.1117.341304347826-0.241304347826091
90123.2117.3413043478265.85869565217392
91106.1117.341304347826-11.2413043478261
9287.9117.341304347826-29.4413043478261


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
50.1740469289434830.3480938578869670.825953071056517
60.09653175632655980.1930635126531200.90346824367344
70.1265435599257660.2530871198515320.873456440074234
80.1492550595551770.2985101191103530.850744940444823
90.09497679438148010.1899535887629600.90502320561852
100.1891674161712380.3783348323424750.810832583828762
110.1290926722967640.2581853445935280.870907327703236
120.2242075009698550.4484150019397110.775792499030145
130.1587961852100580.3175923704201150.841203814789942
140.1111442550155120.2222885100310230.888855744984488
150.1465315777594460.2930631555188920.853468422240554
160.1302414602713870.2604829205427740.869758539728613
170.1121149543235160.2242299086470330.887885045676484
180.1217418040006380.2434836080012750.878258195999362
190.09660197324244880.1932039464848980.903398026757551
200.1099284332475290.2198568664950570.890071566752471
210.1306988594880260.2613977189760510.869301140511974
220.2196025241675240.4392050483350480.780397475832476
230.1781273024817590.3562546049635190.82187269751824
240.1856942851613630.3713885703227250.814305714838637
250.1431371968634200.2862743937268410.85686280313658
260.1081114906972150.2162229813944300.891888509302785
270.08963894154271840.1792778830854370.910361058457282
280.09249156821384250.1849831364276850.907508431786157
290.07043815397038160.1408763079407630.929561846029618
300.08023817700741840.1604763540148370.919761822992582
310.06561441933598430.1312288386719690.934385580664016
320.1131910462498120.2263820924996250.886808953750188
330.1249835719538950.2499671439077910.875016428046105
340.1450076433191590.2900152866383180.854992356680841
350.1131051765501780.2262103531003550.886894823449822
360.1040589608241410.2081179216482830.895941039175859
370.08683319429598140.1736663885919630.913166805704019
380.06910843291830810.1382168658366160.930891567081692
390.09151562431632840.1830312486326570.908484375683672
400.09809316200868880.1961863240173780.901906837991311
410.07925634931482520.1585126986296500.920743650685175
420.1224622239189220.2449244478378440.877537776081078
430.1135678130944900.2271356261889810.88643218690551
440.1809336275037050.3618672550074090.819066372496295
450.2345268715506960.4690537431013910.765473128449304
460.193658873281750.38731774656350.80634112671825
470.1565111016470590.3130222032941180.843488898352941
480.1392371137204560.2784742274409120.860762886279544
490.1155500760929800.2311001521859610.88444992390702
500.09762230343482110.1952446068696420.902377696565179
510.07872141948323820.1574428389664760.921278580516762
520.06807257796791440.1361451559358290.931927422032086
530.05100613592613390.1020122718522680.948993864073866
540.05819115358882480.1163823071776500.941808846411175
550.09984435023469940.1996887004693990.9001556497653
560.1466385586809780.2932771173619550.853361441319022
570.122393076615630.244786153231260.87760692338437
580.09633701601664280.1926740320332860.903662983983357
590.07397824386768710.1479564877353740.926021756132313
600.09126590045952840.1825318009190570.908734099540472
610.07240537622876680.1448107524575340.927594623771233
620.05984280253743330.1196856050748670.940157197462567
630.06983828747785170.1396765749557030.930161712522148
640.05207699290166170.1041539858033230.947923007098338
650.05346753773278010.1069350754655600.94653246226722
660.06063286543341250.1212657308668250.939367134566587
670.08902351798582930.1780470359716590.91097648201417
680.1114641224240790.2229282448481570.888535877575921
690.09688281322516770.1937656264503350.903117186774832
700.1071703717373470.2143407434746950.892829628262653
710.09865746514673350.1973149302934670.901342534853266
720.08762043885337580.1752408777067520.912379561146624
730.06333780154153090.1266756030830620.93666219845847
740.04398122312624450.0879624462524890.956018776873755
750.06808849638923330.1361769927784670.931911503610767
760.04964827586215150.0992965517243030.950351724137849
770.04210177561819790.08420355123639580.957898224381802
780.4256874262533810.8513748525067630.574312573746619
790.3489555801107830.6979111602215660.651044419889217
800.2802274868843040.5604549737686090.719772513115696
810.3127950228244130.6255900456488250.687204977175587
820.4280330494578810.8560660989157630.571966950542119
830.3426892985063920.6853785970127830.657310701493608
840.4354200943685150.870840188737030.564579905631485
850.3226940882106080.6453881764212160.677305911789392
860.2103421358931940.4206842717863880.789657864106806
870.1175911535654250.2351823071308510.882408846434575


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level00OK
10% type I error level30.036144578313253OK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227732605rjwlvsgra16s2w1/10vi6q1227732479.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227732605rjwlvsgra16s2w1/10vi6q1227732479.ps (open in new window)


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


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


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


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


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227732605rjwlvsgra16s2w1/504ie1227732478.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227732605rjwlvsgra16s2w1/504ie1227732478.ps (open in new window)


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


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227732605rjwlvsgra16s2w1/71u9p1227732479.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227732605rjwlvsgra16s2w1/71u9p1227732479.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227732605rjwlvsgra16s2w1/8y3s71227732479.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/26/t1227732605rjwlvsgra16s2w1/8y3s71227732479.ps (open in new window)


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