Home » date » 2009 » Dec » 19 »

Paper: Multiple regression analysis

*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: Sat, 19 Dec 2009 08:30:06 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/19/t1261236675h1gbx7eh7qrcq1z.htm/, Retrieved Sat, 19 Dec 2009 16:31:28 +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/2009/Dec/19/t1261236675h1gbx7eh7qrcq1z.htm/},
    year = {2009},
}
@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 = {2009},
    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 «
128,7 0 136,9 0 156,9 0 109,1 0 122,3 0 123,9 0 90,9 0 77,9 0 120,3 0 118,9 0 125,5 0 98,9 0 102,9 0 105,9 0 117,6 0 113,6 0 115,9 0 118,9 0 77,6 0 81,2 0 123,1 0 136,6 0 112,1 0 95,1 0 96,3 0 105,7 0 115,8 0 105,7 0 105,7 0 111,1 0 82,4 0 60 0 107,3 0 99,3 0 113,5 0 108,9 0 100,2 0 103,9 0 138,7 0 120,2 0 100,2 0 143,2 0 70,9 0 85,2 0 133 0 136,6 0 117,9 0 106,3 0 122,3 0 125,5 0 148,4 0 126,3 0 99,6 0 140,4 0 80,3 0 92,6 0 138,5 0 110,9 0 119,6 0 105 0 109 0 129,4 0 148,6 0 101,4 0 134,8 0 143,7 0 81,6 0 90,3 0 141,5 0 140,7 0 140,2 0 100,2 0 125,7 0 119,6 0 134,7 0 109 0 116,3 0 146,9 0 97,4 0 89,4 0 132,1 1 139,8 1 129 1 112,5 1 121,9 1 121,7 1 123,1 1 131,6 1 119,3 1 132,5 1 98,3 1 85,1 1 131,7 1 129,3 1 90,7 1 78,6 1 68,9 1 79,1 1 83,5 1 74,1 1 59,7 1 93,3 1 61,3 1 56,6 1 98,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 time8 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Y[t] = + 113.60625 -11.51825X[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)113.606252.47900345.827400
X-11.518255.080444-2.26720.0254690.012734


