#an example with a random variable with small spread of the expectation
#run for bigger sample size and finer partition
data(XX)
V<-translator(XX[[3]],30)
V2<-V
V2$x<-V$x/5
SS<-list(length=300)
for (j in 1:300){
SS[[j]]<-generator(V2,)
}
A<-histogram(SS,c(-3,3),npart=6,nl=51)
#run for bigger sample size and finer partition
data(XX)
V<-translator(XX[[3]],30)
V2<-V
V2$x<-V$x/10
pertV<-list(dist="unif",par=c(-2,2))
SS<-list(length=300)
for (j in 1:300){
SS[[j]]<-generator(V2,pertV,)
}
A<-histogram(SS,,npart=5,nl=51)
#takes some time but produces nice result
#data(XX)
#V<-translator(XX[[3]],30)
#V2<-V
#V2$x<-V$x/10
#pertV<-list(dist="unif",par=c(-2,2))
#pertL<-list(dist="lnorm",par=c(-2,2))
#SS<-list(length=1000)
#for (j in 1:1000){
# SS[[j]]<-generator(V2,pertV,pertL,)
# }
#A<-histogram(SS,,npart=15,nl=51)Run the code above in your browser using DataLab