christian.strunk-extern@hsh-nordbank.com
2005-Oct-07 12:15 UTC
[R] Troubleshooting with "gpd" (Fit generalized pareto model)
Up to now, I have recognized problems with "gpd(..)", the function
from
the package "evir"
I think that all these functions that estimate the parameters xi, beta for
the GPD
by given threshold mu use the function "optim(..)" ( gpd, fitgpd,
...)
"Error" example:
data1 <- rgpd(1000, xi= -1.5, mu=1000, beta=100)
so the created poinnts take place in about (1000, 1070).
Now I want to estimate xi and beta by given threshold =1060,
out <- gpd(data1, threshold=1060) and this causes an error in
"optim".
My questions are
(1) Is there a more secure way the get the MLE estimators for a GPD by
given threshold and dataset?
(2) If we only have 10 errors in a for-loop where we want to calculate
the MLE estimators for 100 different
thresholds; how can I get the for-loop work unitl the end of the
moving index ?
(try, tryCatch dosen´t work)
Thanks, Christian Strunk.
________________________________________________________________________________________
Diese Nachricht kann vertrauliche Informationen enthalten. Sollten Sie nicht der
vorgesehene Empfänger sein, so bitten wir Sie, den Absender unverzüglich zu
informieren und die E-Mail zu löschen. Jeder unbefugte Zugriff oder unbefugte
Weiterleitung, die Fertigung einer Kopie, die Veröffentlichung oder sonstige in
diesem Zusammenhang stehende Handlung ist untersagt. Da wir nicht die Echtheit
oder Vollständigkeit der in dieser Nachricht enthaltenen Informationen
garantieren können, schließen wir die rechtliche Verbindlichkeit der
vorstehenden Erklärungen und Äußerungen aus.
This message may contain confidential information. If you ar...{{dropped}}
KOITA Lassana - STAC/ACE
2005-Oct-07 16:35 UTC
[R] Troubleshooting with "gpd" (Fit generalized pareto model)
Hi, Christian
you must sort all data in data1, for using "gpd( ...) " function.
So try this following code :
library(evir)
data1 <- rgpd(1000, xi= -1.5, mu=1000, beta=100)
out <- gpd(sort(data1), threshold = 1060)
out
Have a good week end!
Lassana KOITA
Service Technique de l'Aviation Civile (STAC)
Direction G??n??rale de l'Aviation Civile (DGAC), France
Tel: 01 49 56 80 60
Fax: 01 49 56 82 14
@: Lassana.Koita at aviation-civile.gouv.fr
christian.strunk-extern at hsh-n
ordbank.com Pour : r-help at
stat.math.ethz.ch
cc :
Envoy?? par : Objet : [R]
Troubleshooting with "gpd" (Fit generalized pareto model)
r-help-bounces at stat.math.ethz
.ch
07/10/2005 14:15
Up to now, I have recognized problems with "gpd(..)", the function
from
the package "evir"
I think that all these functions that estimate the parameters xi, beta for
the GPD
by given threshold mu use the function "optim(..)" ( gpd, fitgpd,
...)
"Error" example:
data1 <- rgpd(1000, xi= -1.5, mu=1000, beta=100)
so the created poinnts take place in about (1000, 1070).
Now I want to estimate xi and beta by given threshold =1060,
out <- gpd(data1, threshold=1060) and this causes an error in
"optim".
My questions are
(1) Is there a more secure way the get the MLE estimators for a GPD by
given threshold and dataset?
(2) If we only have 10 errors in a for-loop where we want to calculate
the MLE estimators for 100 different
thresholds; how can I get the for-loop work unitl the end of the
moving index ?
(try, tryCatch dosen??t work)
Thanks, Christian Strunk.
________________________________________________________________________________________
Diese Nachricht kann vertrauliche Informationen enthalten. Sollten Sie
nicht der vorgesehene Empf??nger sein, so bitten wir Sie, den Absender
unverz??glich zu informieren und die E-Mail zu l??schen. Jeder unbefugte
Zugriff oder unbefugte Weiterleitung, die Fertigung einer Kopie, die
Ver??ffentlichung oder sonstige in diesem Zusammenhang stehende Handlung ist
untersagt. Da wir nicht die Echtheit oder Vollst??ndigkeit der in dieser
Nachricht enthaltenen Informationen garantieren k??nnen, schlie??en wir die
rechtliche Verbindlichkeit der vorstehenden Erkl??rungen und ??u??erungen aus.
This message may contain confidential information. If you ar...{{dropped}}
______________________________________________
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