Yves:
I am completely baffled by this. I include below my output for these
examples from Intel Pentium II RH5.2 Linux with R90. I get exactly the
same results with MS Windows 98 and R65 on the same machine. I also
tried with R90 and MS Windows 95 on an older Pentium and also got the
same results. What machine exactly did you run this on?
R-help will remember that I have complained before about numerical
problems with MS Windows but this one beats me. Jim
Hi Jim,
Troels Ring told me to get Version 0.7 which I did.
It's probably me that doesn't understand how it works (I'm new to R) but
stablereg is supposed to find the most appropriate parameters for the stable
distribution (loc, disp, skew, tail) given some starting values right?
When I try the examples that are given with the function help file I get the
following results.
************************************************************
R : Copyright 1999, The R Development Core Team
Version 0.90.0 (November 22, 1999)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type "?license" or "?licence" for distribution details.
R is a collaborative project with many contributors.
Type "?contributors" for a list.
Type "demo()" for some demos, "help()" for on-line help, or
"help.start()" for a HTML browser interface to help.
Type "q()" to quit R.
library(stable)
Loading required package: rmutil
help(stablereg)
## Share return over a 50 day period (see reference above)
# shares
y <-
# returns
ret <- (y[2:50]-y[1:49])/y[1:49]
# hist(ret, breaks=seq(-0.035,0.045,0.01))
day <- seq(0,0.48,by=0.01) # time measured in days/100
x <- seq(1,length(ret))-1
# Classic stationary normal model tail=2
print(z1 <- stablereg(y = ret, delta = 1/y[1:49],
# Stable model with tail=tail.h(b0+b1*day)
print(z6 <- stablereg(y = ret, delta = 1/y[1:49], loc = ret ~ 1,
+ disp = ~ 1, skew = ~ 1, tail = ~ day, iloc = 0.001,
+ idisp = -5, iskew = -3, itail = c(2,-7), hessian=F))
Call:
stablereg(y = ret, delta = 1/y[1:49], loc = ret ~ 1, disp = ~1,
skew = ~1, tail = ~day, iloc = 0.001, idisp = -5, iskew = -3,
itail = c(2, -7), hessian = F)
-Log likelihood 129.4914
No. of obs 49
No. of estimated parameters 5
No. of parameters 5
Degrees of freedom 44
AIC 134.4914
Iterations 83
Location parameters
ret ~ 1
estimate se
(Intercept) 0.001841 NA
Dispersion parameters
~1
estimate se
(Intercept) -4.785 NA
Skew parameters
~1
estimate se
(Intercept) -13.82 NA
Tail parameters
~day
estimate se
(Intercept) 1.926 NA
day -6.716 NA
****************************************************************
Are those result what they're supposed to be?
If it is so, I find it confusing that there are NA's, NaN's and/or "Warning:
no convergence - error 5 " in practically all results. I took a look at the
source code and there are 2 messages that give an hint that the result are
probably ok. It kind of looks like these example are counter example if the
results are correct that is.
Is there some documentation for the library, I mean more then the help files
provide?
Any help you can provide will be appreciated.
Thanks.
Yves Gauvreau
-------------------------------------------------------------------------
from Linux, Jim
-------------------------------------------------------------------------
R : Copyright 1999, The R Development Core Team
Version 0.90.0 (November 22, 1999)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type "?license" or "?licence" for distribution details.
R is a collaborative project with many contributors.
Type "?contributors" for a list.
Type "demo()" for some demos, "help()" for on-line help, or
"help.start()" for a HTML browser interface to help.
Type "q()" to quit R.
library(stable)
Loading required package: rmutil
## Share return over a 50 day period (see reference above)
# shares
y <- c(296,296,300,302,300,304,303,299,293,294,294,293,295,287,288,297,
# returns
ret <- (y[2:50]-y[1:49])/y[1:49]
# hist(ret, breaks=seq(-0.035,0.045,0.01))
day <- seq(0,0.48,by=0.01) # time measured in days/100
x <- seq(1,length(ret))-1
# Classic stationary normal model tail=2
print(z1 <- stablereg(y = ret, delta = 1/y[1:49],
# Stable model with skew(ness)=skew.h(b0+b1*day)
# Evaluation at fixed parameter values (since noopt is set to TRUE)
print(z5 <- stablereg(y = ret, delta = 1/y[1:49],
# Stable model with tail=tail.h(b0+b1*day)
print(z6 <- stablereg(y = ret, delta = 1/y[1:49], loc = ret ~ 1,
+ disp = ~ 1, skew = ~ 1, tail = ~ day, iloc = 0.001,
+ idisp = -5, iskew = -3, itail = c(2,-7), hessian=F))
Call:
stablereg(y = ret, delta = 1/y[1:49], loc = ret ~ 1, disp = ~1,
skew = ~1, tail = ~day, iloc = 0.001, idisp = -5, iskew = -3,
itail = c(2, -7), hessian = F)
Warning: no convergence - error 3
-Log likelihood 129.4544
No. of obs 49
No. of estimated parameters 5
No. of parameters 5
Degrees of freedom 44
AIC 134.4544
Iterations 70
Location parameters
ret ~ 1
estimate se
(Intercept) 0.001694 NA
Dispersion parameters
~1
estimate se
(Intercept) -4.791 NA
Skew parameters
~1
estimate se
(Intercept) -8.805 NA
Tail parameters
~day
estimate se
(Intercept) 2.081 NA
day -7.091 NA
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._