Home » date » 2010 » Nov » 23 »

WS 7 (4)

*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: Tue, 23 Nov 2010 10:06:44 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506730fixmk3j74232bop.htm/, Retrieved Tue, 23 Nov 2010 11:05:33 +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/2010/Nov/23/t1290506730fixmk3j74232bop.htm/},
    year = {2010},
}
@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 = {2010},
    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 «
0 1.3954 1.0685 0 1.4790 1.1010 0 1.4619 1.0996 0 1.4670 1.0978 0 1.4799 1.0893 0 1.4508 1.1018 0 1.4678 1.0931 0 1.4824 1.0842 0 1.5189 1.0409 0 1.5348 1.0245 0 1.5666 0.9994 0 1.5446 1.0090 0 1.5803 0.9947 0 1.5718 1.0080 0 1.5832 0.9986 0 1.5801 1.0184 0 1.5605 1.0357 0 1.5416 1.0556 0 1.5479 1.0409 0 1.5580 1.0474 0 1.5790 1.0219 0 1.5554 1.0427 0 1.5761 1.0205 0 1.5360 1.0490 0 1.5621 1.0344 0 1.5773 1.0193 0 1.5710 1.0238 0 1.5925 1.0165 0 1.5844 1.0218 0 1.5696 1.0370 0 1.5540 1.0508 0 1.5012 1.0813 0 1.4676 1.0970 0 1.4770 1.0989 0 1.4660 1.1018 0 1.4241 1.1166 0 1.4214 1.1319 1 1.4469 1.1020 1 1.4618 1.0884 1 1.3834 1.1263 1 1.3412 1.1345 1 1.3437 1.1337 1 1.2630 1.1660 1 1.2759 1.1550 1 1.2743 1.1782 1 1.2797 1.1856 1 1.2573 1.2219 1 1.2705 1.2130 1 1.2680 1.2230 1 1.3371 1.1767 1 1.3885 1.1077 1 1.4060 1.0672 1 1.3855 1.0840 1 1.3431 1.1154 1 1.3 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 time7 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
eu/us[t] = + 2.8265990970667 -0.0835405630382506Crisis[t] -1.23598378810765`us/ch`[t] -3.73098538767963e-05t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)2.82659909706670.06246445.25200
Crisis-0.08354056303825060.012012-6.954700
`us/ch`-1.235983788107650.057024-21.674900
t-3.73098538767963e-050.000174-0.2140.8309610.415481


