Home » date » 2008 » Dec » 22 »

Multiple Linear 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: Mon, 22 Dec 2008 10:58:14 -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/Dec/22/t1229969230fusp510in7ezgcv.htm/, Retrieved Mon, 22 Dec 2008 19:07:20 +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/2008/Dec/22/t1229969230fusp510in7ezgcv.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},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
101.02 0 100.67 0 100.47 0 100.38 0 100.33 0 100.34 0 100.37 0 100.39 0 100.21 0 100.21 0 100.22 0 100.28 0 100.25 0 100.25 0 100.21 0 100.16 0 100.18 0 100.1 1 99.96 1 99.88 1 99.88 1 99.86 1 99.84 1 99.8 1 99.82 1 99.81 1 99.92 1 100.03 1 99.99 1 100.02 1 100.01 1 100.13 1 100.33 1 100.13 1 99.96 1 100.05 1 99.83 1 99.8 1 100.01 1 100.1 1 100.13 1 100.16 1 100.41 1 101.34 1 101.65 1 101.85 1 102.07 1 102.12 1 102.14 1 102.21 1 102.28 1 102.19 1 102.33 1 102.54 1 102.44 1 102.78 1 102.9 1 103.08 1 102.77 1 102.65 1 102.71 1 103.29 1 102.86 1 103.45 1 103.72 1 103.65 1 103.83 1 104.45 1 105.14 1 105.07 1 105.31 1 105.19 1 105.3 1 105.02 1 105.17 1 105.28 1 105.45 1 105.38 1 105.8 1 105.96 1 105.08 1 105.11 1 105.61 1 105.5 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 time7 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Suiker[t] = + 99.4132576769026 -2.44007113962896dummie[t] + 0.104017120867038t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)99.41325767690260.148892667.688500
dummie-2.440071139628960.226128-10.790700
t0.1040171208670380.00374727.760400