Multiple Linear Regression - Regression Statistics
Multiple R0.218017562086058
R-squared0.0475316573779481
Adjusted R-squared0.0382843919155982
F-TEST (value)5.14007709321982
F-TEST (DF numerator)1
F-TEST (DF denominator)103
p-value0.0254685118302665
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation22.1728762131372
Sum Squared Residuals50638.553275


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1128.7113.60625000000015.0937500000002
2136.9113.6062523.2937500000000
3156.9113.6062543.29375
4109.1113.60625-4.50625000000001
5122.3113.606258.69375
6123.9113.6062510.29375
790.9113.60625-22.70625
877.9113.60625-35.70625
9120.3113.606256.69375
10118.9113.606255.29375000000001
11125.5113.6062511.89375
1298.9113.60625-14.70625
13102.9113.60625-10.70625
14105.9113.60625-7.70625
15117.6113.606253.99374999999999
16113.6113.60625-0.00625000000000564
17115.9113.606252.29375000000001
18118.9113.606255.29375000000001
1977.6113.60625-36.00625
2081.2113.60625-32.40625
21123.1113.606259.49375
22136.6113.6062522.99375
23112.1113.60625-1.50625000000001
2495.1113.60625-18.50625
2596.3113.60625-17.30625
26105.7113.60625-7.90625
27115.8113.606252.19375000000000
28105.7113.60625-7.90625
29105.7113.60625-7.90625
30111.1113.60625-2.50625000000001
3182.4113.60625-31.20625
3260113.60625-53.60625
33107.3113.60625-6.30625
3499.3113.60625-14.30625
35113.5113.60625-0.10625
36108.9113.60625-4.70624999999999
37100.2113.60625-13.40625
38103.9113.60625-9.70625
39138.7113.6062525.09375
40120.2113.606256.59375
41100.2113.60625-13.40625
42143.2113.6062529.59375
4370.9113.60625-42.70625
4485.2113.60625-28.40625
45133113.6062519.39375
46136.6113.6062522.99375
47117.9113.606254.29375000000001
48106.3113.60625-7.30625
49122.3113.606258.69375
50125.5113.6062511.89375
51148.4113.6062534.79375
52126.3113.6062512.69375
5399.6113.60625-14.00625
54140.4113.6062526.79375
5580.3113.60625-33.30625
5692.6113.60625-21.00625
57138.5113.6062524.89375
58110.9113.60625-2.70624999999999
59119.6113.606255.99375
60105113.60625-8.60625
61109113.60625-4.60625
62129.4113.6062515.79375
63148.6113.6062534.99375
64101.4113.60625-12.20625
65134.8113.6062521.19375
66143.7113.6062530.09375
6781.6113.60625-32.00625
6890.3113.60625-23.30625
69141.5113.6062527.89375
70140.7113.6062527.09375
71140.2113.6062526.59375
72100.2113.60625-13.40625
73125.7113.6062512.09375
74119.6113.606255.99375
75134.7113.6062521.09375
76109113.60625-4.60625
77116.3113.606252.69375000000000
78146.9113.6062533.29375
7997.4113.60625-16.20625
8089.4113.60625-24.20625
81132.1102.08830.012
82139.8102.08837.712
83129102.08826.912
84112.5102.08810.412
85121.9102.08819.812
86121.7102.08819.612
87123.1102.08821.012
88131.6102.08829.512
89119.3102.08817.212
90132.5102.08830.412
9198.3102.088-3.788
9285.1102.088-16.988
93131.7102.08829.612
94129.3102.08827.212
9590.7102.088-11.388
9678.6102.088-23.488
9768.9102.088-33.188
9879.1102.088-22.988
9983.5102.088-18.588
10074.1102.088-27.988
10159.7102.088-42.388
10293.3102.088-8.788
10361.3102.088-40.788
10456.6102.088-45.488
10598.5102.088-3.588


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
50.5380634480046710.9238731039906590.461936551995329
60.3815763347377990.7631526694755980.618423665262201
70.6092116908742910.7815766182514190.390788309125709
80.8250183086988390.3499633826023210.174981691301161
90.7433281454935180.5133437090129650.256671854506482
100.6495299212862360.7009401574275270.350470078713764
110.5598520185051860.8802959629896290.440147981494814
120.5301988351781180.9396023296437640.469801164821882
130.4703709988053430.9407419976106850.529629001194657
140.3975999032732970.7951998065465950.602400096726702
150.3150503280730170.6301006561460350.684949671926983
160.2423477502231720.4846955004463430.757652249776828
170.1807280745452950.3614561490905900.819271925454705
180.1321463903910850.2642927807821710.867853609608915
190.2452682281840570.4905364563681150.754731771815943
200.3221801044769870.6443602089539750.677819895523013
210.2717561983435960.5435123966871920.728243801656404
220.2809566253901150.561913250780230.719043374609885
230.2232341411766730.4464682823533470.776765858823327
240.2086356350395260.4172712700790510.791364364960474
250.1886789146730080.3773578293460160.811321085326992
260.1494002983708610.2988005967417230.850599701629138
270.1137395440237450.2274790880474900.886260455976255
280.08700023547840180.1740004709568040.912999764521598
290.06540502805740220.1308100561148040.934594971942598
300.04676144734985980.09352289469971970.95323855265014
310.06564943581567430.1312988716313490.934350564184326
320.2301470074817150.4602940149634310.769852992518285
330.1872884609456840.3745769218913680.812711539054316
340.1600071880590990.3200143761181990.8399928119409
350.1264372038911330.2528744077822650.873562796108867
360.09820148439212650.1964029687842530.901798515607873
370.08073460117873960.1614692023574790.91926539882126
380.0630517424124090.1261034848248180.936948257587591
390.07737726144685020.1547545228937000.92262273855315
400.06116470768792580.1223294153758520.938835292312074
410.04993787499280250.0998757499856050.950062125007197
420.0702772088420480.1405544176840960.929722791157952
430.141479157168590.282958314337180.85852084283141
440.1632290369834480.3264580739668950.836770963016553
450.1608450127944990.3216900255889970.839154987205502
460.1686532514701360.3373065029402720.831346748529864
470.1375290083469730.2750580166939460.862470991653027
480.1121918773129030.2243837546258060.887808122687097
490.09193449454538080.1838689890907620.908065505454619
500.07720688140535230.1544137628107050.922793118594648
510.1135322316713630.2270644633427250.886467768328637
520.09630948475314950.1926189695062990.90369051524685
530.08347470032914930.1669494006582990.91652529967085
540.09314069381109680.1862813876221940.906859306188903
550.1296806956803460.2593613913606920.870319304319654
560.1305800633289070.2611601266578140.869419936671093
570.1352090358457330.2704180716914660.864790964154267
580.1083876145773550.216775229154710.891612385422645
590.08573804469478520.1714760893895700.914261955305215
600.07015513505676640.1403102701135330.929844864943234
610.05489798729132630.1097959745826530.945102012708674
620.04616763408296630.09233526816593260.953832365917034
630.06502609537863020.1300521907572600.93497390462137
640.05505588148024810.1101117629604960.944944118519752
650.05090321816106870.1018064363221370.949096781838931
660.06018871253278980.1203774250655800.93981128746721
670.08467356357292790.1693471271458560.915326436427072
680.0940923025977710.1881846051955420.905907697402229
690.09822409033970940.1964481806794190.90177590966029
700.1018555525693040.2037111051386080.898144447430696
710.1065653566972430.2131307133944870.893434643302757
720.0914941262297230.1829882524594460.908505873770277
730.0732316404190310.1464632808380620.926768359580969
740.05505972300957840.1101194460191570.944940276990422
750.05183303823662690.1036660764732540.948166961763373
760.0377310745782610.0754621491565220.962268925421739
770.02686097833588120.05372195667176250.973139021664119
780.05153504647119420.1030700929423880.948464953528806
790.03956041416689580.07912082833379160.960439585833104
800.03157126732807290.06314253465614590.968428732671927
810.03267032196833900.06534064393667790.96732967803166
820.04596722062848620.09193444125697240.954032779371514
830.04951459377092920.09902918754185840.950485406229071
840.04095671746075280.08191343492150560.959043282539247
850.03885057258604610.07770114517209230.961149427413954
860.03804000786874970.07608001573749930.96195999213125
870.04080017448573740.08160034897147480.959199825514263
880.06666088243736790.1333217648747360.933339117562632
890.07571531695641780.1514306339128360.924284683043582
900.1688706858155140.3377413716310290.831129314184486
910.1459001906666600.2918003813333200.85409980933334
920.1205892346850030.2411784693700060.879410765314997
930.3376132491154160.6752264982308320.662386750884584
940.8204428334768270.3591143330463460.179557166523173
950.8063418103155150.3873163793689690.193658189684485
960.7396327929239780.5207344141520440.260367207076022
970.6715235983803010.6569528032393980.328476401619699
980.5611909565656980.8776180868686040.438809043434302
990.449116253771530.898232507543060.55088374622847
1000.3073824467602910.6147648935205810.69261755323971


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 level140.145833333333333NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/19/t1261236675h1gbx7eh7qrcq1z/10q3cq1261236596.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/19/t1261236675h1gbx7eh7qrcq1z/10q3cq1261236596.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/19/t1261236675h1gbx7eh7qrcq1z/1br2i1261236596.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/19/t1261236675h1gbx7eh7qrcq1z/1br2i1261236596.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/19/t1261236675h1gbx7eh7qrcq1z/2bpw31261236596.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/19/t1261236675h1gbx7eh7qrcq1z/2bpw31261236596.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/19/t1261236675h1gbx7eh7qrcq1z/3aaal1261236596.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/19/t1261236675h1gbx7eh7qrcq1z/3aaal1261236596.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/19/t1261236675h1gbx7eh7qrcq1z/4o24s1261236596.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/19/t1261236675h1gbx7eh7qrcq1z/4o24s1261236596.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/19/t1261236675h1gbx7eh7qrcq1z/5aakw1261236596.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/19/t1261236675h1gbx7eh7qrcq1z/5aakw1261236596.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/19/t1261236675h1gbx7eh7qrcq1z/6dzgs1261236596.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/19/t1261236675h1gbx7eh7qrcq1z/6dzgs1261236596.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/19/t1261236675h1gbx7eh7qrcq1z/7rvcu1261236596.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/19/t1261236675h1gbx7eh7qrcq1z/7rvcu1261236596.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/19/t1261236675h1gbx7eh7qrcq1z/89g4p1261236596.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/19/t1261236675h1gbx7eh7qrcq1z/89g4p1261236596.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/19/t1261236675h1gbx7eh7qrcq1z/9twl31261236596.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/19/t1261236675h1gbx7eh7qrcq1z/9twl31261236596.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