Home » date » 2009 » Nov » 20 »

Workshop 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 09:10:52 -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/t1258733487ehmsf2to1dydc2j.htm/, Retrieved Fri, 20 Nov 2009 17:11:40 +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/t1258733487ehmsf2to1dydc2j.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 «
45 64 64 62 64 62 45 69 64 64 62 64 49 69 69 64 64 62 50 65 69 69 64 64 54 56 65 69 69 64 59 58 56 65 69 69 58 53 58 56 65 69 56 62 53 58 56 65 48 55 62 53 58 56 50 60 55 62 53 58 52 59 60 55 62 53 53 58 59 60 55 62 55 53 58 59 60 55 43 57 53 58 59 60 42 57 57 53 58 59 38 53 57 57 53 58 41 54 53 57 57 53 41 53 54 53 57 57 39 57 53 54 53 57 34 57 57 53 54 53 27 55 57 57 53 54 15 49 55 57 57 53 14 50 49 55 57 57 31 49 50 49 55 57 41 54 49 50 49 55 43 58 54 49 50 49 46 58 58 54 49 50 42 52 58 58 54 49 45 56 52 58 58 54 45 52 56 52 58 58 40 59 52 56 52 58 35 53 59 52 56 52 36 52 53 59 52 56 38 53 52 53 59 52 39 51 53 52 53 59 32 50 51 53 52 53 24 56 50 51 53 52 21 52 56 50 51 53 12 46 52 56 50 51 29 48 46 52 56 50 36 46 48 46 52 56 31 48 46 48 46 52 28 48 48 46 48 46 30 49 48 48 46 48 38 53 49 48 48 46 27 48 53 49 48 48 40 51 48 53 49 48 40 48 51 48 53 49 44 50 48 51 48 53 47 55 50 48 51 48 45 52 55 50 48 51 42 53 52 55 50 48 38 52 53 52 55 50 46 55 52 53 52 55 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 time9 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Y[t] = + 14.9840080784092 + 0.128775996030082X[t] + 0.322177095577494Y1[t] + 0.306776902898658Y2[t] -0.0185667559362691Y3[t] + 0.0387471558376612Y4[t] + 1.23353128598870M1[t] + 2.06185157166443M2[t] -0.0664360866287527M3[t] -2.62061359157391M4[t] -1.34841144304865M5[t] + 0.113812162922448M6[t] + 0.0743039899866369M7[t] + 0.0868559660332346M8[t] + 0.37792301509465M9[t] -0.439014422798539M10[t] -2.34191110722947M11[t] -0.0278283031022919t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)14.98400807840924.9561963.02330.0031840.001592
X0.1287759960300820.0333523.86110.0002010.000101
Y10.3221770955774940.0957073.36630.0010860.000543
Y20.3067769028986580.1008273.04260.0030030.001502
Y3-0.01856675593626910.100796-0.18420.8542330.427116
Y40.03874715583766120.0935650.41410.6796810.339841
M11.233531285988701.40890.87550.3834060.191703
M22.061851571664431.4464691.42540.1571760.078588
M3-0.06643608662875271.471872-0.04510.9640890.482044
M4-2.620613591573911.420501-1.84490.0680490.034024
M5-1.348411443048651.383135-0.97490.3319890.165994
M60.1138121629224481.4017630.08120.9354530.467727
M70.07430398998663691.4202770.05230.9583820.479191
M80.08685596603323461.4112490.06150.9510490.475524
M90.377923015094651.4056040.26890.788590.394295
M10-0.4390144227985391.437652-0.30540.7607260.380363
M11-2.341911107229471.423159-1.64560.1030230.051512
t-0.02782830310229190.015057-1.84820.0675590.03378


