Home » date » 2008 » Nov » 27 »

*Unverified author*
R Software Module: rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Thu, 27 Nov 2008 13:01:56 -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/Nov/27/t12278163509ba9muabxbjjfca.htm/, Retrieved Thu, 27 Nov 2008 20:05:50 +0000
 
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/Nov/27/t12278163509ba9muabxbjjfca.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},
}
 
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
 
Feedback Forum:
2008-11-27 13:41:43 [a2386b643d711541400692649981f2dc] [reply
test

Post a new message
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
1.43 0 1.43 0 1.43 0 1.43 0 1.43 0 1.43 0 1.43 0 1.43 0 1.43 0 1.43 0 1.43 0 1.43 0 1.43 0 1.43 0 1.43 0 1.43 0 1.43 0 1.43 0 1.44 0 1.48 0 1.48 0 1.48 0 1.48 0 1.48 0 1.48 0 1.48 0 1.48 0 1.48 0 1.48 0 1.48 0 1.48 0 1.48 0 1.48 0 1.48 0 1.48 0 1.48 0 1.48 0 1.48 0 1.48 0 1.48 0 1.48 0 1.48 0 1.48 0 1.48 0 1.48 0 1.48 0 1.48 0 1.48 0 1.48 0 1.57 1 1.58 1 1.58 1 1.58 1 1.58 1 1.59 1 1.6 1 1.6 1 1.61 1 1.61 1 1.61 1 1.62 1 1.63 1 1.63 1 1.64 1 1.64 1 1.64 1 1.64 1 1.64 1 1.65 1 1.65 1 1.65 1 1.65 1 1.65 1 1.66 1 1.66 1 1.67 1 1.68 1 1.68 1 1.68 1 1.68 1 1.69 1 1.7 1 1.7 1 1.71 1 1.72 1 1.73 1 1.74 1 1.74 1 1.75 1 1.75 1 1.75 1 1.76 1 1.79 1 1.83 1 1.84 1 1.85 1
 
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 time5 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
Y[t] = + 1.38886855205562 + 0.064639945069093X[t] -0.0082963729865816M1[t] -0.00443306010928969M2[t] -0.00498975409836072M3[t] -0.00554644808743174M4[t] -0.00610314207650277M5[t] -0.0091598360655738M6[t] -0.00971653005464484M7[t] -0.00527322404371587M8[t] -0.0020799180327869M9[t] + 0.00236338797814207M10[t] + 0.000556693989071041M11[t] + 0.00305669398907103t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)1.388868552055620.013597102.145700
X0.0646399450690930.013094.93824e-062e-06
M1-0.00829637298658160.015799-0.52510.6009210.300461
M2-0.004433060109289690.015912-0.27860.7812550.390628
M3-0.004989754098360720.015878-0.31420.7541310.377065
M4-0.005546448087431740.015848-0.350.7272560.363628
M5-0.006103142076502770.015821-0.38580.700680.35034
M6-0.00915983606557380.015798-0.57980.563640.28182
M7-0.009716530054644840.015779-0.61580.5397310.269866
M8-0.005273224043715870.015763-0.33450.7388260.369413
M9-0.00207991803278690.01575-0.13210.8952620.447631
M100.002363387978142070.0157410.15010.8810220.440511
M110.0005566939890710410.0157360.03540.9718650.485932
t0.003056693989071030.00023712.874900


