Home » date » 2009 » Nov » 20 »

model 4 ws 7

*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: Fri, 20 Nov 2009 07:57:59 -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/20/t1258729414a9cvtyc3f2ac3h0.htm/, Retrieved Fri, 20 Nov 2009 16:03: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/2009/Nov/20/t1258729414a9cvtyc3f2ac3h0.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 «
95.43 0 104.48 103.84 100.01 104.80 0 95.43 104.48 103.84 108.64 0 104.80 95.43 104.48 105.65 0 108.64 104.80 95.43 108.42 0 105.65 108.64 104.80 115.35 0 108.42 105.65 108.64 113.64 0 115.35 108.42 105.65 115.24 0 113.64 115.35 108.42 100.33 0 115.24 113.64 115.35 101.29 0 100.33 115.24 113.64 104.48 0 101.29 100.33 115.24 99.26 0 104.48 101.29 100.33 100.11 0 99.26 104.48 101.29 103.52 0 100.11 99.26 104.48 101.18 0 103.52 100.11 99.26 96.39 0 101.18 103.52 100.11 97.56 0 96.39 101.18 103.52 96.39 0 97.56 96.39 101.18 85.10 0 96.39 97.56 96.39 79.77 0 85.10 96.39 97.56 79.13 0 79.77 85.10 96.39 80.84 0 79.13 79.77 85.10 82.75 0 80.84 79.13 79.77 92.55 0 82.75 80.84 79.13 96.60 0 92.55 82.75 80.84 96.92 0 96.60 92.55 82.75 95.32 0 96.92 96.60 92.55 98.52 0 95.32 96.92 96.60 100.22 0 98.52 95.32 96.92 104.91 0 100.22 98.52 95.32 103.10 0 104.91 100.22 98.52 97.13 0 103.10 104.91 100.22 103.42 0 97.13 103.10 104.91 111.72 0 103.42 97.13 103.10 118.11 0 111.72 103.42 97.13 111 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 time4 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Y[t] = + 8.2339349299459 -2.78755263787447X[t] + 1.31883197290955Y1[t] -0.154452435378261Y2[t] -0.256484237853682Y3[t] -3.13382616025963M1[t] + 0.968052253349415M2[t] -0.053936219421836M3[t] -4.64989216064404M4[t] -7.24376686972142M5[t] -8.614266794937M6[t] -9.13615037441491M7[t] -4.51485066691514M8[t] -3.88401004887181M9[t] + 2.93988204549788M10[t] -1.78358143139068M11[t] + 0.210428913856814t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)8.23393492994595.1560681.59690.1135320.056766
X-2.787552637874474.438695-0.6280.5314720.265736
Y11.318831972909550.09924113.289100
Y2-0.1544524353782610.169109-0.91330.3633330.181666
Y3-0.2564842378536820.101598-2.52450.0132090.006605
M1-3.133826160259635.920954-0.52930.5978220.298911
M20.9680522533494155.9120370.16370.8702740.435137
M3-0.0539362194218365.941597-0.00910.9927760.496388
M4-4.649892160644045.938704-0.7830.4355460.217773
M5-7.243766869721425.945821-1.21830.2260670.113033
M6-8.6142667949375.966356-1.44380.1520150.076008
M7-9.136150374414916.213281-1.47040.1446840.072342
M8-4.514850666915146.224649-0.72530.4700030.235002
M9-3.884010048871816.191525-0.62730.5319290.265965
M102.939882045497886.1245090.480.6322940.316147
M11-1.783581431390686.125483-0.29120.771540.38577
t0.2104289138568140.0701313.00050.0034260.001713