Multiple Linear Regression - Regression Statistics
Multiple R0.958334489981909
R-squared0.918404994688885
Adjusted R-squared0.916390303199722
F-TEST (value)455.853910948063
F-TEST (DF numerator)2
F-TEST (DF denominator)81
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.597942876975073
Sum Squared Residuals28.9603904141434


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1101.0299.51727479776951.50272520223053
2100.6799.62129191863661.04870808136339
3100.4799.72530903950370.744690960496348
4100.3899.82932616037070.550673839629299
5100.3399.93334328123770.396656718762264
6100.34100.0373604021050.302639597895230
7100.37100.1413775229720.228622477028193
8100.39100.2453946438390.144605356161151
9100.21100.349411764706-0.139411764705895
10100.21100.453428885573-0.243428885572933
11100.22100.55744600644-0.337446006439966
12100.28100.661463127307-0.381463127307002
13100.25100.765480248174-0.515480248174042
14100.25100.869497369041-0.61949736904108
15100.21100.973514489908-0.763514489908125
16100.16101.077531610775-0.91753161077516
17100.18101.181548731642-1.00154873164219
18100.198.84549471288031.25450528711972
1999.9698.94951183374731.01048816625269
2099.8899.05352895461440.82647104538565
2199.8899.15754607548140.722453924518611
2299.8699.26156319634840.598436803651576
2399.8499.36558031721550.474419682784542
2499.899.46959743808250.330402561917497
2599.8299.57361455894950.246385441050455
2699.8199.67763167981660.132368320183426
2799.9299.78164880068360.138351199316387
28100.0399.88566592155070.144334078449348
2999.9999.98968304241770.000316957582303101
30100.02100.093700163285-0.0737001632847341
31100.01100.197717284152-0.187717284151763
32100.13100.301734405019-0.171734405018812
33100.33100.405751525886-0.075751525885847
34100.13100.509768646753-0.379768646752888
3599.96100.61378576762-0.653785767619928
36100.05100.717802888487-0.667802888486963
3799.83100.821820009354-0.991820009354
3899.8100.925837130221-1.12583713022104
39100.01101.029854251088-1.01985425108807
40100.1101.133871371955-1.03387137195512
41100.13101.237888492822-1.10788849282216
42100.16101.341905613689-1.18190561368919
43100.41101.445922734556-1.03592273455623
44101.34101.549939855423-0.209939855423264
45101.65101.653956976290-0.00395697629030009
46101.85101.7579740971570.0920259028426502
47102.07101.8619912180240.208008781975611
48102.12101.9660083388910.153991661108584
49102.14102.0700254597580.0699745402415413
50102.21102.1740425806250.0359574193744960
51102.28102.2780597014930.00194029850746505
52102.19102.382076822360-0.192076822359577
53102.33102.486093943227-0.156093943226615
54102.54102.590111064094-0.050111064093645
55102.44102.694128184961-0.254128184960692
56102.78102.798145305828-0.0181453058277269
57102.9102.902162426695-0.00216242669476072
58103.08103.0061795475620.0738204524381934
59102.77103.110196668429-0.340196668428847
60102.65103.214213789296-0.564213789295876
61102.71103.318230910163-0.608230910162926
62103.29103.42224803103-0.132248031029952
63102.86103.526265151897-0.666265151896997
64103.45103.630282272764-0.180282272764033
65103.72103.734299393631-0.0142993936310746
66103.65103.838316514498-0.188316514498106
67103.83103.942333635365-0.112333635365152
68104.45104.0463507562320.403649243767814
69105.14104.1503678770990.989632122900773
70105.07104.2543849979660.815615002033727
71105.31104.3584021188330.951597881166698
72105.19104.4624192397000.727580760299655
73105.3104.5664363605670.733563639432616
74105.02104.6704534814340.349546518565576
75105.17104.7744706023010.395529397698544
76105.28104.8784877231680.401512276831505
77105.45104.9825048440360.467495155964468
78105.38105.0865219649030.293478035097423
79105.8105.1905390857700.609460914230386
80105.96105.2945562066370.665443793363344
81105.08105.398573327504-0.318573327503690
82105.11105.502590448371-0.392590448370727
83105.61105.6066075692380.00339243076223475
84105.5105.710624690105-0.210624690104803


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
60.02876378509528820.05752757019057640.971236214904712
70.01667953196291440.03335906392582870.983320468037086
80.009490063216595280.01898012643319060.990509936783405
90.002813173356316350.005626346712632690.997186826643684
100.0008732972553536140.001746594510707230.999126702744646
110.0003054684989011600.0006109369978023190.999694531501099
120.0001584050363292510.0003168100726585010.99984159496367
136.50095542355928e-050.0001300191084711860.999934990445764
142.64655722464999e-055.29311444929998e-050.999973534427753
158.80187542900342e-061.76037508580068e-050.999991198124571
162.47318068398553e-064.94636136797106e-060.999997526819316
177.74513637983662e-071.54902727596732e-060.999999225486362
183.52265030854663e-077.04530061709326e-070.99999964773497
191.73666481155338e-073.47332962310675e-070.999999826333519
208.54368005517826e-081.70873601103565e-070.9999999145632
213.71205994572043e-087.42411989144086e-080.9999999628794
221.56305650478694e-083.12611300957388e-080.999999984369435
236.37572388801722e-091.27514477760344e-080.999999993624276
242.41752392539292e-094.83504785078584e-090.999999997582476
259.674021671726e-101.9348043343452e-090.999999999032598
263.83843495423785e-107.67686990847571e-100.999999999616156
274.57980842292158e-109.15961684584315e-100.99999999954202
282.33124801924041e-094.66249603848083e-090.999999997668752
294.09817397264892e-098.19634794529783e-090.999999995901826
307.75305006024299e-091.55061001204860e-080.99999999224695
319.61847391001265e-091.92369478200253e-080.999999990381526
323.19208078652028e-086.38416157304057e-080.999999968079192
335.65384121859292e-071.13076824371858e-060.999999434615878
345.22441373224131e-071.04488274644826e-060.999999477558627
352.12444803416276e-074.24889606832553e-070.999999787555197
361.03900684513796e-072.07801369027592e-070.999999896099315
374.9236337479875e-089.847267495975e-080.999999950763663
383.08506150731304e-086.17012301462607e-080.999999969149385
392.08173434928627e-084.16346869857254e-080.999999979182656
402.29461019837440e-084.58922039674879e-080.999999977053898
413.91790071806859e-087.83580143613717e-080.999999960820993
421.29199100701209e-072.58398201402418e-070.9999998708009
431.71722933850841e-063.43445867701683e-060.999998282770661
440.004368520767289150.008737041534578310.99563147923271
450.1068425549397290.2136851098794590.893157445060271
460.3675583580937250.735116716187450.632441641906275
470.6399730461741590.7200539076516820.360026953825841
480.7760407309849450.447918538030110.223959269015055
490.8318128296372850.3363743407254290.168187170362715
500.8578206115027190.2843587769945620.142179388497281
510.867111718638210.2657765627235780.132888281361789
520.8515677896518520.2968644206962950.148432210348148
530.8339865671101610.3320268657796770.166013432889839
540.8204841190097880.3590317619804230.179515880990212
550.7888439954501440.4223120090997120.211156004549856
560.7676711523515590.4646576952968820.232328847648441
570.7420415707977950.5159168584044110.257958429202205
580.7200621534264430.5598756931471130.279937846573557
590.6722200657007810.6555598685984380.327779934299219
600.6601165515712860.6797668968574280.339883448428714
610.6888461929898670.6223076140202670.311153807010133
620.658637539338490.682724921323020.34136246066151
630.7892703521641210.4214592956717580.210729647835879
640.8235060370400250.352987925919950.176493962959975
650.8494254665370570.3011490669258850.150574533462943
660.9366123681038220.1267752637923550.0633876318961777
670.9931289314815320.01374213703693550.00687106851846774
680.99793233656990.004135326860198160.00206766343009908
690.9972292211303780.005541557739244470.00277077886962223
700.9955683215395220.008863356920955560.00443167846047778
710.9929338472844980.01413230543100420.00706615271550211
720.9863408190853020.02731836182939610.0136591809146981
730.9742153738628540.05156925227429280.0257846261371464
740.9591691051205630.08166178975887340.0408308948794367
750.9316230359847380.1367539280305240.0683769640152621
760.8851638294493650.229672341101270.114836170550635
770.794012614926150.4119747701476990.205987385073849
780.6870590031468040.6258819937063920.312940996853196


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level390.534246575342466NOK
5% type I error level440.602739726027397NOK
10% type I error level470.643835616438356NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229969230fusp510in7ezgcv/10vv021229968685.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229969230fusp510in7ezgcv/10vv021229968685.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229969230fusp510in7ezgcv/1s7zc1229968685.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229969230fusp510in7ezgcv/1s7zc1229968685.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229969230fusp510in7ezgcv/2v42k1229968685.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229969230fusp510in7ezgcv/2v42k1229968685.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229969230fusp510in7ezgcv/3vz731229968685.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229969230fusp510in7ezgcv/3vz731229968685.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229969230fusp510in7ezgcv/4kac51229968685.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229969230fusp510in7ezgcv/4kac51229968685.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229969230fusp510in7ezgcv/5wkgz1229968685.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229969230fusp510in7ezgcv/5wkgz1229968685.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229969230fusp510in7ezgcv/61myn1229968685.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229969230fusp510in7ezgcv/61myn1229968685.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229969230fusp510in7ezgcv/7rgjd1229968685.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229969230fusp510in7ezgcv/7rgjd1229968685.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229969230fusp510in7ezgcv/8kc4w1229968685.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229969230fusp510in7ezgcv/8kc4w1229968685.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229969230fusp510in7ezgcv/91x2y1229968685.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229969230fusp510in7ezgcv/91x2y1229968685.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