Multiple Linear Regression - Regression Statistics
Multiple R0.909930197363436
R-squared0.827972964073862
Adjusted R-squared0.798432968005737
F-TEST (value)28.0288786147568
F-TEST (DF numerator)17
F-TEST (DF denominator)99
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.98603176154760
Sum Squared Residuals882.722182416138


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
16462.83818426133971.16181573866032
26964.36685787325814.63314212674191
36964.22210355032264.77789644967742
46563.38025256447381.61974743552617
55663.7581882320258-7.7581882320258
65861.9034978224413-3.90349782244125
75359.6650144391852-6.66501443918521
86258.4069666280553.59303337194503
95558.6198488370661-3.6198488370661
106058.70871563653291.29128436346708
115956.1381532160422.861846783958
125860.2714111292079-2.27141112920789
135360.7416482351333-7.74164823513333
145758.2914684196842-1.29146841968424
155755.7412199301741.25878006982603
165353.9253043734445-0.925304373444513
175453.99929502171440.000704978285632499
185354.6837484319167-1.68374843191669
195754.41772679488472.58227320511534
205754.5669465878032.43305341219704
215555.2131748849201-0.213174884920069
224952.0657288208259-3.06572882082588
235047.61460008135102.38539991864905
244950.6365240080476-1.63652400804760
255453.14849298249830.851507017501724
265855.25959584115852.74040415884154
275856.36971467643041.63028532356958
285254.3681315603383-2.36813156033827
295654.18523957582971.81476042417025
305255.2226704669672-3.22267046696723
315954.5612537756814.43874622431901
325354.6234795671517-1.62347956715167
335255.4591257030622-3.45912570306223
345352.42411752625290.575882473747049
355151.0201993539099-0.0201993539098883
365051.8813567184805-1.88135671848047
375651.06380691997754.93619308002252
385253.1801372527372-1.18013725273718
394650.3580628064139-4.35806280641388
404846.6549310543631.34506894563704
414647.9111796045306-1.91117960453058
424848.6273064541583-0.627306454158276
434847.93482592848910.0651740715109061
444948.90528322283870.0947167771612615
455350.40627920906812.59372079093185
464849.8179571086257-1.81795710862572
475149.15897544725451.84102455274554
484850.8701851557134-2.87018515571341
495052.7926139477156-2.79261394771563
505553.45402135384121.54597864615878
515253.4367344193922-1.43673441939215
525350.88237887162972.11762112837025
535250.99815565180791.00184434819212
545553.69679477723561.30320522276438
555352.99542049731140.00457950268864583
565353.8285385836909-0.828538583690902
575653.25500010417622.74499989582384
585452.62870865708811.37129134291189
595251.02524187145060.974758128549368
605552.28326840287692.71673159712314
615453.9953238460840.00467615391604688
625955.61116063403333.38883936596674
635655.14106265226280.85893734773721
645652.35978632321483.64021367678517
655151.264488564122-0.264488564121994
665351.20865844007041.79134155992963
675249.87799818112082.12200181887918
685150.89081232411670.109187675883303
694649.006467820238-3.00646782023800
704948.01418871445910.985811285540944
714645.49593009926360.504069900736368
725548.33300293331836.66699706668169
735751.65486100879935.34513899120068
745355.9038650479074-2.90386504790738
755252.4029242509696-0.402924250969596
765348.58322462641644.41677537358357
775049.99475999993860.00524000006136917
785451.14808303567962.85191696432043
795351.77813830957181.22186169042822
805052.1183599420293-2.11835994202929
815151.1753339991594-0.175333999159375
825250.67862600051281.32137399948718
834749.2650321273968-2.26503212739681
845148.98121416881522.01878583118481
854950.7345773956002-1.73457739560016
865352.37817973016230.621820269837660
875250.24288755425591.75711244574411
884549.6593663696593-4.65936636965934
895347.93241031566065.06758968433937
905150.09911543817580.900884561824224
914851.5465321417979-3.54653214179793
924848.2436466235578-0.243646623557837
934847.93366541939480.0663345806051861
944847.19588163056290.8041183694371
954043.4748272271256-3.47482722712563
964343.9841492428134-0.98414924281335
974043.4446162971828-3.44461629718281
983944.8625457333302-5.86254573333022
993941.3557964452113-2.35579644521135
1003637.9950754894366-1.99507548943662
1014137.40258736036993.5974126396301
1023938.84491029644210.155089703557867
1034039.33647642346090.663523576539106
1043940.1085080992919-1.10850809929187
1054640.84476793569325.15523206430684
1064041.4660759051396-1.46607590513964
1073739.807040576206-2.80704057620599
1083738.7588882407270-1.75888824072695
1094440.58587510566943.41412489433064
1104142.6921681138876-1.69216811388761
1114041.7294937145674-1.72949371456736
1123639.1915487670235-3.19154876702346
1133839.5536956740005-1.55369567400047
1144340.56521483691312.43478516308691
1154242.8866135084973-0.886613508497264
1164545.3074584214651-0.307458421465081
1174646.0863360872219-0.0863360872219225


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
210.2859946584547940.5719893169095890.714005341545206
220.1970325868538220.3940651737076440.802967413146178
230.1872653928399090.3745307856798180.812734607160091
240.1970756574486540.3941513148973080.802924342551346
250.765610127815880.4687797443682410.234389872184121
260.7269259582841020.5461480834317950.273074041715898
270.6657401668786430.6685196662427140.334259833121357
280.6095380966466680.7809238067066650.390461903353332
290.910431816551990.1791363668960190.0895681834480097
300.8955142892753960.2089714214492080.104485710724604
310.915202850310090.1695942993798200.0847971496899102
320.889406574692060.2211868506158810.110593425307940
330.8758088509026460.2483822981947090.124191149097354
340.9461397973430690.1077204053138630.0538602026569314
350.9364403840410470.1271192319179050.0635596159589526
360.9179778240185650.1640443519628710.0820221759814355
370.9603785646336570.07924287073268580.0396214353663429
380.958120927395110.08375814520977950.0418790726048898
390.9874076460036220.02518470799275570.0125923539963778
400.9848226371362380.03035472572752370.0151773628637619
410.9810847127609850.03783057447803010.0189152872390150
420.9751517761814130.04969644763717450.0248482238185873
430.964624871676660.0707502566466780.035375128323339
440.952564237494550.09487152501089840.0474357625054492
450.9552641032344240.08947179353115120.0447358967655756
460.9463945006146950.1072109987706110.0536054993853054
470.929590294303880.1408194113922410.0704097056961207
480.94470210467150.1105957906569980.0552978953284992
490.955895621184740.0882087576305180.044104378815259
500.940270430204740.1194591395905190.0597295697952597
510.9345669931942170.1308660136115660.0654330068057828
520.9211238887248920.1577522225502160.0788761112751082
530.9286200063412830.1427599873174340.0713799936587169
540.9393377150691790.1213245698616420.060662284930821
550.9314449145011390.1371101709977230.0685550854988615
560.9283115459238960.1433769081522090.0716884540761044
570.9349657376756330.1300685246487350.0650342623243674
580.9228215862308550.1543568275382900.0771784137691452
590.8978821390169480.2042357219661040.102117860983052
600.9014153343417750.1971693313164500.0985846656582248
610.8908181036202440.2183637927595120.109181896379756
620.8794450833764360.2411098332471270.120554916623564
630.8460415183977920.3079169632044150.153958481602208
640.8535319683063430.2929360633873140.146468031693657
650.8263691209464010.3472617581071970.173630879053599
660.7909939832763620.4180120334472750.209006016723638
670.7583869349916630.4832261300166740.241613065008337
680.7115614180855570.5768771638288870.288438581914443
690.7967176495256410.4065647009487170.203282350474359
700.7696726437857840.4606547124284330.230327356214216
710.7236662397862450.552667520427510.276333760213755
720.777034796830990.445930406338020.22296520316901
730.8069249605217830.3861500789564350.193075039478217
740.8174855632284810.3650288735430380.182514436771519
750.7771101562375690.4457796875248620.222889843762431
760.9165221838035960.1669556323928090.0834778161964043
770.8904000479955820.2191999040088350.109599952004418
780.8590433167206320.2819133665587370.140956683279368
790.8281723377971890.3436553244056230.171827662202811
800.8034634228481690.3930731543036630.196536577151831
810.7987136134164530.4025727731670940.201286386583547
820.7392214031257650.521557193748470.260778596874235
830.6980499128183540.6039001743632920.301950087181646
840.6469497218486280.7061005563027450.353050278151372
850.6374092618665140.7251814762669720.362590738133486
860.6146482911342610.7707034177314780.385351708865739
870.6605084140740520.6789831718518960.339491585925948
880.6407451150384160.7185097699231670.359254884961583
890.7595617891007740.4808764217984530.240438210899226
900.7294226419813140.5411547160373720.270577358018686
910.6614908722680950.677018255463810.338509127731905
920.6597579345187470.6804841309625050.340242065481253
930.543539050746170.9129218985076590.456460949253829
940.5899910583569260.8200178832861470.410008941643074
950.6949684030503990.6100631938992020.305031596949601
960.9026596831074640.1946806337850730.0973403168925365


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level40.0526315789473684NOK
10% type I error level100.131578947368421NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258733487ehmsf2to1dydc2j/10m3zc1258733442.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258733487ehmsf2to1dydc2j/10m3zc1258733442.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t1258733487ehmsf2to1dydc2j/1j2vf1258733442.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258733487ehmsf2to1dydc2j/1j2vf1258733442.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t1258733487ehmsf2to1dydc2j/2pz3p1258733442.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258733487ehmsf2to1dydc2j/2pz3p1258733442.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t1258733487ehmsf2to1dydc2j/320oz1258733442.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258733487ehmsf2to1dydc2j/320oz1258733442.ps (open in new window)


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


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


http://www.freestatistics.org/blog/date/2009/Nov/20/t1258733487ehmsf2to1dydc2j/6v9pc1258733442.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258733487ehmsf2to1dydc2j/6v9pc1258733442.ps (open in new window)


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


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


http://www.freestatistics.org/blog/date/2009/Nov/20/t1258733487ehmsf2to1dydc2j/9w4791258733442.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258733487ehmsf2to1dydc2j/9w4791258733442.ps (open in new window)


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