Home » date » 2010 » Nov » 23 »

Ws 7 (3)

*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 09:58:08 +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/t1290506219j74orxo6nuxm327.htm/, Retrieved Tue, 23 Nov 2010 10:56:59 +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/t1290506219j74orxo6nuxm327.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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
eu/us[t] = + 2.81718821954907 -0.0858813976806043Crisis[t] -1.22772246144353`us/ch`[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)2.817188219549070.04415663.800300
Crisis-0.08588139768060430.004943-17.373400
`us/ch`-1.227722461443530.041776-29.388300


Multiple Linear Regression - Regression Statistics
Multiple R0.97347709088338
R-squared0.947657646474767
Adjusted R-squared0.94663132581741
F-TEST (value)923.354352931696
F-TEST (DF numerator)2
F-TEST (DF denominator)102
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.0222730682933475
Sum Squared Residuals0.0506011362624124


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11.39541.50536676949665-0.109966769496650
21.4791.465465789499740.0135342105002572
31.46191.46718460094576-0.00528460094576385
41.4671.46939450137636-0.00239450137636192
51.47991.479830142298636.98577013677639e-05
61.45081.46448361153059-0.0136836115305881
71.46781.47516479694515-0.00736479694514679
81.48241.48609152685199-0.00369152685199415
91.51891.5392519094325-0.0203519094324992
101.53481.55938655780017-0.0245865578001731
111.56661.59020239158241-0.0236023915824056
121.54461.57841625595255-0.0338162559525478
131.58031.59597268715119-0.0156726871511901
141.57181.57964397841399-0.0078439784139911
151.58321.59118456955156-0.00798456955156039
161.58011.566875664814980.0132243351850216
171.56051.545636066232010.0148639337679947
181.54161.521204389249280.0203956107507211
191.54791.53925190943250.00864809056750093
201.5581.531271713433120.0267282865668841
211.5791.562578636199930.0164213638000739
221.55541.53704200900190.0183579909980992
231.57611.564297447645950.0118025523540529
241.5361.529307357494810.0066926425051935
251.56211.547232105431880.0148678945681180
261.57731.565770714599680.0115292854003207
271.5711.560245963523180.0107540364768166
281.59251.569208337491720.0232916625082788
291.58441.562701408446070.0216985915539296
301.56961.544040027032130.0255599729678712
311.5541.527097457064210.0269025429357919
321.50121.489651921990180.0115480780098196
331.46761.47037667934552-0.00277667934551697
341.4771.468044006668770.00895599333122582
351.4661.464483611530590.00151638846941182
361.42411.44631331910122-0.0222133191012238
371.42141.42752916544114-0.00612916544113788
381.44691.378356669357690.0685433306423051
391.46181.395053694833330.066746305166673
401.38341.348523013544620.0348769864553828
411.34121.338455689360780.00274431063921973
421.34371.339437867329940.00426213267006469
431.2631.29978243182531-0.0367824318253092
441.27591.31328737890119-0.0373873789011878
451.27431.28480421779570-0.0105042177956981
461.27971.275719071581020.0039809284189842
471.25731.231152746230620.0261472537693844
481.27051.242079476137460.0284205238625369
491.2681.229802251523030.0381977484769723
501.33711.286645801487860.0504541985121368
511.38851.371358651327470.0171413486725330
521.4061.42108141101593-0.0150814110159301
531.38551.40045567366368-0.0149556736636785
541.34311.36190518837435-0.0188051883743518
551.32571.35822202099002-0.0325220209900210
561.29781.3108319339783-0.0130319339783007
571.27931.30407946044036-0.0247794604403612
581.29451.30383391594807-0.00933391594807263
591.2891.30984975600915-0.0208497560091461
601.28481.31537450708564-0.0305745070856420
611.26941.29683589791784-0.0274358979178444
621.26361.30751708333240-0.0439170833324033
631.291.271790359704400.0182096402956036
641.35591.344471529421850.0114284705781464
651.33051.328756681915380.00174331808462372
661.34821.341893312252820.0063066877471778
671.31461.309481439270710.00511856072928693
681.30271.298309164871580.00439083512842319
691.32471.33280816603814-0.00810816603814005
701.32671.33698242240705-0.0102824224070481
711.36211.3728319182812-0.010731918281199
721.34791.35232895317509-0.00442895317509212
731.40111.399841812432960.00125818756704322
741.41351.42059032203135-0.00709032203135238
751.39641.39763191200236-0.00123191200235833
761.4011.40634874147861-0.00534874147860759
771.39551.40548933575560-0.009989335755597
781.40771.4032794353250.00442056467500137
791.39751.396895278525490.000604721474507587
801.39491.40008735692525-0.00518735692524544
811.41381.411873492555100.00192650744489651
821.4211.41629329341630.00470670658369984
831.42531.419117055077620.00618294492237972
841.41691.401928940617410.0149710593825892
851.41741.411996264801250.00540373519875222
861.43461.433849724614940.00075027538505742
871.42961.42992101273832-0.000321012738323278
881.43111.430780418461330.000319581538666129
891.45941.458158629351520.00124137064847540
901.47221.468225953535360.00397404646463837
911.46691.46736654781235-0.00046654781235083
921.45711.46036852978212-0.00326852978212295
931.47091.463806152674160.0070938473258353
941.48931.480748722642090.0085512773579145
951.49971.492043769287370.00765623071263413
961.47131.47190912091969-0.000609120919691987
971.48461.482713078580400.00188692141960465
981.49141.489220007626050.00217999237395426
991.48591.482099217349670.00380078265032672
1001.49571.49572693667170-2.69366716965853e-05
1011.48431.482958623072680.00134137692731601
1021.46191.461841796735865.82032641448777e-05
1031.4341.45165170030587-0.0176517003058739
1041.44261.45987744079755-0.0172774407975453
1051.43181.4608596187667-0.0290596187667004


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
60.7744734709829790.4510530580340420.225526529017021
70.6745682535992460.6508634928015080.325431746400754
80.8496257491239680.3007485017520640.150374250876032
90.9960152878583950.007969424283209510.00398471214160476
100.9965972327813750.006805534437250560.00340276721862528
110.9962245675057280.00755086498854480.0037754324942724
120.9951009423421040.009798115315791180.00489905765789559
130.9943017107238880.01139657855222480.0056982892761124
140.993034785405880.01393042918823970.00696521459411985
150.9912012089395440.01759758212091150.00879879106045577
160.9929593746243130.01408125075137440.0070406253756872
170.99358333133750.01283333732499990.00641666866249996
180.9946784385021530.01064312299569420.00532156149784708
190.993156624661660.01368675067667990.00684337533833993
200.9952150946051260.00956981078974710.00478490539487355
210.994647075745890.01070584850822160.0053529242541108
220.9940250739185780.01194985216284360.0059749260814218
230.9919896270232420.01602074595351540.0080103729767577
240.9884080339867960.02318393202640770.0115919660132039
250.9853736192861540.02925276142769220.0146263807138461
260.9803465293425420.0393069413149160.019653470657458
270.9734894722401530.05302105551969370.0265105277598468
280.9719397540366650.05612049192667070.0280602459633353
290.9688462637135740.0623074725728520.031153736286426
300.9696117227695920.06077655446081670.0303882772304083
310.9728753343822970.05424933123540680.0271246656177034
320.9658850425395430.0682299149209140.034114957460457
330.9527020666541120.0945958666917760.047297933345888
340.9413419993646120.1173160012707770.0586580006353884
350.9245647112249380.1508705775501240.075435288775062
360.9136853165294710.1726293669410570.0863146834705287
370.887835509304760.2243289813904780.112164490695239
380.9542499910127740.09150001797445130.0457500089872257
390.9890349177033840.02193016459323210.0109650822966160
400.9937597294223930.01248054115521330.00624027057760664
410.9960850276620170.007829944675965220.00391497233798261
420.9962877065374150.007424586925169610.00371229346258480
430.999419744968140.001160510063721240.000580255031860619
440.9998928638422080.0002142723155832120.000107136157791606
450.9998483319145220.0003033361709567840.000151668085478392
460.9997393861324740.0005212277350523530.000260613867526177
470.9998029785085380.000394042982924750.000197021491462375
480.9998788775565720.0002422448868564220.000121122443428211
490.9999813606802593.72786394822724e-051.86393197411362e-05
500.9999999154219971.69156005363751e-078.45780026818756e-08
510.9999999416935551.16612889958859e-075.83064449794297e-08
520.9999999519234189.6153163122692e-084.8076581561346e-08
530.9999999471549671.05690066754035e-075.28450333770177e-08
540.9999999452138381.09572323338713e-075.47861616693566e-08
550.9999999886640252.26719502176061e-081.13359751088031e-08
560.9999999787272274.25455462903868e-082.12727731451934e-08
570.9999999828898463.4220307354708e-081.7110153677354e-08
580.9999999628410427.43179169981619e-083.71589584990810e-08
590.9999999581307048.37385919195317e-084.18692959597659e-08
600.9999999883698642.32602714549755e-081.16301357274877e-08
610.9999999962343467.53130776529066e-093.76565388264533e-09
620.9999999999986492.70243123690686e-121.35121561845343e-12
630.9999999999991581.68357519050097e-128.41787595250484e-13
640.999999999998852.30036156786169e-121.15018078393085e-12
650.9999999999962477.5063015720683e-123.75315078603415e-12
660.9999999999914141.71712684685565e-118.58563423427826e-12
670.9999999999808553.82891355668212e-111.91445677834106e-11
680.9999999999635277.29454010259258e-113.64727005129629e-11
690.9999999998906062.18788857636447e-101.09394428818224e-10
700.9999999997373435.25314208593428e-102.62657104296714e-10
710.999999999503579.9286071683529e-104.96430358417645e-10
720.999999998544672.91065992221818e-091.45532996110909e-09
730.9999999955360048.9279920791385e-094.46399603956925e-09
740.9999999894606232.10787534049645e-081.05393767024822e-08
750.9999999684698546.30602911966023e-083.15301455983012e-08
760.999999920957811.58084379509086e-077.90421897545432e-08
770.9999998778679452.44264109674761e-071.22132054837381e-07
780.999999663547586.72904838162752e-073.36452419081376e-07
790.9999990499113531.90017729437751e-069.50088647188754e-07
800.9999979470551114.10588977777465e-062.05294488888733e-06
810.9999944262946341.11474107323444e-055.57370536617218e-06
820.9999858599732452.82800535091542e-051.41400267545771e-05
830.9999675165387346.49669225314508e-053.24834612657254e-05
840.999975292262434.94154751398216e-052.47077375699108e-05
850.9999655518085626.88963828765884e-053.44481914382942e-05
860.9999287041043870.0001425917912260317.12958956130153e-05
870.9998742547960850.0002514904078303910.000125745203915196
880.9998861951577460.0002276096845075690.000113804842253784
890.9998030481939810.0003939036120375280.000196951806018764
900.999628916831520.0007421663369595460.000371083168479773
910.9991115017432330.001776996513532960.00088849825676648
920.9980650585727290.003869882854542530.00193494142727126
930.998770805578170.002458388843660560.00122919442183028
940.997894880092280.004210239815441880.00210511990772094
950.9940680867936080.01186382641278370.00593191320639184
960.986638744428640.02672251114271970.0133612555713599
970.9659768122021010.06804637559579720.0340231877978986
980.915547049262880.1689059014742390.0844529507371193
990.8302851842444280.3394296315111430.169714815755572


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level590.627659574468085NOK
5% type I error level760.808510638297872NOK
10% type I error level850.904255319148936NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506219j74orxo6nuxm327/1058e71290506277.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506219j74orxo6nuxm327/1058e71290506277.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506219j74orxo6nuxm327/19ggy1290506277.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506219j74orxo6nuxm327/19ggy1290506277.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506219j74orxo6nuxm327/29ggy1290506277.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506219j74orxo6nuxm327/29ggy1290506277.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506219j74orxo6nuxm327/39ggy1290506277.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506219j74orxo6nuxm327/39ggy1290506277.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506219j74orxo6nuxm327/42pf11290506277.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506219j74orxo6nuxm327/42pf11290506277.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506219j74orxo6nuxm327/52pf11290506277.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506219j74orxo6nuxm327/52pf11290506277.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506219j74orxo6nuxm327/62pf11290506277.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506219j74orxo6nuxm327/62pf11290506277.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506219j74orxo6nuxm327/858e71290506277.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506219j74orxo6nuxm327/858e71290506277.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506219j74orxo6nuxm327/958e71290506277.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290506219j74orxo6nuxm327/958e71290506277.ps (open in new window)


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