Home » date » 2010 » Dec » 02 »

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Thu, 02 Dec 2010 10:31:36 +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/02/t1291286019k5nn7n58al9apf3.htm/, Retrieved Thu, 02 Dec 2010 11:33:57 +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/02/t1291286019k5nn7n58al9apf3.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 «
3 4 4 4 4 3 4 3 4 4 4 2 4 4 4 2 4 4 4 2 3 4 5 2 5 4 4 3 4 4 3 2 3 2 4 1 3 4 4 2 4 3 4 2 4 2 4 4 4 2 4 2 4 3 2 2 4 4 3 2 4 5 4 1 4 4 3 2 5 2 2 2 4 4 4 3 4 3 3 4 4 4 3 4 4 2 4 4 5 2 3 4 4 4 3 4 4 4 4 2 4 4 4 2 4 4 4 4 4 3 4 2 4 4 4 3 4 5 4 2 4 4 5 4 3 4 4 3 4 4 4 4 4 4 4 2 3 4 3 2 3 4 4 4 2 4 3 5 3 4 4 2 4 4 4 4 4 5 3 4 4 4 5 5 4 4 4 3 5 2 3 2 4 4 3 3 4 4 3 2 4 4 4 1 3 4 4 2 4 4 4 4 4 4 4 4 3 4 4 4 4 3 4 4 3 4 4 2 3 4 5 2 5 4 3 1 2 3 3 4 4 3 5 2 4 4 5 4 4 4 4 2 3 5 4 2 4 3 3 1 3 4 4 2 4 4 4 2 4 4 5 2 4 4 4 2 4 4 4 1 4 4 5 5 5 4 4 3 5 4 3 2 3 4 4 1 4 4 4 2 3 4 4 4 4 4 4 2 5 4 4 5 5 3 4 4 4 4 4 3 4 4 3 2 4 3 4 2 4 4 3 2 4 4 5 2 4 4 4 4 4 4 5 2 5 4 5 2 4 2 4 4 4 4 4 4 4 3 4 2 4 3 4 2 4 4 4 3 4 4 5 2 4 4 4 4 4 3 3 2 3 2 4 4 4 5 3 1 4 2 4 2 4 4 4 3 4 4 4 2 4 4 4 4 4 3 4 2 4 4 3 3 4 3 3 2 4 4 3 2 4 4 3 2 5 3 3 2 5 2 2 2 4 4 3 2 4 3 5 3 3 2 2 2 4 3 2 2 4 4 3 4 4 4 3 3
 
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
Competence[t] = + 4.59399534068267 -0.0960101540567729Focus[t] -0.0680960967195073Neatness[t] -0.0295001752219747Upset[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)4.593995340682670.38759111.852700
Focus-0.09601015405677290.078476-1.22340.2239070.111954
Neatness-0.06809609671950730.081349-0.83710.4044480.202224
Upset-0.02950017522197470.054097-0.54530.586690.293345


