Update ScoreDistribElisa format
This commit is contained in:
parent
7193c45e5a
commit
271b7d3a41
|
@ -248,7 +248,7 @@ ScoreDistribEmpiric <- function(lambda0, lambda1, n_sample, T){
|
||||||
```
|
```
|
||||||
|
|
||||||
```{r}
|
```{r}
|
||||||
ScoreDistribElisa <- function(lambda0, lambda1, NbSeq, T){
|
ScoreDistribElisa <- function(lambda0, lambda1, T){
|
||||||
E = ComputeE(lambda0, lambda1)
|
E = ComputeE(lambda0, lambda1)
|
||||||
|
|
||||||
score_max = floor(E*log(lambda1/lambda0))
|
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)
|
proba.l = pexp(rate=lambda0,borne_inf)-pexp(rate=lambda0,borne_sup)
|
||||||
S = sum(proba.l)
|
S = sum(proba.l)
|
||||||
new.proba.s = proba.l/S
|
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))
|
print(summary(LS_H0))
|
||||||
cat("-\n")
|
cat("-\n")
|
||||||
|
|
||||||
Score = ScoreDistribElisa(lambda0, lambda1, NbSeq, T)
|
Score = ScoreDistribElisa(lambda0, lambda1, T)
|
||||||
X_seq = Score$X
|
X_seq = Score$Score_X
|
||||||
P_X = Score$P_X
|
P_X = Score$P_X
|
||||||
|
|
||||||
LS_H0 = LocaScoreMC(lambda0, lambda1, NbSeq, T, X_seq, P_X, tbe0)
|
LS_H0 = LocaScoreMC(lambda0, lambda1, NbSeq, T, X_seq, P_X, tbe0)
|
||||||
|
|
Loading…
Reference in New Issue