see ?set.seed
On 29/01/2008, Majnu John <[EMAIL PROTECTED]> wrote:
> Hello All,
>
> I used sample(..., replace = TRUE) repeatedly to generate 100
> bootstrap samples of a data that I'm working with. If I re-run my codes,
> it'll generate a different set of 100 bootstrap samples.
>
> Is there a
Hello All,
I used sample(..., replace = TRUE) repeatedly to generate 100
bootstrap samples of a data that I'm working with. If I re-run my codes,
it'll generate a different set of 100 bootstrap samples.
Is there any way that I can get the same set of 100 bootstrap
re-samples at each re-run
I used sample like you suggested.
Thank you,
Sigalit.
On 1/15/08, Zhengyang Sun <[EMAIL PROTECTED]> wrote:
>
> Hi Sigalit,
> use ?sample. hope the example below answers your question:
> > aa<-rnorm(20,3,0.6)
> > aa
> [1] 2.348048 2.535320 2.773491 3.051137 2.574342 3.636812 3.267405
> 2.475192
>
See rnorm(). If you are sampling from a continuous normal distribution,
it makes no sense to define a sample with replacement, because the
probability of sampling twice the same number is zero.
Julian
sigalit mangut-leiba wrote:
> Hello,
> How do I sample observations with replacement from a n
Hello,
How do I sample observations with replacement from a normal distribution
with a specific mean and s.d?
(I want to see the sample, not only the statistic.)
Thank you,
Sigalit.
[[alternative HTML version deleted]]
__
R-help@r-project.org ma
5 matches
Mail list logo