dimanche 25 juin 2017

Drawing samples from different rnorm

this might be somewhat tricky, or at least for me it is...

I have to vectors, one with daily means over a year and one with the associated std. deviations. I want to draw n=1000 samples from each of these normal distributions and save them in a vector. To be more specific....

means vector=(1,2,3,...., 365) sd vector=(1,2,3,.....,365)

Note, that these are examples of the values that indicate that I have 365 different values.

rnorm(n=1000, mean=1, sd=1) which uses the vectors as inputs.

Any idea how to code this?




Aucun commentaire:

Enregistrer un commentaire