Passing to function plot_graph_distrib_score
This commit is contained in:
parent
ff0f6cf253
commit
b7e079a55e
|
@ -285,23 +285,25 @@ ScoreDistribElisa <- function(lambda0, lambda1, T){
|
||||||
```
|
```
|
||||||
|
|
||||||
```{r}
|
```{r}
|
||||||
distrib_score_mc=ScoreDistribEmpiric(2,3,10000,T)
|
distrib_score_mc = ScoreDistribEmpiric(2,3,10000,T)
|
||||||
|
distrib_score_theo = ScoreDistribElisa(2,3,T)
|
||||||
|
|
||||||
distrib_score_theo=ScoreDistribElisa(2,3,T)
|
plot_graph_distrib_score <- function(distrib_score_theo, distrib_score_mc){
|
||||||
|
# length(distrib_score_mc[,2])
|
||||||
|
# length(distrib_score_theo[,2])
|
||||||
|
|
||||||
|
#diff_distrib_score=abs(distrib_score_mc[,2]-distrib_score_theo[,2])
|
||||||
|
|
||||||
length(distrib_score_mc[,2])
|
#par(mfrow = c(1,2))
|
||||||
length(distrib_score_theo[,2])
|
barplot(distrib_score_mc[,2],col="blue",axes=F)
|
||||||
|
mtext("Distribution of scores via Monte Carlo",side=1,line=2.5,col="blue")
|
||||||
|
axis(2, ylim=c(0,10))
|
||||||
|
par(new = T)
|
||||||
|
barplot(distrib_score_theo[,2],col="red",axes=F)
|
||||||
|
mtext("Distribution of scores using the theoretical method",side=1,line=4,col="red")
|
||||||
|
}
|
||||||
|
|
||||||
#diff_distrib_score=abs(distrib_score_mc[,2]-distrib_score_theo[,2])
|
plot_graph_distrib_score(distrib_score_theo, distrib_score_mc)
|
||||||
|
|
||||||
#par(mfrow = c(1,2))
|
|
||||||
barplot(distrib_score_mc[,2],col="blue",axes=F)
|
|
||||||
mtext("Distribution des scores via Monte_Carlo",side=1,line=2.5,col="blue")
|
|
||||||
axis(2, ylim=c(0,10))
|
|
||||||
par(new = T)
|
|
||||||
barplot(distrib_score_theo[,2],col="red",axes=F)
|
|
||||||
mtext("Distribution des scores via la méthode théorique",side=1,line=4,col="red")
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue