Home » date » 2010 » Dec » 24 »

workshop 10 - multiple regression 2 (jonas poels)

*Unverified author*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Fri, 24 Dec 2010 20:00:47 +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/24/t1293220715embaqwpkn2j5w8g.htm/, Retrieved Fri, 24 Dec 2010 20:58:46 +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/24/t1293220715embaqwpkn2j5w8g.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 «
1 162556 162556 1081 1081 213118 213118 230380558 6282929 1 29790 29790 309 309 81767 81767 25266003 4324047 1 87550 87550 458 458 153198 153198 70164684 4108272 0 84738 0 588 0 -26007 0 -15292116 -1212617 1 54660 54660 299 299 126942 126942 37955658 1485329 1 42634 42634 156 156 157214 157214 24525384 1779876 0 40949 0 481 0 129352 0 62218312 1367203 1 42312 42312 323 323 234817 234817 75845891 2519076 1 37704 37704 452 452 60448 60448 27322496 912684 1 16275 16275 109 109 47818 47818 5212162 1443586 0 25830 0 115 0 245546 0 28237790 1220017 0 12679 0 110 0 48020 0 5282200 984885 1 18014 18014 239 239 -1710 -1710 -408690 1457425 0 43556 0 247 0 32648 0 8064056 -572920 1 24524 24524 497 497 95350 95350 47388950 929144 0 6532 0 103 0 151352 0 15589256 1151176 0 7123 0 109 0 288170 0 31410530 790090 1 20813 20813 502 502 114337 114337 57397174 774497 1 37597 37597 248 248 37884 37884 9395232 990576 0 17821 0 373 0 122844 0 45820812 454195 1 12988 12988 119 119 82340 82340 9798460 876607 1 2 etc...
 
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
R Framework
error message
The field 'Names of X columns' contains a hard return which cannot be interpreted.
Please, resubmit your request without hard returns in the 'Names of X columns'.


Multiple Linear Regression - Estimated Regression Equation
Trades[t] = + 78.1233889151631 + 85.2298042625602Group[t] + 0.00528577879449569Costs[t] -0.00724477872667004GrCosts[t] + 0.327954919331716GrTrades[t] -0.000616431833275788Dividends[t] -0.000603374741996059GrDiv[t] + 6.4698704385376e-06TrDiv[t] -2.22387688513800e-05`Wealth `[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)78.123388915163119.8180653.9420.0001587.9e-05
Group85.229804262560232.7655532.60120.0108420.005421
Costs0.005285778794495690.0006827.753700
GrCosts-0.007244778726670040.001195-6.061600
GrTrades0.3279549193317160.1111262.95120.0040250.002013
Dividends-0.0006164318332757880.000174-3.53680.000640.00032
GrDiv-0.0006033747419960590.00027-2.23460.0278910.013946
TrDiv6.4698704385376e-06015.028800
`Wealth `-2.22387688513800e-051.6e-05-1.40210.1642910.082146


