Home » date » 2009 » Nov » 19 »

workshop 7 berekening 3

*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, 19 Nov 2009 10:08:08 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Nov/19/t1258650552dl3gc2irkcep2qh.htm/, Retrieved Thu, 19 Nov 2009 18:09:24 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2009/Nov/19/t1258650552dl3gc2irkcep2qh.htm/},
    year = {2009},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2009},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
4716.99 0 4926.65 0 4920.10 0 5170.09 0 5246.24 0 5283.61 0 4979.05 0 4825.20 0 4695.12 0 4711.54 0 4727.22 0 4384.96 0 4378.75 0 4472.93 0 4564.07 0 4310.54 0 4171.38 0 4049.38 0 3591.37 0 3720.46 0 4107.23 0 4101.71 0 4162.34 0 4136.22 0 4125.88 0 4031.48 0 3761.36 0 3408.56 0 3228.47 0 3090.45 0 2741.14 0 2980.44 0 3104.33 0 3181.57 0 2863.86 0 2898.01 0 3112.33 0 3254.33 0 3513.47 0 3587.61 0 3727.45 0 3793.34 0 3817.58 0 3845.13 0 3931.86 0 4197.52 0 4307.13 0 4229.43 0 4362.28 0 4217.34 0 4361.28 0 4327.74 0 4417.65 0 4557.68 0 4650.35 0 4967.18 0 5123.42 0 5290.85 0 5535.66 0 5514.06 0 5493.88 0 5694.83 0 5850.41 0 6116.64 0 6175.00 0 6513.58 0 6383.78 0 6673.66 0 6936.61 0 7300.68 0 7392.93 0 7497.31 0 7584.71 0 7160.79 0 7196.19 0 7245.63 0 7347.51 0 7425.75 0 7778.51 0 7822.33 0 8181.22 0 8371.47 0 8347.71 0 8672.11 0 8802.79 0 9138.46 0 9123.29 0 9023.21 1 8850.41 1 8864.58 1 9163.74 1 8516.66 1 8553.44 1 7 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 time10 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Y[t] = + 2850.80433638344 -529.242454901961X[t] + 606.554587799569M1[t] + 626.875762091508M2[t] + 542.308047494557M3[t] + 509.450605664492M4[t] + 460.512891067541M5[t] + 350.105176470591M6[t] + 131.211906318086M7[t] + 79.4308583878024M8[t] + 138.930921568630M9[t] + 95.2054291939026M10[t] + 85.7332701525081M11[t] + 45.3132701525054t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)2850.80433638344559.7294885.09322e-061e-06
X-529.242454901961476.40413-1.11090.269440.13472
M1606.554587799569670.0501740.90520.3676540.183827
M2626.875762091508669.8051050.93590.3517190.175859
M3542.308047494557669.6144330.80990.4200540.210027
M4509.450605664492670.0011670.76040.4489350.224467
M5460.512891067541669.5926380.68780.4933030.246652
M6350.105176470591669.2383780.52310.6021080.301054
M7131.211906318086668.9384730.19610.8449170.422458
M879.4308583878024668.6929960.11880.9056990.452849
M9138.930921568630668.5020070.20780.8358160.417908
M1095.2054291939026668.3655530.14240.8870330.443517
M1185.7332701525081668.2836670.12830.8981950.449097
t45.31327015250546.0402157.501900


