Home » date » 2008 » Dec » 13 »

multiple regression :include monthly dummies

*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: Sat, 13 Dec 2008 08:26:12 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/Dec/13/t1229182071vzkc2uj90md27ak.htm/, Retrieved Sat, 13 Dec 2008 16:28:01 +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/2008/Dec/13/t1229182071vzkc2uj90md27ak.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},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
32.68 10967.87 31.54 10433.56 32.43 10665.78 26.54 10666.71 25.85 10682.74 27.6 10777.22 25.71 10052.6 25.38 10213.97 28.57 10546.82 27.64 10767.2 25.36 10444.5 25.9 10314.68 26.29 9042.56 21.74 9220.75 19.2 9721.84 19.32 9978.53 19.82 9923.81 20.36 9892.56 24.31 10500.98 25.97 10179.35 25.61 10080.48 24.67 9492.44 25.59 8616.49 26.09 8685.4 28.37 8160.67 27.34 8048.1 24.46 8641.21 27.46 8526.63 30.23 8474.21 32.33 7916.13 29.87 7977.64 24.87 8334.59 25.48 8623.36 27.28 9098.03 28.24 9154.34 29.58 9284.73 26.95 9492.49 29.08 9682.35 28.76 9762.12 29.59 10124.63 30.7 10540.05 30.52 10601.61 32.67 10323.73 33.19 10418.4 37.13 10092.96 35.54 10364.91 37.75 10152.09 41.84 10032.8 42.94 10204.59 49.14 10001.6 44.61 10411.75 40.22 10673.38 44.23 10539.51 45.85 10723.78 53.38 10682.06 53.26 10283.19 51.8 10377.18 55.3 10486.64 57.81 10545.38 63.96 10554.27 63.77 10532.54 59.15 10324.31 56.12 10695.25 57.42 10827.81 63.52 10872.48 61.71 10971.19 63.01 11145.65 68.18 11234.68 72.03 11333.88 69.75 10997.97 74.41 11036.89 74.33 11257.35 64.24 11533.59 60.03 11963.12 59.44 12185.15 62.5 12377.62 55.04 12512.89 58.34 12631.48 61.92 12268.53 67.65 12754.8 67.68 13407.75 70.3 13480.21 75.26 13673.28 71.44 13239.71 76.36 13557.69 81.71 13901.28 92.6 13200.58 90.6 13406.97 92.23 12538.12 94.09 12419.57 102.79 12193.88 109.65 12656.63 124.05 12812.48 132.69 12056.67 135.81 11322.38 116.07 11530.75 101.42 11114.08 75.73 9181.73 55.48 8614.55
 
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
Olieprijs[t] = -86.2842757208807 + 0.0134215355293647DowJones[t] -3.353375836221M1[t] -3.6578005891384M2[t] -7.84443873350316M3[t] -14.7678676832942M4[t] -12.9353385813789M5[t] -11.5357318133792M6[t] -7.35542204852444M7[t] -7.10533150746131M8[t] -6.0923874525072M9[t] -3.8493014624562M10[t] + 1.30089658596615M11[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-86.284275720880717.401376-4.95854e-062e-06
DowJones0.01342153552936470.0014889.021700
M1-3.35337583622110.057783-0.33340.7396360.369818
M2-3.657800589138410.066976-0.36330.7172380.358619
M3-7.8444387335031610.060205-0.77970.4376790.21884
M4-14.767867683294210.352955-1.42640.1573620.078681
M5-12.935338581378910.350568-1.24970.2147910.107396
M6-11.535731813379210.350011-1.11460.2681430.134072
M7-7.3554220485244410.348326-0.71080.4791410.239571
M8-7.1053315074613110.350536-0.68650.4942640.247132
M9-6.092387452507210.357648-0.58820.5579380.278969
M10-3.849301462456210.353908-0.37180.7109760.355488
M111.3008965859661510.3482290.12570.9002530.450127


Multiple Linear Regression - Regression Statistics
Multiple R0.706625299856318
R-squared0.499319314397031
Adjusted R-squared0.429456893150105
F-TEST (value)7.14718020768572
F-TEST (DF numerator)12
F-TEST (DF denominator)86
p-value7.20546966537228e-09
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation20.6964505214673
Sum Squared Residuals36837.5035201287


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
132.6857.568005329351-24.888005329351
231.5450.0923199277388-18.5523199277388
332.4349.0224307640032-16.5924307640032
426.5442.1114838422544-15.5714838422544
525.8544.1591601587054-18.3091601587054
627.646.8268336035195-19.2268336035195
725.7141.2816302930861-15.5716302930861
825.3843.6975540225228-18.3175540225228
928.5749.1778561784259-20.6078561784259
1027.6454.3787801684383-26.7387801684383
1125.3655.1978487015347-29.8378487015347
1225.952.1545683731464-26.2545683731464
1326.2931.72738875931-5.43738875930999
1421.7433.8145474223701-12.0745474223701
1519.236.3533065164147-17.1533065164147
1619.3232.8750515216563-13.5550515216563
1719.8233.9731541994047-14.1531541994047
1820.3634.9533379821118-14.5933379821118
1924.3147.2995783937426-22.9895783937426
2025.9743.2329004624962-17.2629004624962
2125.6142.918857299662-17.3088572996620
2224.6737.2695435370254-12.5995435370254
2325.5930.6631475385008-5.07314753850076
2426.0930.2871289658631-4.19712896586312
2528.3719.89107079131868.4789292086814
2627.3418.07578378386069.26421621613938
2724.4621.84959257731732.61040742268267
2827.4613.388324086571714.0716759134283
2930.2314.517296296037715.7127037039623
3032.338.4266125158095723.9033874841904
3129.8713.432480931075616.4375190689244
3224.8718.47338857934546.3966114206546
3325.4823.36206944911422.11793055088584
3427.2831.9759557088887-4.69595570888867
3528.2437.8819204229695-9.64192042296955
3629.5838.3310578546772-8.75105785467725
3726.9537.766140240037-10.8161402400370
3829.0840.0099282227248-10.9299282227248
3928.7636.8939259675375-8.1339259675375
4029.5934.8359378624964-5.24593786249641
4130.742.2440412540204-11.5440412540204
4230.5244.4698777492078-13.9498777492078
4332.6744.9206112211627-12.2506112211627
4433.1946.4413185307908-13.2513185307908
4537.1343.0863580630684-5.95635806306844
4635.5448.9794306403302-13.4394306403302
4737.7551.2732574973931-13.5232574973931
4841.8448.3713059381291-6.53130593812906
4942.9447.3236156904976-4.38361569049762
5049.1444.29475344047454.84524655952551
5144.6145.6129580934787-1.00295809347865
5240.2242.2010054842353-1.98100548423527
5344.2342.23679362483451.99320637516546
5445.8546.1095867448303-0.259586744830265
5553.3849.72995004739993.65004995260008
5653.2644.62659271186548.63340728813461
5751.846.90102689122454.89897310877551
5855.350.61323416031974.68676583968028
5957.8156.55181320573691.25818679426305
6063.9655.37023407062698.58976592937313
6163.7751.725208267352812.0447917326472
6259.1548.626017171155810.5239828288443
6356.1249.41796341605356.70203658394646
6457.4244.273693216035113.1463067839649
6563.5246.705762310047116.8142376899529
6661.7149.430208850150412.2797911498496
6763.0155.95203970345817.0579602965419
6868.1857.397049552700610.7829504472994
6972.0359.741409932167612.2885900678324
7069.7557.476067922549712.2739320774503
7174.4163.14863213377511.2613678662250
7274.3364.80664727061269.52335272938742
7364.2465.1608364090232-0.920836409023253
7460.0370.6213638120339-10.5913638120339
7559.4469.4147092012539-9.97470920125393
7662.565.0745231947997-2.57452319479971
7755.0468.7225834077722-13.6825834077722
7858.3471.7138500741992-13.3738500741992
7961.9271.0228135186711-9.1028135186711
8067.6577.7993941415984-10.1493941415983
8167.6887.5759298204511-19.8959298204511
8270.390.7915402749599-20.4915402749599
8375.2698.5330341880367-23.2730341880367
8471.4491.4129624426039-19.9729624426039
8576.3692.3273664740103-15.9673664740103
8681.7196.6344471136273-14.9244471136273
8792.683.04333902383679.5566609761633
8890.678.889980791951211.7100192080488
8992.2369.06120874917823.1687912508220
9094.0968.869692480171625.2203075198285
91102.7970.02089589140432.769104108596
92109.6576.481801998680633.1681980013194
93124.0579.586492365886244.4635076341138
94132.6971.685447587488161.0045524125118
95135.8166.980346312053368.8296536879467
96116.0768.476095084340947.5939049156591
97101.4259.530368039099541.8896319609005
9875.7333.290839106014342.4391608939857
9955.4821.491774440104533.9882255598955


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
160.01041616033240540.02083232066481090.989583839667595
170.001735292422277590.003470584844555180.998264707577722
180.0002717789739881730.0005435579479763460.999728221026012
196.48113911061855e-050.0001296227822123710.999935188608894
209.59434969246659e-061.91886993849332e-050.999990405650308
211.33421265742259e-062.66842531484518e-060.999998665787343
223.69513745071019e-077.39027490142038e-070.999999630486255
234.77114624501284e-079.54229249002567e-070.999999522885376
241.84486178003431e-073.68972356006863e-070.999999815513822
255.3906981111823e-081.07813962223646e-070.99999994609302
261.79342624797815e-083.58685249595630e-080.999999982065737
273.27734309671591e-096.55468619343183e-090.999999996722657
282.40186191803172e-094.80372383606344e-090.999999997598138
292.80256551099467e-095.60513102198934e-090.999999997197434
302.74774158062368e-095.49548316124736e-090.999999997252258
317.97937141125204e-101.59587428225041e-090.999999999202063
321.56811960666544e-103.13623921333088e-100.999999999843188
333.13713750282095e-116.2742750056419e-110.999999999968629
346.24730978135797e-121.24946195627159e-110.999999999993753
351.48142362273554e-122.96284724547109e-120.999999999998519
363.81022197378446e-137.62044394756892e-130.99999999999962
378.57651640657879e-141.71530328131576e-130.999999999999914
381.92954991415666e-143.85909982831332e-140.99999999999998
394.9480375167603e-159.8960750335206e-150.999999999999995
401.72171644851950e-153.44343289703901e-150.999999999999998
417.07151043551988e-161.41430208710398e-151
422.07800040284648e-164.15600080569297e-161
431.06680380420308e-162.13360760840616e-161
441.00173258752738e-162.00346517505476e-161
452.30861232658917e-164.61722465317834e-161
463.53418553291179e-167.06837106582358e-161
471.16258660900286e-152.32517321800573e-150.999999999999999
487.74486287638521e-151.54897257527704e-140.999999999999992
492.97262736933135e-145.94525473866271e-140.99999999999997
508.77254367801041e-131.75450873560208e-120.999999999999123
513.73030783539989e-127.46061567079979e-120.99999999999627
524.99030113211587e-129.98060226423175e-120.99999999999501
531.15619292870289e-112.31238585740579e-110.999999999988438
542.22650028628283e-114.45300057256567e-110.999999999977735
551.44769794951021e-102.89539589902042e-100.99999999985523
569.75876752696678e-101.95175350539336e-090.999999999024123
573.14019526985959e-096.28039053971919e-090.999999996859805
581.73028312757926e-083.46056625515851e-080.999999982697169
599.23403537489708e-081.84680707497942e-070.999999907659646
604.03128000171712e-078.06256000343425e-070.999999596872
611.06558296759934e-062.13116593519868e-060.999998934417032
621.41071172535471e-062.82142345070941e-060.999998589288275
631.58086608600030e-063.16173217200059e-060.999998419133914
642.1409321203181e-064.2818642406362e-060.99999785906788
653.37387765361794e-066.74775530723588e-060.999996626122346
663.69516834337618e-067.39033668675236e-060.999996304831657
673.64335883081229e-067.28671766162458e-060.99999635664117
684.65152928012284e-069.30305856024567e-060.99999534847072
697.00336214059825e-061.40067242811965e-050.99999299663786
701.5067915636696e-053.0135831273392e-050.999984932084363
713.2452083567286e-056.4904167134572e-050.999967547916433
723.26741021699308e-056.53482043398616e-050.99996732589783
732.67618913348015e-055.35237826696031e-050.999973238108665
741.45207967128720e-052.90415934257441e-050.999985479203287
756.5287515557391e-061.30575031114782e-050.999993471248444
764.92067900106984e-069.84135800213968e-060.999995079320999
774.91829947946793e-069.83659895893586e-060.99999508170052
784.39570094573748e-068.79140189147495e-060.999995604299054
795.40159234119982e-061.08031846823996e-050.99999459840766
807.52033496860831e-061.50406699372166e-050.999992479665031
813.61890072221355e-057.2378014444271e-050.999963810992778
820.0004120394110095890.0008240788220191780.99958796058899
830.009409235703350640.01881847140670130.99059076429665


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level660.970588235294118NOK
5% type I error level681NOK
10% type I error level681NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229182071vzkc2uj90md27ak/10to4j1229181967.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229182071vzkc2uj90md27ak/10to4j1229181967.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229182071vzkc2uj90md27ak/19ag81229181967.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229182071vzkc2uj90md27ak/19ag81229181967.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229182071vzkc2uj90md27ak/2nwki1229181967.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229182071vzkc2uj90md27ak/2nwki1229181967.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229182071vzkc2uj90md27ak/3x3f71229181967.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229182071vzkc2uj90md27ak/3x3f71229181967.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229182071vzkc2uj90md27ak/4ljdd1229181967.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229182071vzkc2uj90md27ak/4ljdd1229181967.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229182071vzkc2uj90md27ak/5i8n61229181967.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229182071vzkc2uj90md27ak/5i8n61229181967.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229182071vzkc2uj90md27ak/6loo31229181967.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229182071vzkc2uj90md27ak/6loo31229181967.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229182071vzkc2uj90md27ak/77an71229181967.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229182071vzkc2uj90md27ak/77an71229181967.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229182071vzkc2uj90md27ak/8whb41229181967.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229182071vzkc2uj90md27ak/8whb41229181967.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229182071vzkc2uj90md27ak/9vfdr1229181967.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229182071vzkc2uj90md27ak/9vfdr1229181967.ps (open in new window)


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