Multiple Linear Regression - Regression Statistics
Multiple R0.9734892777905
R-squared0.947681373973069
Adjusted R-squared0.94612735537821
F-TEST (value)609.826276923566
F-TEST (DF numerator)3
F-TEST (DF denominator)101
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.0223779855757989
Sum Squared Residuals0.050578198081497


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11.39541.50591310961979-0.110513109619787
21.4791.465706326652420.0132936733475817
31.46191.46739939410189-0.00549939410189227
41.4671.46958685506661-0.00258685506660896
51.47991.48005540741165-0.000155407411647522
61.45081.46456830020643-0.013768300206425
71.46781.47528404930908-0.00748404930908482
81.48241.48624699516937-0.00384699516936607
91.51891.53972778334055-0.0208277833405508
101.53481.55996060761164-0.0251606076116395
111.56661.59094649083926-0.0243464908392647
121.54461.57904373661955-0.0344437366195546
131.58031.59668099493562-0.016380994935617
141.57181.58020510069991-0.00840510069990837
151.58321.59178603845424-0.00858603845424362
161.58011.567276249595840.0128237504041648
171.56051.54585642020770.014643579792304
181.54161.521223032970480.0203769670295232
191.54791.539354684801780.00854531519821726
201.5581.531283480325210.026716519674794
211.5791.562763757068070.0162362429319255
221.55541.537017984421560.0183820155784413
231.57611.564419514663670.0116804853363284
241.5361.529156666848730.00684333315127321
251.56211.547164720301220.0149352796987784
261.57731.565790765647770.0115092343522296
271.5711.560191528747410.0108084712525908
281.59251.569176900546720.0233230994532817
291.58441.562588876615870.0218111233841292
301.56961.543764613182760.0258353868172422
311.5541.5266707270530.0273292729470046
321.50121.488935911661840.0122640883381648
331.46761.46949365633467-0.00189365633466822
341.4771.467107977283390.0098920227166132
351.4661.4634863144440.00251368555600195
361.42411.44515644452613-0.0210564445261279
371.42141.4262085827142-0.00480858271420407
381.44691.37958662508650.0673133749135048
391.46181.396358694750880.0654413052491173
401.38341.349477599327730.0339224006722742
411.34121.339305222411370.00189477758863372
421.34371.340256699587980.00344330041202418
431.2631.30029711337822-0.0372971133782218
441.27591.31385562519353-0.0379556251935289
451.27431.28514349145555-0.0108434914555548
461.27971.275959901569680.00374009843031882
471.25731.23105638020750.0262436197925034
481.27051.242019326067780.0284806739322221
491.2681.229622178332820.0383778216671755
501.33711.286810917868330.0502890821316679
511.38851.372056489393880.0164435106061165
521.4061.42207652295837-0.0160765229583668
531.38551.40127468546428-0.0157746854642812
541.34311.36242748466382-0.0193274846638242
551.32571.35868222344562-0.0329822234456242
561.29781.31093593937079-0.013135939370792
571.27931.30410071868232-0.024800718682323
581.29451.30381621207082-0.00931621207082485
591.2891.30983522277868-0.0208352227786758
601.28481.31535983997128-0.0305598399712833
611.26941.29665917491698-0.0272591749169807
621.26361.30737492401964-0.0437749240196407
631.291.271370485931830.0186295140681689
641.35591.344503416333930.0113965836660725
651.33051.328645513992270.00185448600772739
661.34821.341833230671150.00636676932885215
671.31461.309165948811230.00543405118877091
681.30271.297881186485570.00481881351442748
691.32471.33257502107752-0.0078750210775208
701.32671.33674005610321-0.0100400561032101
711.36211.37279347286208-0.0106934728620766
721.34791.3521152337468-0.00421523374680203
731.40111.399910496492690.00118950350730856
741.41351.42076131265783-0.00726131265783391
751.39641.39761110596634-0.00121110596634396
761.4011.40634928100803-0.00534928100803171
771.39551.40544678250248-0.00994678250247943
781.40771.403184701830010.00451529816999115
791.39751.396720276277970.000779723722027607
801.39491.39989652427318-0.00499652427317535
811.41381.411724658785130.00207534121486782
821.4211.416136890568440.0048631094315571
831.42531.418942343427210.00635765657278631
841.41691.401601260539830.0152987394601703
851.41741.411699017748440.0057009822515643
861.43461.433662219322880.000937780677124924
871.42961.42966976134705-6.97613470537839e-05
881.43111.430497640144850.000602359855147532
891.45941.458022768765780.00137723123422367
901.47221.468120525974380.00407947402561763
911.46691.46721802746883-0.000318027468829886
921.45711.46013561002274-0.00303561002273971
931.47091.463559054775560.00734094522443578
941.48931.480578321197570.0087216788024269
951.49971.491912062194290.0077879378057134
961.47131.47160461821544-0.000304618215444314
971.48461.482443965696920.00215603430308485
981.49141.488957369920010.0024426300799914
991.48591.481751354095110.00414864590489256
1001.49571.495433464289230.000266535710774298
1011.48431.482541923039030.00175807696097056
1021.46191.46124569202970.000654307970299132
1031.4341.45094971673453-0.0169497167345306
1041.44261.45919349826097-0.0165934982609748
1051.43181.46014497543758-0.0283449754375845


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
70.774383394983940.4512332100321190.225616605016059
80.7579992395746250.484001520850750.242000760425375
90.9463346118888130.1073307762223750.0536653881111874
100.9387089017381340.1225821965237320.0612910982618662
110.9400036540246960.1199926919506080.0599963459753042
120.9339672583029750.132065483394050.0660327416970248
130.9209802604206630.1580394791586730.0790197395793365
140.8932883804647660.2134232390704690.106711619535234
150.8651372662032290.2697254675935430.134862733796771
160.8183422892293580.3633154215412850.181657710770642
170.8125167910475740.3749664179048530.187483208952426
180.8256482429450540.3487035141098920.174351757054946
190.8299120304677750.3401759390644510.170087969532225
200.787524138790750.4249517224184990.21247586120925
210.7367594339129570.5264811321740860.263240566087043
220.7150720725676440.5698558548647110.284927927432356
230.6796746740677790.6406506518644410.320325325932221
240.7362778596053420.5274442807893160.263722140394658
250.7034149037625430.5931701924749150.296585096237457
260.6653108883506620.6693782232986770.334689111649338
270.6374503531980720.7250992936038560.362549646801928
280.5739932459725960.8520135080548080.426006754027404
290.5170343448397490.9659313103205020.482965655160251
300.472226761189660.944453522379320.52777323881034
310.4481023768154080.8962047536308160.551897623184592
320.5320366481385220.9359267037229560.467963351861478
330.6580660225958380.6838679548083240.341933977404162
340.6583200529004620.6833598941990760.341679947099538
350.6682807625840990.6634384748318020.331719237415901
360.7656705564333550.468658887133290.234329443566645
370.7464379537250190.5071240925499630.253562046274982
380.8278317788471250.3443364423057490.172168221152875
390.93139401945170.1372119610966010.0686059805483005
400.9640677677021910.0718644645956180.035932232297809
410.981077237513290.037845524973420.01892276248671
420.9855377934038550.02892441319229080.0144622065961454
430.9975566982862510.004886603427497170.00244330171374859
440.9994971165495670.001005766900866930.000502883450433463
450.9993225481697080.001354903660583660.000677451830291829
460.9988987001914960.002202599617008750.00110129980850438
470.9991032132203060.001793573559388050.000896786779694024
480.9993880063553660.001223987289268850.000611993644634427
490.9998742945010660.000251410997867730.000125705498933865
500.9999990840593171.83188136571279e-069.15940682856395e-07
510.9999996395364437.20927113265874e-073.60463556632937e-07
520.9999997544105214.91178957147809e-072.45589478573904e-07
530.9999997592674624.81465075259227e-072.40732537629614e-07
540.9999997797335634.40532873125863e-072.20266436562932e-07
550.9999999681946166.36107680791894e-083.18053840395947e-08
560.9999999499122051.0017559024552e-075.00877951227601e-08
570.9999999687456646.250867205792e-083.125433602896e-08
580.9999999378437271.24312545035866e-076.21562725179329e-08
590.9999999425427821.14914435378617e-075.74572176893087e-08
600.999999989136612.17267800605479e-081.0863390030274e-08
610.9999999967462066.5075882414319e-093.25379412071595e-09
620.9999999999993831.23290746591488e-126.1645373295744e-13
630.9999999999998962.08206348486043e-131.04103174243022e-13
640.999999999999784.39477377520254e-132.19738688760127e-13
650.9999999999992181.56399654240196e-127.8199827120098e-13
660.9999999999978184.36477102832621e-122.18238551416311e-12
670.999999999996686.6415370923481e-123.32076854617405e-12
680.9999999999984653.06931001054293e-121.53465500527146e-12
690.9999999999945371.09265163430817e-115.46325817154085e-12
700.9999999999817323.6536406329531e-111.82682031647655e-11
710.9999999999722285.55440681595651e-112.77720340797825e-11
720.999999999900681.98637474560796e-109.93187372803981e-11
730.9999999996675236.64954652279563e-103.32477326139781e-10
740.9999999998538472.92305850523509e-101.46152925261754e-10
750.9999999995844648.3107224252552e-104.1553612126276e-10
760.9999999995550198.89962929685978e-104.44981464842989e-10
770.9999999999145961.70807535200674e-108.54037676003369e-11
780.9999999996643786.71244236106391e-103.35622118053196e-10
790.9999999988043182.39136310554524e-091.19568155277262e-09
800.9999999983861673.22766664360217e-091.61383332180108e-09
810.9999999953469829.30603576160273e-094.65301788080137e-09
820.9999999831613163.36773679416142e-081.68386839708071e-08
830.999999935098821.29802361625884e-076.4901180812942e-08
840.9999999840123123.19753762582353e-081.59876881291176e-08
850.9999999763509284.72981442113844e-082.36490721056922e-08
860.9999998930030772.13993845681972e-071.06996922840986e-07
870.9999995550029978.89994006200225e-074.44997003100112e-07
880.9999987267999072.54640018587547e-061.27320009293774e-06
890.9999949012164261.01975671473276e-055.09878357366379e-06
900.9999808836391323.82327217368198e-051.91163608684099e-05
910.9999535350642059.29298715898294e-054.64649357949147e-05
920.9999184455009260.0001631089981485468.15544990742728e-05
930.9996773217682940.0006453564634125370.000322678231706268
940.9987890844453090.002421831109382950.00121091555469147
950.996048859467250.007902281065499280.00395114053274964
960.9902767544789450.01944649104210950.00972324552105474
970.9801830563491630.03963388730167440.0198169436508372
980.9626863625615750.07462727487684990.0373136374384249


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level530.576086956521739NOK
5% type I error level570.619565217391304NOK
10% type I error level590.641304347826087NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506730fixmk3j74232bop/10yh9m1290506793.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506730fixmk3j74232bop/10yh9m1290506793.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506730fixmk3j74232bop/1kque1290506793.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506730fixmk3j74232bop/1kque1290506793.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506730fixmk3j74232bop/2kque1290506793.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506730fixmk3j74232bop/2kque1290506793.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506730fixmk3j74232bop/3kque1290506793.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506730fixmk3j74232bop/3kque1290506793.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506730fixmk3j74232bop/4czby1290506793.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506730fixmk3j74232bop/4czby1290506793.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506730fixmk3j74232bop/5czby1290506793.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506730fixmk3j74232bop/5czby1290506793.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506730fixmk3j74232bop/6czby1290506793.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506730fixmk3j74232bop/6czby1290506793.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506730fixmk3j74232bop/7nqs11290506793.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506730fixmk3j74232bop/7nqs11290506793.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506730fixmk3j74232bop/8yh9m1290506793.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506730fixmk3j74232bop/8yh9m1290506793.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506730fixmk3j74232bop/9yh9m1290506793.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506730fixmk3j74232bop/9yh9m1290506793.ps (open in new window)


 
Parameters (Session):
par1 = 0 ; par2 = 36 ;
 
Parameters (R input):
par1 = 2 ; par2 = Do not include Seasonal 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