Multiple Linear Regression - Regression Statistics
Multiple R0.694078414024687
R-squared0.481744844815025
Adjusted R-squared0.410071259523486
F-TEST (value)6.72137221621442
F-TEST (DF numerator)13
F-TEST (DF denominator)94
p-value6.17242346123703e-09
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1417.58583194669
Sum Squared Residuals188897661.547984


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
14716.993502.672194335501214.31780566450
24926.653568.306638779961358.34336122004
34920.13529.052194335511391.04780566449
45170.093541.508022657951628.58197734205
55246.243537.883578213511708.35642178649
65283.613472.789133769061810.82086623094
74979.053299.209133769061679.84086623094
84825.23292.741355991281532.45864400871
94695.123397.554689324621297.56531067538
104711.543399.142467102401312.39753289760
114727.223434.983578213511292.23642178649
124384.963394.56357821351990.396421786495
134378.754046.43143616558332.318563834421
144472.934112.06588061002360.864119389976
154564.074072.81143616558491.258563834422
164310.544085.26726448802225.272735511982
174171.384081.6428200435789.7371799564272
184049.384016.5483755991332.8316244008712
193591.373842.96837559913-251.598375599129
203720.463836.50059782135-116.040597821351
214107.233941.31393115468165.916068845316
224101.713942.90170893246158.808291067539
234162.343978.74282004357183.597179956428
244136.223938.32282004357197.897179956430
254125.884590.19067799564-464.310677995644
264031.484655.82512244009-624.345122440088
273761.364616.57067799564-855.210677995644
283408.564629.02650631808-1220.46650631808
293228.474625.40206187364-1396.93206187364
303090.454560.30761742919-1469.85761742919
312741.144386.72761742919-1645.58761742919
322980.444380.25983965142-1399.81983965142
333104.334485.07317298475-1380.74317298475
343181.574486.66095076253-1305.09095076253
352863.864522.50206187364-1658.64206187364
362898.014482.08206187364-1584.07206187364
373112.335133.94991982571-2021.61991982571
383254.335199.58436427015-1945.25436427015
393513.475160.32991982571-1646.85991982571
403587.615172.78574814815-1585.17574814815
413727.455169.1613037037-1441.71130370370
423793.345104.06685925926-1310.72685925926
433817.584930.48685925926-1112.90685925926
443845.134924.01908148148-1078.88908148148
453931.865028.83241481481-1096.97241481481
464197.525030.42019259259-832.900192592592
474307.135066.2613037037-759.131303703703
484229.435025.8413037037-796.4113037037
494362.285677.70916165577-1315.42916165577
504217.345743.34360610022-1526.00360610022
514361.285704.08916165577-1342.80916165577
524327.745716.54498997821-1388.80498997821
534417.655712.92054553377-1295.27054553377
544557.685647.82610108932-1090.14610108932
554650.355474.24610108932-823.896101089325
564967.185467.77832331155-500.598323311547
575123.425572.59165664488-449.17165664488
585290.855574.17943442266-283.329434422657
595535.665610.02054553377-74.3605455337688
605514.065569.60054553377-55.5405455337657
615493.886221.46840348584-727.58840348584
625694.836287.10284793028-592.272847930284
635850.416247.84840348584-397.438403485840
646116.646260.30423180828-143.664231808279
6561756256.67978736383-81.6797873638341
666513.586191.58534291939321.99465708061
676383.786018.00534291939365.77465708061
686673.666011.53756514161662.122434858388
696936.616116.35089847495820.259101525054
707300.686117.938676252721182.74132374728
717392.936153.779787363831239.15021263617
727497.316113.359787363831383.95021263617
737584.716765.2276453159819.482354684095
747160.796830.86208976035329.927910239651
757196.196791.6076453159404.582354684094
767245.636804.06347363835441.566526361654
777347.516800.4390291939547.0709708061
787425.756735.34458474946690.405415250543
797778.516561.764584749461216.74541525054
807822.336555.296806971681267.03319302832
818181.226660.110140305011521.10985969499
828371.476661.697918082791709.77208191721
838347.716697.53902919391650.1709708061
848672.116657.11902919392014.99097080610
858802.797308.986887145971493.80311285403
869138.467374.621331590421763.83866840958
879123.297335.366887145971787.92311285403
889023.216818.580260566452204.62973943355
898850.416814.9558161222035.45418387800
908864.586749.861371677562114.71862832244
919163.746576.281371677562587.45862832244
928516.666569.813593899781946.84640610022
938553.446674.626927233111878.81307276689
947555.26676.21470501089878.985294989107
957851.226712.0558161221139.16418387800
9674426671.635816122770.364183877999
977992.537323.50367407408669.026325925924
988264.047389.13811851852874.901881481482
997517.397349.88367407407167.506325925926
1007200.47362.33950239651-161.939502396515
1017193.697358.71505795207-165.025057952070
1026193.587293.62061350763-1100.04061350763
1035104.217120.04061350763-2015.83061350763
1044800.467113.57283572985-2313.11283572985
1054461.617218.38616906318-2756.77616906318
1064398.597219.97394684096-2821.38394684096
1074243.637255.81505795207-3012.18505795207
1084293.827215.39505795207-2921.57505795207


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.01179294399397330.02358588798794660.988207056006027
180.005755069199091820.01151013839818360.994244930800908
190.003076120730679580.006152241461359170.99692387926932
200.0008419919756233280.001683983951246660.999158008024377
210.0002255849793837390.0004511699587674770.999774415020616
225.68447002265703e-050.0001136894004531410.999943155299774
231.4828381508291e-052.9656763016582e-050.999985171618492
247.53464851654945e-061.50692970330989e-050.999992465351483
256.56308228762762e-061.31261645752552e-050.999993436917712
262.01521235059438e-064.03042470118877e-060.99999798478765
274.69858614814139e-079.39717229628277e-070.999999530141385
281.72691809052340e-073.45383618104681e-070.99999982730819
298.38240644685006e-081.67648128937001e-070.999999916175936
304.54720949931140e-089.09441899862279e-080.999999954527905
311.88850569637243e-083.77701139274487e-080.999999981114943
324.53626220556216e-099.07252441112433e-090.999999995463738
331.05382139537120e-092.10764279074239e-090.999999998946179
342.24575490603552e-104.49150981207104e-100.999999999775425
358.52059727667224e-111.70411945533445e-100.999999999914794
361.92487905036415e-113.84975810072831e-110.999999999980751
375.69971510789948e-121.13994302157990e-110.9999999999943
381.84885597585640e-123.69771195171281e-120.99999999999815
391.65616826533817e-123.31233653067634e-120.999999999998344
402.64290593981564e-125.28581187963128e-120.999999999997357
417.34564866092312e-121.46912973218462e-110.999999999992654
422.05248590858802e-114.10497181717604e-110.999999999979475
431.74264877568783e-103.48529755137566e-100.999999999825735
444.95472578730786e-109.90945157461573e-100.999999999504527
457.81647368940772e-101.56329473788154e-090.999999999218353
461.75257972048614e-093.50515944097228e-090.99999999824742
474.55773154935894e-099.11546309871788e-090.999999995442268
488.79844052317458e-091.75968810463492e-080.99999999120156
491.77563831468435e-083.55127662936871e-080.999999982243617
501.91119193110616e-083.82238386221233e-080.99999998088808
512.12519667052173e-084.25039334104347e-080.999999978748033
522.68149470385126e-085.36298940770252e-080.999999973185053
533.72871888366175e-087.4574377673235e-080.999999962712811
545.79049361282724e-081.15809872256545e-070.999999942095064
551.39165232473692e-072.78330464947383e-070.999999860834768
563.63906196869596e-077.27812393739193e-070.999999636093803
577.84811036818889e-071.56962207363778e-060.999999215188963
581.45595393884394e-062.91190787768787e-060.999998544046061
593.24567433991579e-066.49134867983158e-060.99999675432566
606.83930442177037e-061.36786088435407e-050.999993160695578
611.85462854846923e-053.70925709693847e-050.999981453714515
625.99438370845473e-050.0001198876741690950.999940056162915
630.0001883758540486180.0003767517080972370.999811624145951
640.0005566705334159620.001113341066831920.999443329466584
650.001597316684560780.003194633369121550.99840268331544
660.003883266815302480.007766533630604970.996116733184698
670.009267979496377070.01853595899275410.990732020503623
680.01737173355932560.03474346711865120.982628266440674
690.03012746350014880.06025492700029770.96987253649985
700.044070934376320.088141868752640.95592906562368
710.06238070776495180.1247614155299040.937619292235048
720.08942970174783930.1788594034956790.91057029825216
730.1678093106676410.3356186213352820.83219068933236
740.4322500460271180.8645000920542360.567749953972882
750.8152525839342370.3694948321315260.184747416065763
760.91134737275650.1773052544870010.0886526272435004
770.9748563343316630.0502873313366740.025143665668337
780.9939874402275850.01202511954483060.00601255977241531
790.997783155800630.00443368839874140.0022168441993707
800.9986738926471670.002652214705666360.00132610735283318
810.9986321912776630.002735617444673020.00136780872233651
820.997370156654960.005259686690077680.00262984334503884
830.9952301901058680.009539619788263570.00476980989413178
840.990995743302050.01800851339590010.00900425669795007
850.9835505506806760.03289889863864780.0164494493193239
860.9728878654497730.05422426910045430.0271121345502271
870.9488440811356040.1023118377287930.0511559188643964
880.9542021012806220.09159579743875590.0457978987193779
890.9891956123415820.02160877531683650.0108043876584183
900.9896908639859920.02061827202801550.0103091360140078
910.9733198054918640.05336038901627180.0266801945081359


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level530.706666666666667NOK
5% type I error level620.826666666666667NOK
10% type I error level680.906666666666667NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Nov/19/t1258650552dl3gc2irkcep2qh/10t5kx1258650477.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t1258650552dl3gc2irkcep2qh/10t5kx1258650477.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t1258650552dl3gc2irkcep2qh/11ayr1258650477.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t1258650552dl3gc2irkcep2qh/11ayr1258650477.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t1258650552dl3gc2irkcep2qh/2rwab1258650477.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t1258650552dl3gc2irkcep2qh/2rwab1258650477.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t1258650552dl3gc2irkcep2qh/3deou1258650477.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t1258650552dl3gc2irkcep2qh/3deou1258650477.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t1258650552dl3gc2irkcep2qh/4duew1258650477.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t1258650552dl3gc2irkcep2qh/4duew1258650477.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t1258650552dl3gc2irkcep2qh/5xu341258650477.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t1258650552dl3gc2irkcep2qh/5xu341258650477.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t1258650552dl3gc2irkcep2qh/6iulg1258650477.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t1258650552dl3gc2irkcep2qh/6iulg1258650477.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t1258650552dl3gc2irkcep2qh/7qoa11258650477.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t1258650552dl3gc2irkcep2qh/7qoa11258650477.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t1258650552dl3gc2irkcep2qh/8fc3x1258650477.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t1258650552dl3gc2irkcep2qh/8fc3x1258650477.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t1258650552dl3gc2irkcep2qh/9k2t41258650477.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t1258650552dl3gc2irkcep2qh/9k2t41258650477.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = 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