Multiple Linear Regression - Regression Statistics
Multiple R0.989709517238206
R-squared0.979524928511882
Adjusted R-squared0.976147597132399
F-TEST (value)290.029262293389
F-TEST (DF numerator)16
F-TEST (DF denominator)97
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation12.8403394174577
Sum Squared Residuals15992.8086864852


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
195.43101.412772695707-5.98277269570738
2104.892.708466478720512.0915335212795
3108.64105.4880071339163.15199286608399
4105.65107.040757915604-1.39075791560419
5108.4297.717649860842610.7023501391574
6115.3599.687656722866115.6623432771339
7113.64108.8547622546934.78523774530708
8115.24109.6504714863485.58952851365186
9100.33111.088550071074-10.7585500710744
10101.2998.6505505133442.63944948665595
11104.4897.29610567522957.18389432477054
1299.26107.173095662494-7.91309566249369
13100.1196.62646738030683.48353261969316
14103.52102.0478388786671.47216112133292
15101.18106.941059498899-5.7610594988989
1696.3998.7247712481097-2.33477124810969
1797.5689.51092775035648.04907224964357
1896.3991.23389042934135.15610957065868
1985.190.4272525053426-5.32725250534263
2079.7780.2499909436541-0.479990943654141
2179.1376.10574061365583.02425938634423
2280.8486.0149476851543-5.17494768515434
2382.7585.2230263422002-2.47302634220016
2492.5589.63604200343442.91395799656558
2596.698.903605893243-2.30360589324292
2696.92106.553663949985-9.63366394998497
2795.32103.025052728154-7.70505272815356
2898.5295.44120860150443.07879139849559
29100.2297.44307406008652.77692593991354
30104.9198.44114439002946.46885560997061
31103.1103.231692976079-0.131692976079254
3297.13104.515930600194-7.38593060019425
33103.4296.56042108632526.85957891367475
34111.72113.276512713876-1.55651271387623
35118.11120.269488607451-2.15948860745096
36111.62127.795594189851-16.1755941898513
37100.22113.197207203013-12.9772072030128
38102.03101.8382920650300.191707934970322
39105.76106.839158844064-1.0791588440641
40107.68110.017236479149-2.33723647914866
41110.77109.1256040174381.64439598256163
42105.44110.787488919250-5.3474889192496
43112.26102.4769520760239.7830479239773
44114.07116.333809938221-2.26380993822070
45117.9119.875860719567-1.97586071956749
46124.72129.932526773841-5.21252677384082
47126.42133.358136968038-6.9381369680383
48134.73135.558461426973-0.828461426972701
49135.79141.582766233143-5.79276623314308
50143.36145.573512509548-2.21351250954844
51140.37152.450407387494-12.0804073874943
52144.74142.6804945331912.05950546680902
53151.98144.5805715608147.3994284391862
54150.92153.060774761900-2.14077476189966
55163.38149.11228645343514.2677135465648
56154.43168.683435156685-14.2534351566851
57146.66156.068554478357-9.4085544783566
58157.95151.0421067500546.90789324994557
59162.1164.914314512851-2.81431451285103
60180.42172.6305920783767.78940792162427
61179.57190.331511923488-10.7615119234880
62171.58189.628833870758-18.0488338707582
63185.43173.71230018088911.7176998191114
64190.64189.0446825391681.59531746083159
65203193.4424941532699.55750584673143
66202.36204.226182444478-1.86618244447761
67193.41199.825360335701-6.41536033570145
68186.17189.782247178288-3.61224717828812
69192.24182.6216724351859.61832756481513
70209.6201.0750730799018.52492692009854
71206.41220.376381165894-13.9663811658941
72209.82213.925163915622-4.10516391562168
73230.37211.53912059655718.8308794034428
74235.8243.244926881428-7.44492688142766
75232.07245.546016137308-13.4760161373078
76244.64230.13181803899314.5081819610074
77242.19243.509488315661-1.31948831566053
78217.48238.133498065163-20.6534980651629
79209.39202.3881069458037.00189305419727
80211.73200.99539096725910.7346090327406
81221212.5099730353438.4900269646575
82203.11233.483405217892-30.3734052178917
83214.71203.34451946697411.3654805330260
84224.19221.0225258819863.16747411801425
85238.04233.398510503584.64148949641999
86238.36251.537214409355-13.1772144093545
87246.24246.577044276929-0.337044276929331
88259.87248.98218172249710.8878182775033
89249.97263.275255571139-13.3052555711394
90266.48244.93246553948321.5475344605167
91282.98264.42812569489818.5518743051019
92306.31291.00976611591915.3002338840814
93301.73313.048812987219-11.3188129872186
94314.62306.2075183175598.41248168244122
95332.62313.41784277023719.2021572297628
96355.51338.33463454520117.1753654547993
97370.32359.51307549595510.8069245040452
98408.13375.20515181503632.9248481849636
99433.58416.10026437940917.4797356205907
100440.51435.6406329183274.86936708167322
101386.29428.768209181745-42.478209181745
102342.84348.503189368683-5.66318936868292
103254.97297.485460758025-42.5154607580250
104203.42207.048957613432-3.62895761343153
105170.09164.6204145732755.4695854267254
106174.03158.19735894837815.8326410516218
107167.85177.250184491125-9.40018449112482
108177.01179.033890296064-2.02389029606416
109188.19188.1349620750070.0550379249930264
110211.2207.3620991414733.83790085852747
111240.91232.8206894329388.08931056706187
112230.26261.196216003458-30.9362160034576
113251.25234.27672552864916.9732744713511
114241.66254.823709358807-13.1637093588072


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
200.04533341404889650.0906668280977930.954666585951103
210.1321465173187990.2642930346375970.867853482681201
220.06138150418296150.1227630083659230.938618495817038
230.02660704636578220.05321409273156450.973392953634218
240.02884013048077530.05768026096155050.971159869519225
250.01854717810708750.03709435621417500.981452821892912
260.0088469466568420.0176938933136840.991153053343158
270.003853487832606670.007706975665213350.996146512167393
280.002328354480453290.004656708960906590.997671645519547
290.0009536617935989130.001907323587197830.9990463382064
300.0004498769583912260.0008997539167824530.99955012304161
310.0002105845197870640.0004211690395741280.999789415480213
328.51823470650232e-050.0001703646941300460.999914817652935
330.0001865294032877920.0003730588065755840.999813470596712
348.92139617674816e-050.0001784279235349630.999910786038233
353.93403388073272e-057.86806776146545e-050.999960659661193
363.04112315640955e-056.08224631281909e-050.999969588768436
372.11654226183901e-054.23308452367802e-050.999978834577382
388.15160369826621e-061.63032073965324e-050.999991848396302
393.29615346306019e-066.59230692612038e-060.999996703846537
401.25465090036378e-062.50930180072755e-060.9999987453491
414.67289266998663e-079.34578533997326e-070.999999532710733
422.95000903525589e-075.90001807051177e-070.999999704999097
435.39649364492355e-071.07929872898471e-060.999999460350635
442.06884131027377e-074.13768262054754e-070.99999979311587
451.32842073425841e-072.65684146851682e-070.999999867157927
465.23092811987071e-081.04618562397414e-070.99999994769072
471.86242268423776e-083.72484536847552e-080.999999981375773
481.49570299965968e-082.99140599931937e-080.99999998504297
495.77249094827321e-091.15449818965464e-080.999999994227509
502.09643833194607e-094.19287666389214e-090.999999997903562
511.06139821096093e-092.12279642192187e-090.999999998938602
524.33791066591454e-108.67582133182908e-100.99999999956621
531.83701044822566e-103.67402089645133e-100.999999999816299
546.67556747819397e-111.33511349563879e-100.999999999933244
552.08581137516617e-104.17162275033234e-100.999999999791419
561.98088590100397e-103.96177180200793e-100.999999999801911
571.09432664195203e-102.18865328390406e-100.999999999890567
584.49562827808727e-118.99125655617454e-110.999999999955044
591.45814737809445e-112.91629475618890e-110.999999999985419
604.52019976949899e-119.04039953899797e-110.999999999954798
612.11828810939198e-114.23657621878396e-110.999999999978817
625.12621614638768e-111.02524322927754e-100.999999999948738
634.39213263054836e-118.78426526109672e-110.999999999956079
641.44081979592520e-112.88163959185040e-110.999999999985592
651.51486431002012e-113.02972862004024e-110.999999999984851
665.81007907994128e-121.16201581598826e-110.99999999999419
675.38933377964112e-121.07786675592822e-110.99999999999461
682.75988606779933e-125.51977213559865e-120.99999999999724
691.09612517444718e-122.19225034889437e-120.999999999998904
707.59880062041359e-131.51976012408272e-120.99999999999924
716.03938972030396e-131.20787794406079e-120.999999999999396
722.34819556667122e-134.69639113334244e-130.999999999999765
731.04816815345052e-122.09633630690105e-120.999999999998952
744.30574411433484e-138.61148822866969e-130.99999999999957
754.25123086537252e-138.50246173074504e-130.999999999999575
762.92717081855446e-135.85434163710892e-130.999999999999707
774.19455363885615e-138.3891072777123e-130.99999999999958
781.76770749265684e-113.53541498531367e-110.999999999982323
791.36092624988806e-112.72185249977611e-110.99999999998639
805.06337921936045e-121.01267584387209e-110.999999999994937
811.99104136118746e-123.98208272237491e-120.99999999999801
821.00038474400529e-092.00076948801059e-090.999999998999615
835.74264429946464e-101.14852885989293e-090.999999999425736
842.18040686316066e-104.36081372632132e-100.99999999978196
851.96926047734112e-103.93852095468225e-100.999999999803074
864.43399715939075e-098.8679943187815e-090.999999995566003
871.00495890680825e-072.00991781361650e-070.99999989950411
884.44218850699269e-088.88437701398537e-080.999999955578115
891.10830577218266e-072.21661154436531e-070.999999889169423
901.70928354369139e-063.41856708738277e-060.999998290716456
919.77133956858552e-071.95426791371710e-060.999999022866043
922.01010035288756e-064.02020070577512e-060.999997989899647
931.12913093090125e-062.25826186180250e-060.99999887086907
940.0001434703590892620.0002869407181785250.99985652964091


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level680.906666666666667NOK
5% type I error level700.933333333333333NOK
10% type I error level730.973333333333333NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258729414a9cvtyc3f2ac3h0/10bve41258729074.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258729414a9cvtyc3f2ac3h0/10bve41258729074.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t1258729414a9cvtyc3f2ac3h0/18w7e1258729074.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258729414a9cvtyc3f2ac3h0/18w7e1258729074.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t1258729414a9cvtyc3f2ac3h0/26xxu1258729074.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258729414a9cvtyc3f2ac3h0/26xxu1258729074.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t1258729414a9cvtyc3f2ac3h0/3l98h1258729074.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258729414a9cvtyc3f2ac3h0/3l98h1258729074.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t1258729414a9cvtyc3f2ac3h0/4sata1258729074.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258729414a9cvtyc3f2ac3h0/4sata1258729074.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t1258729414a9cvtyc3f2ac3h0/58bdm1258729074.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258729414a9cvtyc3f2ac3h0/58bdm1258729074.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t1258729414a9cvtyc3f2ac3h0/67vwh1258729074.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258729414a9cvtyc3f2ac3h0/67vwh1258729074.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t1258729414a9cvtyc3f2ac3h0/7bdo81258729074.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258729414a9cvtyc3f2ac3h0/7bdo81258729074.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t1258729414a9cvtyc3f2ac3h0/8snjl1258729074.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258729414a9cvtyc3f2ac3h0/8snjl1258729074.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t1258729414a9cvtyc3f2ac3h0/9izgm1258729074.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258729414a9cvtyc3f2ac3h0/9izgm1258729074.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