Home » date » 2008 » Nov » 27 »

Gilliam Schoorel

*Unverified author*
R Software Module: rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Thu, 27 Nov 2008 02:14: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/2008/Nov/27/t1227777306e9keunckb5zzgnr.htm/, Retrieved Thu, 27 Nov 2008 09:15:20 +0000
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2008/Nov/27/t1227777306e9keunckb5zzgnr.htm/},
    year = {2008},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2008},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
 
Feedback Forum:

Post a new message
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
-3,3 0 -3,5 0 -3,5 0 -8,4 0 -15,7 0 -18,7 0 -22,8 0 -20,7 0 -14 0 -6,3 0 0,7 0 0,2 0 0,8 0 1,2 0 4,5 0 0,4 0 5,9 0 6,5 0 12,8 0 4,2 0 -3,3 0 -12,5 0 -16,3 0 -10,5 0 -11,8 0 -11,4 0 -17,7 0 -17,3 0 -18,6 0 -17,9 0 -21,4 0 -19,4 0 -15,5 0 -7,7 0 -0,7 0 -1,6 0 1,4 0 0,7 0 9,5 0 1,4 0 4,1 0 6,6 0 18,4 0 16,9 0 9,2 0 -4,3 0 -5,9 0 -7,7 0 -5,4 0 -2,3 0 -4,8 0 2,3 0 -5,2 0 -10 0 -17,1 0 -14,4 0 -3,9 0 3,7 0 6,5 0 0,9 0 -4,1 0 -7 0 -12,2 0 -2,5 0 4,4 0 13,7 0 12,3 0 13,4 0 2,2 0 1,7 0 -7,2 0 -4,8 0 -2,9 0 -2,4 0 -2,5 0 -5,3 0 -7,1 0 -8 0 -8,9 1 -7,7 1 -1,1 1 4 1 9,6 1 10,9 1 13 1 14,9 1 20,1 1 10,8 1 11 1 3,8 1 10,8 1 7,6 1 10,2 1 2,2 1 -0,1 1 -1,7 1 -4,8 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 time4 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
Registraties[t] = -3.85897435897436 + 9.3642375168691Dummies[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-3.858974358974361.047055-3.68560.000380.00019
Dummies9.36423751686912.3658023.95820.0001467.3e-05


Multiple Linear Regression - Regression Statistics
Multiple R0.376257138236009
R-squared0.141569434073551
Adjusted R-squared0.132533322853273
F-TEST (value)15.667075207734
F-TEST (DF numerator)1
F-TEST (DF denominator)95
p-value0.000145733276324722
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation9.24733713684387
Sum Squared Residuals8123.75819163293


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1-3.3-3.858974358974370.558974358974365
2-3.5-3.858974358974340.35897435897434
3-3.5-3.858974358974360.358974358974359
4-8.4-3.85897435897436-4.54102564102564
5-15.7-3.85897435897436-11.8410256410256
6-18.7-3.85897435897436-14.8410256410256
7-22.8-3.85897435897436-18.9410256410256
8-20.7-3.85897435897436-16.8410256410256
9-14-3.85897435897436-10.1410256410256
10-6.3-3.85897435897436-2.44102564102564
110.7-3.858974358974364.55897435897436
120.2-3.858974358974364.05897435897436
130.8-3.858974358974364.65897435897436
141.2-3.858974358974365.05897435897436
154.5-3.858974358974368.35897435897436
160.4-3.858974358974364.25897435897436
175.9-3.858974358974369.75897435897436
186.5-3.8589743589743610.3589743589744
1912.8-3.8589743589743616.6589743589744
204.2-3.858974358974368.05897435897436
21-3.3-3.858974358974360.558974358974359
22-12.5-3.85897435897436-8.64102564102564
23-16.3-3.85897435897436-12.4410256410256
24-10.5-3.85897435897436-6.64102564102564
25-11.8-3.85897435897436-7.94102564102564
26-11.4-3.85897435897436-7.54102564102564
27-17.7-3.85897435897436-13.8410256410256
28-17.3-3.85897435897436-13.4410256410256
29-18.6-3.85897435897436-14.7410256410256
30-17.9-3.85897435897436-14.0410256410256
31-21.4-3.85897435897436-17.5410256410256
32-19.4-3.85897435897436-15.5410256410256
33-15.5-3.85897435897436-11.6410256410256
34-7.7-3.85897435897436-3.84102564102564
35-0.7-3.858974358974363.15897435897436
36-1.6-3.858974358974362.25897435897436
371.4-3.858974358974365.25897435897436
380.7-3.858974358974364.55897435897436
399.5-3.8589743589743613.3589743589744
401.4-3.858974358974365.25897435897436
414.1-3.858974358974367.95897435897436
426.6-3.8589743589743610.4589743589744
4318.4-3.8589743589743622.2589743589744
4416.9-3.8589743589743620.7589743589744
459.2-3.8589743589743613.0589743589744
46-4.3-3.85897435897436-0.441025641025641
47-5.9-3.85897435897436-2.04102564102564
48-7.7-3.85897435897436-3.84102564102564
49-5.4-3.85897435897436-1.54102564102564
50-2.3-3.858974358974361.55897435897436
51-4.8-3.85897435897436-0.94102564102564
522.3-3.858974358974366.15897435897436
53-5.2-3.85897435897436-1.34102564102564
54-10-3.85897435897436-6.14102564102564
55-17.1-3.85897435897436-13.2410256410256
56-14.4-3.85897435897436-10.5410256410256
57-3.9-3.85897435897436-0.0410256410256412
583.7-3.858974358974367.55897435897436
596.5-3.8589743589743610.3589743589744
600.9-3.858974358974364.75897435897436
61-4.1-3.85897435897436-0.241025641025641
62-7-3.85897435897436-3.14102564102564
63-12.2-3.85897435897436-8.34102564102564
64-2.5-3.858974358974361.35897435897436
654.4-3.858974358974368.25897435897436
6613.7-3.8589743589743617.5589743589744
6712.3-3.8589743589743616.1589743589744
6813.4-3.8589743589743617.2589743589744
692.2-3.858974358974366.05897435897436
701.7-3.858974358974365.55897435897436
71-7.2-3.85897435897436-3.34102564102564
72-4.8-3.85897435897436-0.94102564102564
73-2.9-3.858974358974360.95897435897436
74-2.4-3.858974358974361.45897435897436
75-2.5-3.858974358974361.35897435897436
76-5.3-3.85897435897436-1.44102564102564
77-7.1-3.85897435897436-3.24102564102564
78-8-3.85897435897436-4.14102564102564
79-8.95.50526315789474-14.4052631578947
80-7.75.50526315789474-13.2052631578947
81-1.15.50526315789474-6.60526315789474
8245.50526315789474-1.50526315789474
839.65.505263157894744.09473684210526
8410.95.505263157894745.39473684210526
85135.505263157894747.49473684210526
8614.95.505263157894749.39473684210526
8720.15.5052631578947314.5947368421053
8810.85.505263157894745.29473684210526
89115.505263157894745.49473684210526
903.85.50526315789474-1.70526315789474
9110.85.505263157894745.29473684210526
927.65.505263157894742.09473684210526
9310.25.505263157894744.69473684210526
942.25.50526315789474-3.30526315789474
95-0.15.50526315789474-5.60526315789474
96-1.75.50526315789474-7.20526315789474
97-4.85.50526315789474-10.3052631578947


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
50.2724834752032040.5449669504064080.727516524796796
60.3843850957698020.7687701915396050.615614904230198
70.5503636192232620.8992727615534760.449636380776738
80.5675227177782770.8649545644434450.432477282221723
90.4632427731170270.9264855462340530.536757226882973
100.3958058927037930.7916117854075860.604194107296207
110.4648116443933860.9296232887867720.535188355606614
120.4837609933857190.9675219867714380.516239006614281
130.4934571172510090.9869142345020190.506542882748991
140.4939271927300590.9878543854601190.506072807269941
150.545363475717190.909273048565620.45463652428281
160.5085012628188070.9829974743623850.491498737181193
170.5580769258822970.8838461482354070.441923074117703
180.6013829969955820.7972340060088370.398617003004418
190.7550598306156040.4898803387687920.244940169384396
200.7386097181901610.5227805636196780.261390281809839
210.675950833442570.648098333114860.32404916655743
220.6609692126875040.6780615746249910.339030787312496
230.6959005911543350.6081988176913290.304099408845665
240.6576854555520320.6846290888959360.342314544447968
250.6297174791345880.7405650417308240.370282520865412
260.59682347004490.8063530599102010.403176529955101
270.6499436764484220.7001126471031560.350056323551578
280.691759357510640.6164812849787210.308240642489361
290.7505598288368840.4988803423262320.249440171163116
300.7941288526420950.4117422947158110.205871147357905
310.877109919008250.2457801619834990.122890080991750
320.9201296294107160.1597407411785690.0798703705892843
330.9315479430650130.1369041138699750.0684520569349873
340.915891730567650.1682165388647000.0841082694323502
350.9006206796590720.1987586406818550.0993793203409276
360.8804341673001810.2391316653996390.119565832699819
370.867786067853130.2644278642937390.132213932146870
380.849734195493210.3005316090135790.150265804506789
390.8937581985967380.2124836028065240.106241801403262
400.8779870745186780.2440258509626430.122012925481322
410.8734021656384570.2531956687230870.126597834361543
420.883719054851760.2325618902964810.116280945148241
430.9711933437541460.05761331249170840.0288066562458542
440.9934959328092980.01300813438140340.00650406719070169
450.9956276454283350.008744709143329790.00437235457166489
460.9933704605237320.01325907895253540.00662953947626769
470.9904197252205530.01916054955889380.0095802747794469
480.9872160861743660.02556782765126740.0127839138256337
490.9819533113146180.03609337737076410.0180466886853820
500.9744439473500430.05111210529991310.0255560526499565
510.9648213692094880.07035726158102370.0351786307905119
520.9567669063653710.08646618726925710.0432330936346286
530.94240830279290.1151833944141990.0575916972070997
540.9358631180804340.1282737638391310.0641368819195657
550.9619514264052760.07609714718944910.0380485735947245
560.973018569744120.05396286051176140.0269814302558807
570.963407247325510.07318550534897890.0365927526744894
580.9559436007575380.08811279848492480.0440563992424624
590.9552012228235420.08959755435291570.0447987771764578
600.9410462340429330.1179075319141340.0589537659570668
610.9224062679176870.1551874641646270.0775937320823134
620.9075175410017940.1849649179964120.0924824589982062
630.9221265588493510.1557468823012970.0778734411506485
640.898851323822930.2022973523541390.101148676177070
650.8811965748573540.2376068502852920.118803425142646
660.9330124267636770.1339751464726470.0669875732363235
670.963279118616040.07344176276791970.0367208813839599
680.9882800727667760.02343985446644880.0117199272332244
690.9856051264016570.02878974719668510.0143948735983425
700.9824969087685540.03500618246289200.0175030912314460
710.974109465184440.05178106963112290.0258905348155614
720.9610965849823120.07780683003537550.0389034150176877
730.9439016192497670.1121967615004670.0560983807502334
740.9224934006007560.1550131987984890.0775065993992443
750.8968674696275670.2062650607448670.103132530372433
760.8600072693271710.2799854613456580.139992730672829
770.8133944942291580.3732110115416840.186605505770842
780.7576548994941110.4846902010117780.242345100505889
790.8411530963262660.3176938073474680.158846903673734
800.9117566842681690.1764866314636630.0882433157318313
810.9134432172628750.1731135654742490.0865567827371246
820.8848937415885290.2302125168229430.115106258411471
830.8442854116692810.3114291766614380.155714588330719
840.7976706400094270.4046587199811450.202329359990573
850.762680615088680.4746387698226410.237319384911321
860.7586416758018030.4827166483963930.241358324198197
870.9021221173247440.1957557653505110.0978778826752555
880.8790952370171420.2418095259657160.120904762982858
890.865753664479760.2684926710404800.134246335520240
900.7712959520661240.4574080958677520.228704047933876
910.764861488831730.4702770223365410.235138511168270
920.6911789256881520.6176421486236960.308821074311848


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level10.0113636363636364NOK
5% type I error level90.102272727272727NOK
10% type I error level210.238636363636364NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777306e9keunckb5zzgnr/10w5w91227777240.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777306e9keunckb5zzgnr/10w5w91227777240.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777306e9keunckb5zzgnr/1i83i1227777240.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777306e9keunckb5zzgnr/1i83i1227777240.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777306e9keunckb5zzgnr/2r53h1227777240.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777306e9keunckb5zzgnr/2r53h1227777240.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777306e9keunckb5zzgnr/3fczx1227777240.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777306e9keunckb5zzgnr/3fczx1227777240.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777306e9keunckb5zzgnr/4tmlg1227777240.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777306e9keunckb5zzgnr/4tmlg1227777240.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777306e9keunckb5zzgnr/5tgy11227777240.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777306e9keunckb5zzgnr/5tgy11227777240.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777306e9keunckb5zzgnr/6dlvr1227777240.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777306e9keunckb5zzgnr/6dlvr1227777240.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777306e9keunckb5zzgnr/7us2q1227777240.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777306e9keunckb5zzgnr/7us2q1227777240.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777306e9keunckb5zzgnr/8q0jn1227777240.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777306e9keunckb5zzgnr/8q0jn1227777240.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777306e9keunckb5zzgnr/9nxuo1227777240.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t1227777306e9keunckb5zzgnr/9nxuo1227777240.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