D ANIELLO CLAUDIA (MPS - 05966)
2007-May-02 13:50 UTC
[R] KS test pvalue estimation using mctest (library truncgof)
Hi, I'm trying to evaluate a Monte Carlo p-value (using truncgof package) on a left truncated sample.>From an empirical sample I've estimated a generalized paretodistribution parameters (xi, beta, threshold) (I've used fExtremes pkg). I'm in doubt on what of the following command is the most appropriate: Let: x<-sample t<-threshold xt<-x[x>t] xihat<-gpdFit(x, threshold=t, type = "pwm")$par.ests[1] betahat<-gpdFit(x, threshold=t, type = "pwm")$par.ests[2] (1) ks.test(xt,"pgpd",list(xi=xihat,beta=betahat),H=t,estfun "as.list(gpdFit(x, 0)$par.ests)", tol = 1e-02) (2) ks.test(xt,"pgpd",list(xi=xihat,beta=betahat),H=t,estfun "as.list(gpdFit(x, t)$par.ests)", tol = 1e-02) (3) ks.test(xt,"pgpd",list(xi=xihat,beta=betahat,mu=t),estfun "as.list(gpdFit(x, t)$par.ests)", tol = 1e-02) Someone have ever faced this problem? I need to understand the role of threshold in the Monte Carlo sampling from the GPD. In the 1st case I've obtained high value of statistics and p-value, in the second same value of statistic and very low p-value, in the 3rd low statistic and p-value always equal to 1. Thank you very much in advance Regards Claudia