Multiple Linear Regression - Regression Statistics
Multiple R0.173299448047482
R-squared0.030032698693562
Adjusted R-squared0.00231934722766380
F-TEST (value)1.08369060777502
F-TEST (DF numerator)3
F-TEST (DF denominator)105
p-value0.359376524702930
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.585286899054971
Sum Squared Residuals35.9688791915653


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
133.81956963668958-0.819569636689579
243.945079965968390.0549200340316064
343.878569987133590.121430012866407
443.878569987133590.121430012866407
543.878569987133590.121430012866407
633.81047389041409-0.810473890414085
753.849069811911621.15093018808838
843.94666608385310.0533339161468998
934.10009047046911-1.10009047046911
1033.87856998713359-0.878569987133593
1143.974580141190370.025419858809634
1244.01158994480319-0.0115899448031898
1344.07059029524714-0.0705902952471392
1444.11077233462938-0.110772334629381
1543.94666608385310.0533339161468998
1643.812060008298790.187939991701206
1743.94666608385310.0533339161468998
1854.206782488686150.793217511313846
1943.849069811911620.150930188088382
2043.983675887465920.016324112534076
2143.887665733409150.112334266590849
2244.01158994480319-0.0115899448031898
2354.07968604152270.920313958477303
2443.887665733409150.112334266590849
2543.878569987133590.121430012866407
2643.878569987133590.121430012866407
2743.819569636689640.180430363310357
2843.974580141190370.025419858809634
2943.849069811911620.150930188088382
3043.782559833076820.217440166923180
3143.751473539970140.248526460029864
3233.84906981191162-0.849069811911618
3343.819569636689640.180430363310357
3443.878569987133590.121430012866407
3533.9466660838531-0.9466660838531
3633.81956963668964-0.819569636689643
3723.85816555818718-1.85816555818718
3833.87856998713359-0.878569987133593
3943.819569636689640.180430363310357
4043.791655579352380.208344420647622
4143.721973364748160.278026635251839
4243.849069811911620.150930188088382
4354.138686391966650.861313608033353
4443.917165908631130.0828340913688745
4543.94666608385310.0533339161468998
4643.908070162355570.0919298376444325
4733.87856998713359-0.878569987133593
4843.819569636689640.180430363310357
4943.819569636689640.180430363310357
5033.81956963668964-0.819569636689643
5143.915579790746420.0844202092535834
5233.87856998713359-0.878569987133593
5333.81047389041409-0.810473890414085
5453.976166259075071.02383374092493
5523.98367588746592-1.98367588746592
5643.906484044470860.0935159555291413
5743.751473539970140.248526460029864
5843.878569987133590.121430012866407
5933.78255983307682-0.78255983307682
6044.07217641313185-0.072176413131848
6133.87856998713359-0.878569987133593
6243.878569987133590.121430012866407
6343.810473890414090.189526109585915
6443.878569987133590.121430012866407
6543.908070162355570.0919298376444325
6643.721973364748160.278026635251839
6753.849069811911621.15093018808838
6853.94666608385311.0533339161469
6933.90807016235557-0.908070162355567
7043.878569987133590.121430012866407
7133.81956963668964-0.819569636689643
7243.878569987133590.121430012866407
7353.790069461467671.20993053853233
7453.915579790746421.08442020925358
7543.849069811911620.150930188088382
7643.94666608385310.0533339161468998
7743.974580141190370.025419858809634
7843.94666608385310.0533339161468998
7943.810473890414090.189526109585915
8043.819569636689640.180430363310357
8143.810473890414090.189526109585915
8253.810473890414091.18952610958591
8344.01158994480319-0.0115899448031898
8443.819569636689640.180430363310357
8543.974580141190370.025419858809634
8643.974580141190370.025419858809634
8743.849069811911620.150930188088382
8843.810473890414090.189526109585915
8943.819569636689640.180430363310357
9044.04267623790987-0.0426762379098734
9134.01158994480319-1.01158994480319
9243.88015610501830.119843894981698
9344.07059029524714-0.0705902952471392
9443.849069811911620.150930188088382
9543.878569987133590.121430012866407
9643.819569636689640.180430363310357
9743.974580141190370.025419858809634
9843.917165908631130.0828340913688745
9944.04267623790987-0.0426762379098734
10043.94666608385310.0533339161468998
10143.94666608385310.0533339161468998
10254.042676237909870.957323762090127
10354.206782488686150.793217511313846
10443.94666608385310.0533339161468998
10543.876983869248880.123016130751116
10634.20678248868615-1.20678248868615
10744.11077233462938-0.110772334629381
10843.887665733409150.112334266590849
10943.917165908631130.0828340913688745


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
70.8188479447123560.3623041105752880.181152055287644
80.833250981441240.3334980371175210.166749018558760
90.8245425332487070.3509149335025860.175457466751293
100.8628610978710870.2742778042578270.137138902128913
110.8228828905964030.3542342188071940.177117109403597
120.7566135258701790.4867729482596420.243386474129821
130.6984407223021750.603118555395650.301559277697825
140.6447734959451320.7104530081097360.355226504054868
150.5543333041458110.8913333917083780.445666695854189
160.4875957779407360.9751915558814710.512404222059264
170.4005735734393390.8011471468786770.599426426560661
180.428936235736340.857872471472680.57106376426366
190.3547790816404890.7095581632809780.64522091835951
200.2957055819416010.5914111638832020.704294418058399
210.2385411846318940.4770823692637890.761458815368105
220.1849813554440630.3699627108881260.815018644555937
230.2284674863189360.4569349726378710.771532513681064
240.1851156383167430.3702312766334860.814884361683257
250.1481976507097300.2963953014194590.85180234929027
260.1161061242496360.2322122484992720.883893875750364
270.0862511585899910.1725023171799820.91374884141001
280.0634976668180470.1269953336360940.936502333181953
290.04583633291904850.0916726658380970.954163667080951
300.03412801212273280.06825602424546560.965871987877267
310.02682668037636130.05365336075272260.973173319623639
320.0489789572880470.0979579145760940.951021042711953
330.03492151773337390.06984303546674780.965078482266626
340.0252394300780.0504788601560.974760569922
350.05993722272407940.1198744454481590.94006277727592
360.09167786073720340.1833557214744070.908322139262797
370.5542453745024660.8915092509950670.445754625497533
380.6092534866042230.7814930267915540.390746513395777
390.5652324206257270.8695351587485460.434767579374273
400.5189761891503810.962047621699240.48102381084962
410.4850774914769270.9701549829538530.514922508523073
420.4337859264282230.8675718528564470.566214073571777
430.4935902366546290.9871804733092580.506409763345371
440.4369980420716880.8739960841433760.563001957928312
450.3811706630134970.7623413260269950.618829336986503
460.3303974222502010.6607948445004030.669602577749799
470.3884454795988080.7768909591976160.611554520401192
480.3422840968806380.6845681937612770.657715903119362
490.297829597532290.595659195064580.70217040246771
500.3446389811791950.689277962358390.655361018820805
510.2949795203087070.5899590406174140.705020479691293
520.3534032745708520.7068065491417040.646596725429148
530.3965158343202150.793031668640430.603484165679785
540.5091778791087040.9816442417825930.490822120891296
550.948018197187060.1039636056258780.0519818028129391
560.9324025952181740.1351948095636520.0675974047818258
570.9185360326046650.1629279347906690.0814639673953347
580.8961269428025470.2077461143949050.103873057197453
590.9289291884038550.1421416231922910.0710708115961453
600.9077159155357590.1845681689284820.0922840844642409
610.9452434364395030.1095131271209940.0547565635604969
620.9286967907595490.1426064184809020.0713032092404511
630.9101180269267170.1797639461465670.0898819730732833
640.88588477382530.2282304523494010.114115226174700
650.8560394695886320.2879210608227350.143960530411368
660.8315263420977620.3369473158044760.168473657902238
670.9046932189145490.1906135621709020.095306781085451
680.9486939070459880.1026121859080240.0513060929540122
690.9758266206186690.04834675876266220.0241733793813311
700.9662649102423380.06747017951532480.0337350897576624
710.9878579346198930.02428413076021460.0121420653801073
720.9823295996329340.03534080073413310.0176704003670665
730.9942792287370360.01144154252592760.00572077126296379
740.99909373975480.001812520490401680.00090626024520084
750.998442113300550.003115773398902250.00155788669945112
760.9974016917244020.005196616551195860.00259830827559793
770.9956890118145360.008621976370928170.00431098818546409
780.9931150561760630.01376988764787390.00688494382393694
790.9897457074416080.02050858511678410.0102542925583921
800.9841790162491160.03164196750176780.0158209837508839
810.977502291347750.04499541730450200.0224977086522510
820.9919981716556020.01600365668879660.00800182834439832
830.988263726519960.02347254696008070.0117362734800404
840.981776368128940.03644726374212230.0182236318710612
850.9712376198871010.05752476022579760.0287623801128988
860.9557927834126470.08841443317470580.0442072165873529
870.9342764000058660.1314471999882680.065723599994134
880.9050477571833660.1899044856332680.0949522428166338
890.8702271739578550.259545652084290.129772826042145
900.8210318322372420.3579363355255160.178968167762758
910.8934581260667920.2130837478664160.106541873933208
920.8472463512258990.3055072975482020.152753648774101
930.7892557456225830.4214885087548340.210744254377417
940.714916099878260.5701678002434810.285083900121741
950.629101487118710.741797025762580.37089851288129
960.531141487770960.937717024458080.46885851222904
970.4335356745169380.8670713490338770.566464325483062
980.3291149990843810.6582299981687610.67088500091562
990.236672796897510.473345593795020.76332720310249
1000.1559642783715760.3119285567431510.844035721628424
1010.09456479470337980.1891295894067600.90543520529662
1020.1293030246588110.2586060493176210.87069697534119


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level40.0416666666666667NOK
5% type I error level150.15625NOK
10% type I error level240.25NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291286019k5nn7n58al9apf3/10wo7q1291285886.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291286019k5nn7n58al9apf3/10wo7q1291285886.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291286019k5nn7n58al9apf3/1p5sw1291285886.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291286019k5nn7n58al9apf3/1p5sw1291285886.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291286019k5nn7n58al9apf3/2p5sw1291285886.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291286019k5nn7n58al9apf3/2p5sw1291285886.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291286019k5nn7n58al9apf3/3ixsh1291285886.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291286019k5nn7n58al9apf3/3ixsh1291285886.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291286019k5nn7n58al9apf3/4ixsh1291285886.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291286019k5nn7n58al9apf3/4ixsh1291285886.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291286019k5nn7n58al9apf3/5ixsh1291285886.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291286019k5nn7n58al9apf3/5ixsh1291285886.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291286019k5nn7n58al9apf3/6bork1291285886.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291286019k5nn7n58al9apf3/6bork1291285886.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291286019k5nn7n58al9apf3/7mfqn1291285886.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291286019k5nn7n58al9apf3/7mfqn1291285886.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291286019k5nn7n58al9apf3/8mfqn1291285886.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291286019k5nn7n58al9apf3/8mfqn1291285886.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291286019k5nn7n58al9apf3/9mfqn1291285886.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291286019k5nn7n58al9apf3/9mfqn1291285886.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