Update ScoreDistribElisa format

This commit is contained in:
Paul-Corbalan 2022-04-12 17:58:13 +02:00
parent 7193c45e5a
commit 271b7d3a41
1 changed files with 14 additions and 13 deletions

View File

@ -248,7 +248,7 @@ ScoreDistribEmpiric <- function(lambda0, lambda1, n_sample, T){
```
```{r}
ScoreDistribElisa <- function(lambda0, lambda1, NbSeq, T){
ScoreDistribElisa <- function(lambda0, lambda1, T){
E = ComputeE(lambda0, lambda1)
score_max = floor(E*log(lambda1/lambda0))
@ -262,8 +262,9 @@ ScoreDistribElisa <- function(lambda0, lambda1, NbSeq, T){
proba.l = pexp(rate=lambda0,borne_inf)-pexp(rate=lambda0,borne_sup)
S = sum(proba.l)
new.proba.s = proba.l/S
df = data.frame("Score_X" = l, "P_X" = new.proba.s)
return (list("X" = l, "P_X" = new.proba.s))
return (df)
}
```
@ -319,8 +320,8 @@ for (lambda0 in (2:5)){
print(summary(LS_H0))
cat("-\n")
Score = ScoreDistribElisa(lambda0, lambda1, NbSeq, T)
X_seq = Score$X
Score = ScoreDistribElisa(lambda0, lambda1, T)
X_seq = Score$Score_X
P_X = Score$P_X
LS_H0 = LocaScoreMC(lambda0, lambda1, NbSeq, T, X_seq, P_X, tbe0)