Description Usage Arguments Value Warning Author(s) References See Also Examples
stablereg
fits user specified generalized linear and nonlinear
regression models based on the stable distribution to (uncensored, right
and/or left censored) data. This allows the location, the dispersion, the
skewness and the tails of the fitted stable distribution to vary with
explanatory variables.
1 2 3 4 5 6 7 8 9 10  stablereg(y = NULL, loc = 0, disp = 1, skew = 0, tail = 1.5,
oloc = TRUE, odisp = TRUE, oskew = TRUE, otail = TRUE,
noopt = FALSE, iloc = NULL, idisp = NULL, iskew = NULL,
itail = NULL, loc_h = NULL, disp_h = NULL, skew_h = NULL,
tail_h = NULL, weights = 1, exact = FALSE, delta = 1,
envir = parent.frame(), integration = "Romberg", eps = 1e06,
up = 10, npoint = 501, hessian = TRUE, llik.output = FALSE,
print.level = 0, ndigit = 10, steptol = 1e05, gradtol = 1e05,
fscale = 1, typsize = abs(p0), stepmax = sqrt(p0 %*% p0),
iterlim = 100)

y 
The response vector or a For censored data, two columns with the second being the censoring indicator (1: uncensored, 0: right censored, 1: left censored.) 
loc, loc_h, oloc, iloc 
Describe the regression model fitted for the
location parameter of the stable distribution, perhaps after transformation
by the link function Two specifications are possible: (1)
(2) If But when Specification (1) is especially useful in ANOVAlike situations where the location is assumed to change with the levels of some factor variable. 
disp, disp_h, odisp, idisp 
describe the regression model for the
dispersion parameter of the fitted stable distribution, after transformation
by the link function 
skew, skew_h, oskew, iskew 
describe the regression model for the
skewness parameter of the fitted stable distribution, after transformation
by the link function 
tail, tail_h, otail, itail 
describe the regression model considered
for the tail parameter of the fitted stable distribution, after
transformation by the link function 
noopt 
When set to TRUE, it forces 
weights 
Weight vector. 
exact 
If TRUE, fits the exact likelihood function for continuous data by integration over intervals of observation, i.e. interval censoring. 
delta 
Scalar or vector giving the unit of measurement for each
response value, set to unity by default. For example, if a response is
measured to two decimals, 
envir 
Environment in which model formulae are to be interpreted or a
data object of class, 
integration, eps, up, npoint 

hessian 
Arguments controlling the optimization procedure 
llik.output 
is TRUE when the likelihood has to be displayed at each iteration of the optimization. 
print.level 
Arguments controlling the optimization procedure 
ndigit 
Arguments controlling the optimization procedure 
steptol 
Arguments controlling the optimization procedure 
gradtol 
Arguments controlling the optimization procedure 
fscale 
Arguments controlling the optimization procedure 
typsize 
Arguments controlling the optimization procedure 
stepmax 
Arguments controlling the optimization procedure 
iterlim 
Arguments controlling the optimization procedure 
A list of class stable
is returned. The printed output
includes the loglikelihood, the corresponding AIC, the maximum likelihood
estimates, standard errors, and correlations. It also include all the
relevant information calculated, including error codes.
Because of the numerical integrations involved,
convergence can be very sensitive to the initial parameter values supplied
and to the settings of the arguments controlling nlm
. If nlm
feeds extreme parameter values in the tails of the distribution to the
likelihood function, the integration may hang for a long time.
Philippe Lambert (Catholic University of Louvain, Belgium, phlambert@stat.ucl.ac.be) and Jim Lindsey.
Lambert, P. and Lindsey, J.K. (1999) Analysing financial returns using regression models based on nonsymmetric stable distributions. Applied Statistics 48, 409424.
lm
, glm
, stable
and stable.mode
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44  ## 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,
305,307,307,304,303,304,304,309,309,309,307,306,304,300,296,301,298,
295,295,293,292,297,294,293,306,303,301,303,308,305,302,301,297,299)
# 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],
loc = ~1, disp= ~1, skew = ~1, tail = tail_g(1.9999999),
iloc = 0, idisp = 3, iskew = 0, oskew = FALSE, otail = FALSE))
# Normal model (tail=2) with dispersion=disp_h(b0+b1*day)
print(z2 < stablereg(y = ret, delta = 1/y[1:49], loc = ~day,
disp = ~1, skew = ~1, tail = tail_g(1.999999), iloc = c(0.003,0),
idisp = 4.5, iskew = 0, oskew = FALSE, otail = FALSE))
# Stable model with loc(ation)=loc_h(b0+b1*day)
print(z3 < stablereg(y = ret, delta = 1/y[1:49],
loc = ~day, disp = ~1, skew = ~1, tail = ~1,
iloc = c(0.001,0.004), idisp = 4.8, iskew = 0, itail = 0.6))
# Stable model with disp(ersion)=disp_h(b0+b1*day)
print(z4 < stablereg(y = ret, delta = 1/y[1:49],
loc = ~1, disp = ~day, skew = ~1, tail = ~1,
iloc = 0.003, idisp = c(4.8,0), iskew = 0.03, itail = 1.6))
# Stable model with skew(ness)=skew_h(b0+b1*day)
# Evaluation at fixed parameter values (because noopt is set to TRUE)
print(z5 < stablereg(y = ret, delta = 1/y[1:49],
loc = ~1, disp = ~1, skew = ~day, tail = ~1,
iloc = 5.557e04, idisp = 4.957, iskew = c(2.811,2.158),
itail = 1.57, noopt=TRUE))
# 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.002,
idisp = 4.8, iskew = 2, itail = c(2.4,4), hessian=FALSE))

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.