[英]How to extract parameters from a non-stationary generalized Pareto (GP) model in R?
我现在使用extRemes
包来构建一个非固定的GP模型,我发现很难提取参数。
library(extRemes)
data(Fort)
fit1 <- fevd(Prec, Fort, threshold=0.395,
scale.fun=~sin(2 * pi * (year - 1900)/365.25) + cos(2 * pi * (year - 1900)/365.25),
type="GP", use.phi=TRUE, verbose=TRUE)
根据fevd
帮助页面, log(scale(y)) = phi(y) = phi0 + phi1 * g1(y) + phi2 * g2(y) + ...
现在,我们从结果中得到phi0
, phi1
和phi2
,但上述函数中的g1(y)
和g2(y)
是多少?
另外,我们如何理解scale.fun
中的fit1
? scale.fun=~sin(2 * pi * (year - 1900)/365.25) + cos(2 * pi * (year - 1900)/365.25)
代表什么? 例如,如果我们使用scale.fun=~Fort$year
,我们假设year
对scale
参数有线性影响。
fit2 <- fevd(Prec, Fort, threshold=0.475, threshold.fun=~I(-0.15 * cos(2 * pi * month / 12)),
type="GP", verbose=TRUE)
从fit2
,我们如何根据threshold.fun = ~I(-0.15 * cos(2 * pi * month/12))
计算变化的threshold
值? 谢谢你的帮助。
g1(y)等是你通过scale.fun参数给fevd的函数。 因此,phi0就像一个截距项,ph1是sin的系数(2 * pi *(年 - 1900)/365.25)等等。因为你使用use.phi = TRUE,你的scale参数模型估计是:log(scale)= -0.84 - 0.23 * sin(2 * pi *(年 - 1900)/365.25) - 0.25 * cos(2 * pi *(年 - 1900)/365.25),你的估计形状参数是关于0.21(如此重尾)。
对不起,我没有看到第二个问题。 我建议给阈值参数一个不同阈值的向量,而不是使用threshold.fun参数。 我不是百分之百确定这个论点到底做了什么。 它应该与传递向量相同,虽然它似乎做了一些相当接近的事情,但我无法解释它,因为我不理解它。 但是,在你的例子中,它应该是你(月)= I(-0.15 * cos(2 * pi * month / 12))。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.