Home » date » 2008 » Dec » 07 »

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: Sun, 07 Dec 2008 06:50:02 -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/07/t12286585476wah7u6gu555d1k.htm/, Retrieved Sun, 07 Dec 2008 14:02:37 +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/Dec/07/t12286585476wah7u6gu555d1k.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:
2008-11-27 13:41:43 [a2386b643d711541400692649981f2dc] [reply
test

Post a new message
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
493 1 481 1 462 1 457 1 442 1 439 1 488 1 521 1 501 1 485 1 464 1 460 1 467 1 460 1 448 1 443 1 436 1 431 1 484 1 510 1 513 1 503 1 471 1 471 1 476 1 475 1 470 1 461 1 455 1 456 1 517 1 525 1 523 1 519 1 509 1 512 1 519 0 517 0 510 0 509 0 501 0 507 0 569 0 580 0 578 0 565 0 547 0 555 0 562 0 561 0 555 0 544 0 537 0 543 0 594 0 611 0 613 0 611 0 594 0 595 0 591 0 589 0 584 0 573 0 567 0 569 0 621 0 629 0 628 0 612 0 595 0 597 0 593 0 590 0 580 0 574 0 573 0 573 0 620 0 626 0 620 0 588 0 566 0 557 0 561 0 549 0 532 0 526 0 511 0 499 0 555 0 565 0 542 0 527 0 510 0 514 0 517 0 508 0 493 0 490 0 469 0 478 0
 
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 time4 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
Aantal_werklozen_(*1000)[t] = + 559.666666666667 -81.111111111111dummyvariabele[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)559.6666666666674.530295123.538700
dummyvariabele-81.1111111111117.625622-10.636700


Multiple Linear Regression - Regression Statistics
Multiple R0.728574877306835
R-squared0.53082135184267
Adjusted R-squared0.526129565361097
F-TEST (value)113.138429024304
F-TEST (DF numerator)1
F-TEST (DF denominator)100
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation36.8042871898853
Sum Squared Residuals135455.555555556


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1493478.55555555555314.4444444444468
2481478.5555555555552.44444444444480
3462478.555555555556-16.5555555555556
4457478.555555555556-21.5555555555556
5442478.555555555556-36.5555555555556
6439478.555555555556-39.5555555555556
7488478.5555555555569.44444444444436
8521478.55555555555642.4444444444444
9501478.55555555555622.4444444444444
10485478.5555555555566.44444444444436
11464478.555555555556-14.5555555555556
12460478.555555555556-18.5555555555556
13467478.555555555556-11.5555555555556
14460478.555555555556-18.5555555555556
15448478.555555555556-30.5555555555556
16443478.555555555556-35.5555555555556
17436478.555555555556-42.5555555555556
18431478.555555555556-47.5555555555556
19484478.5555555555565.44444444444436
20510478.55555555555631.4444444444444
21513478.55555555555634.4444444444444
22503478.55555555555624.4444444444444
23471478.555555555556-7.55555555555564
24471478.555555555556-7.55555555555564
25476478.555555555556-2.55555555555564
26475478.555555555556-3.55555555555564
27470478.555555555556-8.55555555555564
28461478.555555555556-17.5555555555556
29455478.555555555556-23.5555555555556
30456478.555555555556-22.5555555555556
31517478.55555555555638.4444444444444
32525478.55555555555646.4444444444444
33523478.55555555555644.4444444444444
34519478.55555555555640.4444444444444
35509478.55555555555630.4444444444444
36512478.55555555555633.4444444444444
37519559.666666666667-40.6666666666667
38517559.666666666667-42.6666666666667
39510559.666666666667-49.6666666666667
40509559.666666666667-50.6666666666667
41501559.666666666667-58.6666666666667
42507559.666666666667-52.6666666666667
43569559.6666666666679.33333333333334
44580559.66666666666720.3333333333333
45578559.66666666666718.3333333333333
46565559.6666666666675.33333333333334
47547559.666666666667-12.6666666666667
48555559.666666666667-4.66666666666666
49562559.6666666666672.33333333333334
50561559.6666666666671.33333333333334
51555559.666666666667-4.66666666666666
52544559.666666666667-15.6666666666667
53537559.666666666667-22.6666666666667
54543559.666666666667-16.6666666666667
55594559.66666666666734.3333333333333
56611559.66666666666751.3333333333333
57613559.66666666666753.3333333333333
58611559.66666666666751.3333333333333
59594559.66666666666734.3333333333333
60595559.66666666666735.3333333333333
61591559.66666666666731.3333333333333
62589559.66666666666729.3333333333333
63584559.66666666666724.3333333333333
64573559.66666666666713.3333333333333
65567559.6666666666677.33333333333334
66569559.6666666666679.33333333333334
67621559.66666666666761.3333333333333
68629559.66666666666769.3333333333333
69628559.66666666666768.3333333333333
70612559.66666666666752.3333333333333
71595559.66666666666735.3333333333333
72597559.66666666666737.3333333333333
73593559.66666666666733.3333333333333
74590559.66666666666730.3333333333333
75580559.66666666666720.3333333333333
76574559.66666666666714.3333333333333
77573559.66666666666713.3333333333333
78573559.66666666666713.3333333333333
79620559.66666666666760.3333333333333
80626559.66666666666766.3333333333333
81620559.66666666666760.3333333333333
82588559.66666666666728.3333333333333
83566559.6666666666676.33333333333334
84557559.666666666667-2.66666666666666
85561559.6666666666671.33333333333334
86549559.666666666667-10.6666666666667
87532559.666666666667-27.6666666666667
88526559.666666666667-33.6666666666667
89511559.666666666667-48.6666666666667
90499559.666666666667-60.6666666666667
91555559.666666666667-4.66666666666666
92565559.6666666666675.33333333333334
93542559.666666666667-17.6666666666667
94527559.666666666667-32.6666666666667
95510559.666666666667-49.6666666666667
96514559.666666666667-45.6666666666667
97517559.666666666667-42.6666666666667
98508559.666666666667-51.6666666666667
99493559.666666666667-66.6666666666667
100490559.666666666667-69.6666666666667
101469559.666666666667-90.6666666666667
102478559.666666666667-81.6666666666667


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
50.2366864490389920.4733728980779840.763313550961008
60.1970142796775350.3940285593550710.802985720322465
70.1540188654744790.3080377309489570.845981134525521
80.3092223413722340.6184446827444680.690777658627766
90.2642438686949430.5284877373898860.735756131305057
100.1808385113156190.3616770226312390.819161488684381
110.1236226425838620.2472452851677230.876377357416138
120.08566430499182530.1713286099836510.914335695008175
130.05298744221551750.1059748844310350.947012557784483
140.03444089799490630.06888179598981260.965559102005094
150.02864140836496940.05728281672993870.97135859163503
160.02674381571012530.05348763142025050.973256184289875
170.03022772211107370.06045544422214750.969772277888926
180.03825481251372710.07650962502745410.961745187486273
190.02760447479081990.05520894958163990.97239552520918
200.03799205627584070.07598411255168140.96200794372416
210.05032232510979660.1006446502195930.949677674890203
220.04717037432673190.09434074865346380.952829625673268
230.03165350742102670.06330701484205340.968346492578973
240.02081338108763160.04162676217526320.979186618912368
250.01336721362267220.02673442724534440.986632786377328
260.008415977308895510.01683195461779100.991584022691104
270.005289909693675820.01057981938735160.994710090306324
280.003654629833914230.007309259667828460.996345370166086
290.002919726685038950.00583945337007790.997080273314961
300.002423420477356390.004846840954712790.997576579522644
310.003842509571967340.007685019143934690.996157490428033
320.007124745828866130.01424949165773230.992875254171134
330.01035300813865710.02070601627731420.989646991861343
340.01212339322542710.02424678645085420.987876606774573
350.01079886512774970.02159773025549950.98920113487225
360.009942789177594160.01988557835518830.990057210822406
370.007349561022250450.01469912204450090.99265043897775
380.005509803993016040.01101960798603210.994490196006984
390.004454315217090730.008908630434181450.99554568478291
400.003673033186251490.007346066372502980.996326966813748
410.003498700034371740.006997400068743480.996501299965628
420.003078188415042050.006156376830084090.996921811584958
430.005090012452491420.01018002490498280.994909987547509
440.008583409166400040.01716681833280010.9914165908336
450.01057965315799510.02115930631599020.989420346842005
460.008977735651354680.01795547130270940.991022264348645
470.006332411872503440.01266482374500690.993667588127497
480.004532268316993720.009064536633987440.995467731683006
490.003364063576481600.006728127152963210.996635936423518
500.002398865590298090.004797731180596180.997601134409702
510.001597278569073190.003194557138146380.998402721430927
520.001041600203300960.002083200406601910.9989583997967
530.000707503892115160.001415007784230320.999292496107885
540.0004542037356023260.0009084074712046510.999545796264398
550.0006450646306840180.001290129261368040.999354935369316
560.001562074285797990.003124148571595980.998437925714202
570.003321440623444410.006642881246888830.996678559376556
580.00565160096466780.01130320192933560.994348399035332
590.005611068531505800.01122213706301160.994388931468494
600.005564039985369290.01112807997073860.99443596001463
610.004992203629273870.009984407258547750.995007796370726
620.004260543777457290.008521087554914570.995739456222543
630.003310748525754930.006621497051509860.996689251474245
640.0022309529471630.0044619058943260.997769047052837
650.001419733407289220.002839466814578430.998580266592711
660.0008958825612732780.001791765122546560.999104117438727
670.001957709669942980.003915419339885970.998042290330057
680.00554778299927030.01109556599854060.99445221700073
690.01398797596539180.02797595193078350.986012024034608
700.02055365657472920.04110731314945830.97944634342527
710.02077140124609780.04154280249219570.979228598753902
720.02236968992685660.04473937985371310.977630310073143
730.02287537525429100.04575075050858190.97712462474571
740.02273916793176550.04547833586353110.977260832068234
750.01964681892685190.03929363785370380.980353181073148
760.01588215747073890.03176431494147780.984117842529261
770.01277482034740810.02554964069481620.987225179652592
780.01037257071649740.02074514143299470.989627429283503
790.03296325125083870.06592650250167750.96703674874916
800.1372425126091850.2744850252183710.862757487390815
810.4162015111553310.8324030223106610.58379848884467
820.5753539318832070.8492921362335860.424646068116793
830.6246268602185960.7507462795628080.375373139781404
840.6452464934123080.7095070131753840.354753506587692
850.7035462711366580.5929074577266850.296453728863342
860.7175328556402650.564934288719470.282467144359735
870.682002139934950.63599572013010.31799786006505
880.6331719702482660.7336560595034670.366828029751734
890.5782824080180760.8434351839638480.421717591981924
900.5456082656001430.9087834687997140.454391734399857
910.6099099672748010.7801800654503980.390090032725199
920.8303644311777140.3392711376445720.169635568822286
930.8994031644450780.2011936711098450.100596835554923
940.9125520271131060.1748959457737870.0874479728868935
950.8690994991993480.2618010016013040.130900500800652
960.8340777152622830.3318445694754340.165922284737717
970.8508416924007750.2983166151984490.149158307599225


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level250.268817204301075NOK
5% type I error level550.591397849462366NOK
10% type I error level650.698924731182796NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t12286585476wah7u6gu555d1k/101nci1228657796.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t12286585476wah7u6gu555d1k/101nci1228657796.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t12286585476wah7u6gu555d1k/1mkry1228657795.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t12286585476wah7u6gu555d1k/1mkry1228657795.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t12286585476wah7u6gu555d1k/22enz1228657795.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t12286585476wah7u6gu555d1k/22enz1228657795.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t12286585476wah7u6gu555d1k/3cnly1228657795.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t12286585476wah7u6gu555d1k/3cnly1228657795.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t12286585476wah7u6gu555d1k/4cn8e1228657795.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t12286585476wah7u6gu555d1k/4cn8e1228657795.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t12286585476wah7u6gu555d1k/5vs311228657795.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t12286585476wah7u6gu555d1k/5vs311228657795.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t12286585476wah7u6gu555d1k/648f51228657795.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t12286585476wah7u6gu555d1k/648f51228657795.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t12286585476wah7u6gu555d1k/7yoox1228657795.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t12286585476wah7u6gu555d1k/7yoox1228657795.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t12286585476wah7u6gu555d1k/8oxcx1228657795.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t12286585476wah7u6gu555d1k/8oxcx1228657795.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t12286585476wah7u6gu555d1k/9gyg61228657796.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/07/t12286585476wah7u6gu555d1k/9gyg61228657796.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