[R] CDF for pareto distribution
Vincent Goulet
vincent.goulet at act.ulaval.ca
Wed Jul 11 16:46:10 CEST 2007
Le 07-07-11 à 10:01, livia a écrit :
>
> Hi, thank you very much for your reply. The function pgpd() is from
> the
> package POT, and the 1.544 is the location parameter, 0.4477557 is
> the scale
> parameter and -0.50113 is the shape parameter, which can be both
> negtive or
> positive.
The documentation of POT states that the scale parameter must be
positive. You seem right about the shape parameter, though; POT uses
a different parametrization from the one I'm used to.
The problem with
> x <- seq(1.6, 3, 0.1)
> lines(x,pgpd(x, 1.544,0.4477557,-0.50113), col="red")
is that lines() must be used to add to an already existing graphic.
For a new plot, use
> x <- seq(1.6, 3, 0.1)
> plot(x,pgpd(x, 1.544,0.4477557,-0.50113), col="red")
which works just fine here.
We cannot help you more if you do not give a *reproducible* example
of what is going wrong.
If you have issues with the pgpd() function, you should contact the
maintainer of package POT, as the Posting Guide asks.
HTH
>
>
> Vincent Goulet wrote:
>>
>> Le 07-07-11 à 07:56, livia a écrit :
>>
>>>
>>> Hi, I would like to use the following codes to plot the CDF for
>>> pareto
>>> distribution. Before doing this, I have plot the emperical one.
>>>
>>> x <- seq(1.6, 3, 0.1)
>>> lines(x,pgpd(x, 1.544,0.4477557,-0.50113), col="red")
>>>
>>> Could anyone give me some advice whether the above codes are
>>> correct?
>>>
>>> Many thanks.
>>
>> livia,
>>
>> You seem to be struggling with the Pareto distribution... The above
>> code seems correct, but you do not say where you took the pdpd()
>> function from. This makes it harder for us to help you.
>>
>> In you other message (https://stat.ethz.ch/pipermail/r-help/2007-
>> July/
>> 136137.html) you quote a negative scale parameter. The Pareto I know
>> has strictly positive shape and scale parameters.
>>
>> Perhaps can you retry with functions ppareto() or pgenpareto() of
>> package actuar.
>>
>> ---
>> Vincent Goulet, Associate Professor
>> École d'actuariat
>> Université Laval, Québec
>> Vincent.Goulet at act.ulaval.ca http://vgoulet.act.ulaval.ca
>>
>> ______________________________________________
>> R-help at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>>
>
> --
> View this message in context: http://www.nabble.com/CDF-for-pareto-
> distribution-tf4061253.html#a11540928
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list