[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-help
Subject:    [R] Random number generation
From:       "subramanian R" <supersubu123 () gmail ! com>
Date:       2008-08-05 12:59:30
Message-ID: b2d9df730808050547k1969d26i6ab732b914aa5c7a () mail ! gmail ! com
[Download RAW message or body]

Hi All,
           I have a few queries regarding Random Number generation in R.
           according to the help(Random.User) i defined my own functions for
user_unif_rand and user_norm_rand (uniform and normal distribution)

           But what i figured out was even when i call rexp,rpois,rgeom and
other distributions they were routed via user_unif_rand.
1.  Does this mean that for all types of distribution it generates an
Uniform distribution and transforms to the requested type?

Also   surprisingly even rnorm which i hoped to route via user_norm_rand
was calling user_unif_rand...


> rnorm(1)
inside user_unif_rand//printf and
inside user_unif_rand
[1] 0.5973648


Please help me out understanding this...

2. Our goal is to link with an vectorized Random number generator library
for our multi-core architecture.
    So is it enough if we define user_unif_rand function alone and will it
take care of all distributions?


Thanks in Anticipation,
R. Subramanian

	[[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org 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.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic