I have difficulty understanding what it means when an rnorm is used as one of the arguments of another rnorm? (I'll explain more below)
For example, below, in the first line of my R code I use an rnorm() and I call this rnorm(): mu.
mu consists of 10,000 x, and 10,000 corresponding y. Thus, we can plot mu (and mu is shaped as a normal).
Now, let me put mu itself as the mean argument of a new rnorm() called "distribution".
My question is how mu which itself has 10,000 x and 10,000 y be used as the mean argument this new rnorm() called distribution?
P.S.: mean argument of any rnorm can be either a single number, or a vector, but how we can put an rnorm (which has two vectors of x and y) in place of the mean argument of an rnorm?
mu <- rnorm( 1e4 , 178 , 20 ) ; plot( density(mu) )
distribution <- rnorm( 1e4 , mu , 1 ) ; plot( density(distribution) )
Aucun commentaire:
Enregistrer un commentaire