From: Rolf Turner <rolf_at_erdos.math.unb.ca>

Date: Mon 02 Oct 2006 - 22:43:55 GMT

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue Oct 03 08:49:00 2006

Date: Mon 02 Oct 2006 - 22:43:55 GMT

Ricardo Rios wrote:

> Hi Rolf Turner, I have a statistical model, it model need this

*> numbers for calculate the probability. This numbers must be random.
**>
**> For example I need that
**> >magicfunction(3)
**> >[1] 0.3152460 0.5231614 0.1615926
**> >magicfunction(3)
**> >[1] 0.6147933 0.3122999 0.0729068
**>
**> but the argument of the function is arbitrary , does somebody
**> know if exist this function in R?
*

As far as I know, no such function exists in R, but it would be totally trivial to write one, if that's what you really want. However the question you pose makes little sense to me. If you really have a ``statisical model'' then there must be some marginal distribution for each of the probabilities (I *assume* They are probabilities) going into the sequence which you wish to sum to 1. You mention no such distribution. To generate such a sequence with an arbitray marginal distribution is so trivial that it does not bear discussing. If you really can't see how to do this, then you probably shouldn't be messing about with ``statistical models''. You did not explicitly deny that this is a homework problem. I still suspect that it is. cheers, Rolf Turner ______________________________________________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 and provide commented, minimal, self-contained, reproducible code. Received on Tue Oct 03 08:49:00 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 Tue 03 Oct 2006 - 15:30:07 GMT.

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