Multiple Linear Regression - Regression Statistics
Multiple R0.96904457174087
R-squared0.939047382020445
Adjusted R-squared0.929384162096857
F-TEST (value)97.1774821897844
F-TEST (DF numerator)13
F-TEST (DF denominator)82
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.0314679069865167
Sum Squared Residuals0.0811987919491892


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11.431.383628873058100.0463711269418962
21.431.390548879924470.0394511200755299
31.431.393048879924470.0369511200755299
41.431.395548879924470.0344511200755299
51.431.398048879924470.0319511200755299
61.431.398048879924470.0319511200755299
71.431.400548879924470.0294511200755299
81.431.408048879924470.0219511200755299
91.431.414298879924470.0157011200755299
101.431.421798879924470.00820112007552986
111.431.423048879924470.00695112007552987
121.431.425548879924470.00445112007552987
131.431.420309200926960.00969079907304043
141.431.427229207793320.0027707922066774
151.431.429729207793320.000270792206677471
161.431.43222920779332-0.00222920779332253
171.431.43472920779332-0.00472920779332254
181.431.43472920779332-0.00472920779332254
191.441.437229207793320.00277079220667747
201.481.444729207793320.0352707922066775
211.481.450979207793320.0290207922066775
221.481.458479207793320.0215207922066775
231.481.459729207793320.0202707922066775
241.481.462229207793320.0177707922066775
251.481.456989528795810.0230104712041881
261.481.463909535662170.0160904643378251
271.481.466409535662170.0135904643378251
281.481.468909535662170.0110904643378251
291.481.471409535662170.0085904643378251
301.481.471409535662170.0085904643378251
311.481.473909535662170.0060904643378251
321.481.48140953566217-0.00140953566217490
331.481.48765953566217-0.00765953566217491
341.481.49515953566217-0.0151595356621749
351.481.49640953566217-0.0164095356621749
361.481.49890953566217-0.0189095356621749
371.481.49366985666466-0.0136698566646643
381.481.50058986353103-0.0205898635310273
391.481.50308986353103-0.0230898635310273
401.481.50558986353103-0.0255898635310273
411.481.50808986353103-0.0280898635310273
421.481.50808986353103-0.0280898635310273
431.481.51058986353103-0.0305898635310273
441.481.51808986353103-0.0380898635310273
451.481.52433986353103-0.0443398635310273
461.481.53183986353103-0.0518398635310273
471.481.53308986353103-0.0530898635310273
481.481.53558986353103-0.0555898635310273
491.481.53035018453352-0.0503501845335167
501.571.60191013646897-0.0319101364689726
511.581.60441013646897-0.0244101364689726
521.581.60691013646897-0.0269101364689726
531.581.60941013646897-0.0294101364689726
541.581.60941013646897-0.0294101364689726
551.591.61191013646897-0.0219101364689726
561.61.61941013646897-0.0194101364689726
571.61.62566013646897-0.0256601364689726
581.611.63316013646897-0.0231601364689726
591.611.63441013646897-0.0244101364689726
601.611.63691013646897-0.0269101364689726
611.621.63167045747146-0.0116704574714620
621.631.63859046433783-0.00859046433782516
631.631.64109046433783-0.0110904643378252
641.641.64359046433783-0.00359046433782517
651.641.64609046433783-0.00609046433782518
661.641.64609046433783-0.00609046433782518
671.641.64859046433783-0.00859046433782518
681.641.65609046433783-0.0160904643378252
691.651.66234046433783-0.0123404643378252
701.651.66984046433783-0.0198404643378252
711.651.67109046433783-0.0210904643378252
721.651.67359046433782-0.0235904643378252
731.651.66835078534031-0.0183507853403146
741.661.67527079220668-0.0152707922066775
751.661.67777079220668-0.0177707922066776
761.671.68027079220668-0.0102707922066775
771.681.68277079220668-0.00277079220667754
781.681.68277079220668-0.00277079220667753
791.681.68527079220668-0.00527079220667753
801.681.69277079220668-0.0127707922066775
811.691.69902079220668-0.00902079220667754
821.71.70652079220668-0.00652079220667754
831.71.70777079220668-0.00777079220667754
841.711.71027079220668-0.000270792206677525
851.721.705031113209170.0149688867908331
861.731.711951120075530.0180488799244701
871.741.714451120075530.0255488799244701
881.741.716951120075530.0230488799244701
891.751.719451120075530.0305488799244701
901.751.719451120075530.0305488799244701
911.751.721951120075530.0280488799244701
921.761.729451120075530.0305488799244701
931.791.735701120075530.0542988799244702
941.831.743201120075530.0867988799244702
951.841.744451120075530.0955488799244702
961.851.746951120075530.103048879924470


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
174.9252689411005e-439.850537882201e-431
181.31474232953445e-562.62948465906889e-561
192.42211935908881e-054.84423871817762e-050.99997577880641
200.02422993112724460.04845986225448910.975770068872755
210.05403111089058850.1080622217811770.945968889109411
220.07188277367396730.1437655473479350.928117226326033
230.0815451952697980.1630903905395960.918454804730202
240.0858387601200670.1716775202401340.914161239879933
250.08155842716817640.1631168543363530.918441572831824
260.06873316101008070.1374663220201610.93126683898992
270.05723580908307360.1144716181661470.942764190916926
280.04743619189624360.09487238379248720.952563808103756
290.03926722210824210.07853444421648410.960732777891758
300.03424422958409360.06848845916818710.965755770415906
310.03021533714444150.0604306742888830.969784662855558
320.03496208951910920.06992417903821840.96503791048089
330.03642053088262740.07284106176525480.963579469117373
340.03327432199376040.06654864398752080.96672567800624
350.03021834343933190.06043668687866390.969781656560668
360.02668417194526900.05336834389053790.973315828054731
370.03220574439122270.06441148878244530.967794255608777
380.02969643226927690.05939286453855390.970303567730723
390.02595176371856410.05190352743712820.974048236281436
400.02158527554231230.04317055108462470.978414724457688
410.01712051706952960.03424103413905910.98287948293047
420.01387000694985470.02774001389970950.986129993050145
430.01206094573451560.02412189146903110.987939054265484
440.01547769152991790.03095538305983580.984522308470082
450.01640419792350020.03280839584700040.9835958020765
460.01520649961252650.03041299922505300.984793500387473
470.01337273852209220.02674547704418440.986627261477908
480.01154575761886150.02309151523772310.988454242381138
490.009587536924923730.01917507384984750.990412463075076
500.006404849314565880.01280969862913180.993595150685434
510.004904641494354180.009809282988708350.995095358505646
520.003329191875020150.00665838375004030.99667080812498
530.002060839121453670.004121678242907340.997939160878546
540.00125395235208770.00250790470417540.998746047647912
550.0009688968763177060.001937793752635410.999031103123682
560.0009392664182229570.001878532836445910.999060733581777
570.0006264166137629380.001252833227525880.999373583386237
580.0004578530407767330.0009157060815534660.999542146959223
590.0003063202295069530.0006126404590139050.999693679770493
600.0001854238685459890.0003708477370919770.999814576131454
610.0002664784514468420.0005329569028936830.999733521548553
620.0006062150297470080.001212430059494020.999393784970253
630.001021700890717960.002043401781435920.998978299109282
640.003343227889061040.006686455778122090.996656772110939
650.006933520059940110.01386704011988020.99306647994006
660.01485120903096840.02970241806193690.985148790969032
670.03289870773712090.06579741547424190.96710129226288
680.06343834555373360.1268766911074670.936561654446266
690.1113535773497040.2227071546994090.888646422650295
700.09850264424093810.1970052884818760.901497355759062
710.08108857645681490.1621771529136300.918911423543185
720.05815498588127320.1163099717625460.941845014118727
730.04855814091896090.09711628183792180.95144185908104
740.04566156956256210.09132313912512420.954338430437438
750.03363459048128640.06726918096257280.966365409518714
760.03641819244762820.07283638489525650.963581807552372
770.04956327192898970.09912654385797940.95043672807101
780.07815352146252730.1563070429250550.921846478537473
790.1713671736530720.3427343473061440.828632826346928


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level170.26984126984127NOK
5% type I error level310.492063492063492NOK
10% type I error level490.777777777777778NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12278163509ba9muabxbjjfca/10mkhu1227816104.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12278163509ba9muabxbjjfca/10mkhu1227816104.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12278163509ba9muabxbjjfca/1ml1b1227816104.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12278163509ba9muabxbjjfca/1ml1b1227816104.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12278163509ba9muabxbjjfca/2j9m71227816104.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12278163509ba9muabxbjjfca/2j9m71227816104.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12278163509ba9muabxbjjfca/3pqi81227816104.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12278163509ba9muabxbjjfca/3pqi81227816104.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12278163509ba9muabxbjjfca/4ssjz1227816104.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12278163509ba9muabxbjjfca/4ssjz1227816104.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12278163509ba9muabxbjjfca/5jjmt1227816104.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12278163509ba9muabxbjjfca/5jjmt1227816104.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12278163509ba9muabxbjjfca/609rr1227816104.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12278163509ba9muabxbjjfca/609rr1227816104.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12278163509ba9muabxbjjfca/7wr6f1227816104.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12278163509ba9muabxbjjfca/7wr6f1227816104.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12278163509ba9muabxbjjfca/8twvc1227816104.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12278163509ba9muabxbjjfca/8twvc1227816104.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12278163509ba9muabxbjjfca/9i7za1227816104.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12278163509ba9muabxbjjfca/9i7za1227816104.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