TECTED]
>MIME-Version: 1.0
>X-Virus-Scanned: by amavisd-new at stat.math.ethz.ch
>Content-Disposition: inline
>Subject: [R] Sample selection problem
>X-BeenThere: r-help@r-project.org
>X-Mailman-Version: 2.1.9
>List-Id: "Main R Mailing List: Primary help"
>List-Unsubsc
On 10/3/07, stat stat <[EMAIL PROTECTED]> wrote:
> I want to get a sample of some arbitrary size from a population having only
> two values 0 and 1 with replacement, but with different probability for
> selection. For example 0 will be selected with probability 0.4 and 1 with
> 0.6. I could use
I want to get a sample of some arbitrary size from a population having only two
values 0 and 1 with replacement, but with different probability for selection.
For example 0 will be selected with probability 0.4 and 1 with 0.6. I could use
sample function i.e. sample(c(0,1), 30, T) to get this, h
3 matches
Mail list logo