Skip to content

gnlr3 location parameter

2 messages · Arnout Standaert, Brian Ripley

#
Hi list,

my previous question was obviously too basic to deserve an answer - 
apologies for that. I'm learning, things can only get better :-)

My current problem is with fitting a generalized gamma distribution with 
an additional "shift" parameter, that represents a shift of the 
distribution along the X axis.

The gnlr3 function (in Jim Lindsey's GNLM package) fits this 
distribution in this form:

f(y) = fy^(f-1)/((m/s)^(fs) Gamma(s)) y^(f(s-1)) exp(-(y s/m)^f)
(1)

I would like to include a fourth parameter, say u, like this:

f(y) = fy^(f-1)/((m/s)^(fs) Gamma(s)) (y-u)^(f(s-1)) exp(-((y-u) s/m)^f)
(2)

My best idea so far is to iteratively fit expression (1), each time 
shifting the data with an amount u. Plotting the maximum likelihood of 
the fit against u should give me an idea of where the optimum value for 
u is. Of course, this procedure will take quite some time, and will not 
be very straightforward since the generalized gamma shows convergence 
problems without good initial estimates...

Any suggestions for a better approach?

Thanks in advance,
Arnout
#
I believe what Jim Lindsey's code does is to directly maximize the 
log-likelihood.  Why not write down the log-likelihood for your problem 
and maximize it? You may be able to use the functions in package stats4 to 
provide a structure, or you can copy examples like fitdistr and polr in 
MASS.

Just be a little careful: you have omitted the ranges on your expressions, 
but is it not y > 0 for (1) and y > u for (2, corrected)?  If so you will 
need to use bound-constrained optimization and worry about having a 
non-standard inference problem.

Prof Lindsey chooses not to submit his code to CRAN (nor even keep it that 
at a stable URL).  As a result, few people here know about his packages 
and you would do better to ask him directly for support.
On Fri, 15 Apr 2005, Arnout Standaert wrote:

            
Is that right?  Did you mean (y-u) near the front?