From: Tara on 26 Jul 2010 12:18 Hello, I'm sorry, I'm still quite confused. I also have data which I am sure follows a pareto distribution. Is there a way to fix the parameters, K and theta, in dfitool when using the generalized Pareto distribution fit, is that what you're suggesting? Or is there a simple way to fix them when using gpfit(X). I would have thought there would be a simple way to return the variables associated with a given distribution and to fix some of them by some kind of parmhat(3)==parmhat(2)./parmhat(1) type construction. Any help would be much appreciated. Thanks, Tara H.
From: Peter Perkins on 26 Jul 2010 17:31 On 7/26/2010 12:18 PM, Tara wrote: > I'm sorry, I'm still quite confused. I also have data which I am sure > follows a pareto distribution. Is there a way to fix the parameters, K > and theta, in dfitool when using the generalized Pareto distribution > fit, is that what you're suggesting? Or is there a simple way to fix > them when using gpfit(X). > > I would have thought there would be a simple way to return the variables > associated with a given distribution and to fix some of them by some > kind of parmhat(3)==parmhat(2)./parmhat(1) type construction. Tara, my newsreader does not seem to have the rest of the thread that this message is replying to, so I lack a bit of context. The threshold parameter for a generalized Pareto, what our doc refers to as theta, is not straight-forward to estimate, and as I recall, maximum likelihood simply fails to work in this case. As result, both GPFIT and the Distribution Fitting Tool more or less assume that theta is zero, or that you have a fixed value in mind for the threshold parameter. In the latter case, you subtract theta from your data before calling GPFIT, or you provide the value in the fitting dialog for DFITTOOL. Alternatively, you can try to estimate the threshold parameter. Based on the subject line of this thread, I'm guessing that you may have been looking at this demo <http://www.mathworks.com/products/statistics/demos.html?file=/products/demos/shipping/stats/cdffitdemo.html> which suggests a method for fitting this kind of thresholded distribution, although not specifically the GP. You would do that completely separately from GPFIT or DFITTOOL. Hope this helps.
From: Tara on 28 Jul 2010 11:17 Thanks you so much for helping me :) Is it possible to fix ko in the dialogue for the mle method? Apparently I can't use the censoring option fo the 'gp' (generalised pareto) fit. I know that if k > 0 and θ = σ/k, the generalized Pareto distribution is equivalent to the Pareto distribution, so I want to make the second condition a constraint on the fit . I can take my data and run; mle(data,'distribution','gp') to find estimates for k0 and sigma, but as soon as I take the value of theta which corresponds to θ = σ/k and put it into the dfittool in order to get sigma for the Ordinary Pareto distribution, clearly sigma changes and so I am no closer to knowing my long-sought-after value of sigma for the Ordinary pareto distribution. I think there must be some simple point that I'm missing! I'm sorry for asking what may seem to be a very silly question. Alternatively I think I can adjust some code from here http://tuvalu.santafe.edu/~aaronc/powerlaws/ . I think this is what I must do. Tara.
From: Peter Perkins on 29 Jul 2010 09:16 On 7/28/2010 11:17 AM, Tara wrote: > Thanks you so much for helping me :) > > Is it possible to fix ko in the dialogue for the mle method? Apparently > I can't use the censoring option fo the 'gp' (generalised pareto) fit. I > know that if k > 0 and θ = σ/k, the generalized Pareto > distribution is equivalent to the Pareto distribution, so I want to make > the second condition a constraint on the fit . Tara, I confess that I'm not sure what you are asking. There is no way to fix k, if by "fix" you mean impose a constraint that it is fixed at one value. If you want to impose the constraint that theta = sigma/k in order to get the (ordinary) Pareto, then you should just fit a Pareto distribution. If you want to impose that constraint while also allowing k to be negative, then you're going to have to write your own log-likelihood function and call the MLE function with that. That function would take two parameters, k and sigma, and then call the GP log-likelihood function with k, sigma, and theta=sigma/k. I cannot tell if that is what you are asking for, but you can find examples of using MLE for similar things here <http://www.mathworks.com/products/statistics/demos.html?file=/products/demos/shipping/stats/customdist1demo.html> and here <http://www.mathworks.com/products/statistics/demos.html?file=/products/demos/shipping/stats/customdist2demo.html> Hope this helps.
From: Tara on 3 Aug 2010 20:12 That helped massively! Thanks :D
|
Pages: 1 Prev: Extensions to bsxfun? Next: code for histrogram equalization |