Multiple Linear Regression - Regression Statistics
Multiple R0.943928684452234
R-squared0.891001361331725
Adjusted R-squared0.881419063426821
F-TEST (value)92.9841015353732
F-TEST (DF numerator)8
F-TEST (DF denominator)91
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation65.3720585028906
Sum Squared Residuals388889.048994387


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
110811290.27028636935-209.270286369352
2309173.899015205695135.100984794305
3458317.767677905623140.232322094377
4588470.090355008308117.909644991692
5299212.02439285728986.975607142711
615658.317292547625697.6827074523744
7481586.973560327673-105.973560327673
8323334.654045588482-11.6540455884825
9452320.467856078033131.532143921967
10109110.507282145974-1.50728214597428
11115218.855850956329-103.855850956329
12110127.813241386923-17.8132413869226
13239173.47535432078165.524645679219
14247353.139936574874-106.139936574874
15497447.93306486946149.0669351305388
1610394.61163475279068.3883652472094
17109123.788260497284-14.7882604972836
18502501.8732922561540.126707743845785
19248163.57908351070984.4209164892912
20373382.950280095076-9.95028009507616
21119120.397570301925-1.39757030192455
228477.35121837523936.64878162476068
23102140.142112888261-38.1421128882605
24295308.20291248134-13.20291248134
25105114.318357057162-9.31835705716223
2664136.814711895112-72.8147118951122
27267224.78678781882742.2132121811726
28129145.598837131620-16.5988371316204
293793.8632556984867-56.8632556984867
30361229.643412627325131.356587372675
312860.0886728337764-32.0886728337764
328583.46379225172711.53620774827286
334473.985100389802-29.985100389802
344965.075765960423-16.0757659604230
3522-71.436588899347893.4365888993478
36155207.366775271174-52.366775271174
3791115.760059262576-24.7600592625762
388185.6981675956595-4.69816759565952
397933.142735733936345.8572642660637
40145120.2784697587524.7215302412499
41816709.35486565987106.645134340129
4261120.934205009002-59.9342050090021
43226170.22563431754555.7743656824548
44105112.622812730485-7.62281273048548
456279.2492093584405-17.2492093584405
462448.2292704057255-24.2292704057255
4726-66.190174782292192.1901747822921
48322361.876651483944-39.8766514839444
498484.7010142592245-0.701014259224468
503354.6983263857004-21.6983263857004
51108123.717365927723-15.7173659277228
52150159.432764558925-9.43276455892495
5311585.349554235650329.6504457643497
54162177.062227422668-15.0622274226677
55158167.781153272940-9.78115327294048
569781.995620003215315.0043799967847
57958.4946446940818-49.4946446940818
586679.7591185240336-13.7591185240336
5910784.2824920936922.7175079063101
60101119.658847553364-18.6588475533643
614770.489441278293-23.489441278293
623858.6643022000376-20.6643022000376
633464.4822914162119-30.4822914162119
6484113.316261112867-29.3162611128673
657978.00795183718030.992048162819682
66947640.664891184525306.335108815475
677466.41448377512727.58551622487278
685379.5727920153672-26.5727920153672
699474.552765055449619.4472349445504
706385.3552983743526-22.3552983743526
7158147.82577782258-89.8257778225801
724985.074898008531-36.074898008531
733436.048086352312-2.04808635231198
741130.5210151045620-19.5210151045620
753533.61166412914161.38833587085842
761773.9533962531998-56.9533962531998
774739.39170246882897.60829753117108
784351.3834912301866-8.3834912301866
7911786.518576415584830.4814235844152
80171195.406722982970-24.4067229829696
812650.394293315634-24.394293315634
8273101.290463778903-28.2904637789025
835940.820633813707718.1793661862923
841855.9990365477834-37.9990365477834
851518.2179956274575-3.2179956274575
8672119.435705834532-47.4357058345324
878681.76341743293144.23658256706862
881417.672737828793-3.67273782879301
896459.6621730372114.33782696278901
901115.7065614138648-4.70656141386482
915253.2160822530349-1.21608225303492
924183.5888709445375-42.5888709445375
939982.037486161783316.9625138382167
947573.71243365425941.28756634574059
954567.9252426984615-22.9252426984615
9643106.365773262194-63.3657732621936
9785.360908819994852.63909118000515
98198221.700858048041-23.7008580480413
992220.27622548086981.72377451913021
1001172.8277982265484-61.8277982265484


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
120.9798082338295250.04038353234095030.0201917661704752
130.9763917011730170.04721659765396690.0236082988269834
140.9937059127454030.01258817450919320.00629408725459662
150.9886935947140230.02261281057195380.0113064052859769
160.991259694220170.01748061155966030.00874030577983015
170.9934660786575680.01306784268486320.00653392134243162
180.9883522510078580.02329549798428510.0116477489921425
190.9825813318374140.03483733632517280.0174186681625864
200.999315221485560.001369557028881550.000684778514440774
210.999179474587750.001641050824500640.00082052541225032
220.9988584855892710.002283028821457400.00114151441072870
230.9986934046131620.002613190773676530.00130659538683827
240.9992857028385230.001428594322953260.000714297161476629
250.9988235472442980.002352905511403710.00117645275570186
260.9996061204709220.0007877590581568660.000393879529078433
270.9995155304113670.0009689391772662440.000484469588633122
280.9991551066327510.001689786734498480.00084489336724924
290.9993376090193650.001324781961269670.000662390980634836
300.9999998089232663.82153467491008e-071.91076733745504e-07
310.9999997887501924.22499615528942e-072.11249807764471e-07
320.9999995837778438.32444313281477e-074.16222156640738e-07
330.9999993472092531.30558149371287e-066.52790746856435e-07
340.9999987245273542.55094529172982e-061.27547264586491e-06
350.9999987680214372.46395712633943e-061.23197856316971e-06
360.9999985194941132.96101177393364e-061.48050588696682e-06
370.99999785278534.29442939773425e-062.14721469886712e-06
380.9999955926435448.81471291282235e-064.40735645641117e-06
390.9999913709748731.72580502530967e-058.62902512654836e-06
400.9999883528303322.32943393357603e-051.16471696678801e-05
4112.54216742961474e-181.27108371480737e-18
4217.04715505132021e-183.52357752566011e-18
4311.86449673819117e-179.32248369095586e-18
4414.57567080334027e-172.28783540167013e-17
4511.82320327419440e-169.11601637097198e-17
4615.48494250336775e-162.74247125168387e-16
4713.75168034923947e-181.87584017461974e-18
4815.88955466364779e-222.94477733182389e-22
4911.70943239505903e-218.54716197529514e-22
5019.29738785925414e-214.64869392962707e-21
5113.95141716336058e-201.97570858168029e-20
5211.46796460524443e-197.33982302622213e-20
5317.96042500215624e-193.98021250107812e-19
5416.3855021447219e-193.19275107236095e-19
5518.68193618839187e-214.34096809419593e-21
5611.89861880478230e-209.49309402391152e-21
5711.16303126846672e-205.81515634233361e-21
5815.72659775415654e-202.86329887707827e-20
5913.47332210650841e-191.73666105325420e-19
6011.64317190818739e-188.21585954093697e-19
6119.2730289474471e-184.63651447372355e-18
6215.78597861869941e-172.89298930934970e-17
6312.34500331631749e-161.17250165815874e-16
6411.20533254120017e-156.02666270600085e-16
650.9999999999999975.39879383429415e-152.69939691714708e-15
6618.53302296221315e-174.26651148110657e-17
6713.28936922103785e-161.64468461051892e-16
6811.48816856894878e-157.44084284474388e-16
690.9999999999999992.8988026447174e-151.4494013223587e-15
700.999999999999991.85009889097916e-149.2504944548958e-15
710.9999999999999843.23797725845355e-141.61898862922677e-14
720.9999999999998862.28883131998517e-131.14441565999259e-13
730.9999999999991361.72739385143351e-128.63696925716754e-13
740.9999999999942331.15340758578255e-115.76703792891275e-12
750.9999999999588398.23224688240744e-114.11612344120372e-11
760.9999999998343633.31273600297376e-101.65636800148688e-10
770.9999999988645922.27081545449372e-091.13540772724686e-09
780.9999999930462061.39075889303011e-086.95379446515056e-09
790.9999999966128566.77428710985091e-093.38714355492546e-09
800.9999999998963562.07288961910417e-101.03644480955208e-10
810.9999999989646772.07064693810410e-091.03532346905205e-09
820.9999999938235921.23528157509785e-086.17640787548927e-09
830.9999999612836037.74327948802938e-083.87163974401469e-08
840.9999998293941683.41211664880158e-071.70605832440079e-07
850.9999979513973744.09720525191670e-062.04860262595835e-06
860.9999854827306922.90345386153239e-051.45172693076619e-05
870.9999759441821654.81116356692249e-052.40558178346124e-05
880.9998254641481580.0003490717036842070.000174535851842103


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level690.896103896103896NOK
5% type I error level771NOK
10% type I error level771NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220715embaqwpkn2j5w8g/109eih1293220838.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220715embaqwpkn2j5w8g/109eih1293220838.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220715embaqwpkn2j5w8g/13v361293220838.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220715embaqwpkn2j5w8g/13v361293220838.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220715embaqwpkn2j5w8g/23v361293220838.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220715embaqwpkn2j5w8g/23v361293220838.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220715embaqwpkn2j5w8g/3dmkr1293220838.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220715embaqwpkn2j5w8g/3dmkr1293220838.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220715embaqwpkn2j5w8g/4dmkr1293220838.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220715embaqwpkn2j5w8g/4dmkr1293220838.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220715embaqwpkn2j5w8g/5dmkr1293220838.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220715embaqwpkn2j5w8g/5dmkr1293220838.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220715embaqwpkn2j5w8g/6oekc1293220838.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220715embaqwpkn2j5w8g/6oekc1293220838.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220715embaqwpkn2j5w8g/7oekc1293220838.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220715embaqwpkn2j5w8g/7oekc1293220838.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220715embaqwpkn2j5w8g/8z51f1293220838.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220715embaqwpkn2j5w8g/8z51f1293220838.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220715embaqwpkn2j5w8g/9z51f1293220838.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293220715embaqwpkn2j5w8g/9z51f1293220838.ps (open in new window)


 
Parameters (Session):
par1 = 4 ; par2 = none ; par3 = 2 ; par4 = yes ;
 
Parameters (R input):
par1 = 4 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ; par4 = yes ;
 
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