[R] Simulation / bayesian model

From: Ahmed Elhabti <a_elhabti_at_yahoo.fr>
Date: Fri 16 Jun 2006 - 02:58:00 EST


Hi,    

  (In the bayesian model, this program makes estimate the value of theta (tn)   with the empirical method.)    

  I want to know how one can repeat this program 100 times, before to have 100 estimated values of tn.    

  This is the program:    

  a<-1
theta<-rexp(50,a)
x<-rpois(length(theta),theta)
  t<-rexp(a)
  xn<-rpois(1,t)
  tn<-(1+xn)*mean(x)/(1+mean(x))
  tn        

  Thank you very much.


        [[alternative HTML version deleted]]



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Jun 16 03:14:14 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 16 Jun 2006 - 04:12:59 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.