Hi:

I don't believe you've provided quite enough information just yet...

On Fri, Oct 15, 2010 at 2:22 AM, John Haart <another83@me.com> wrote:

> Dear List,
>
> I am doing some simulation in R and need basic help!
>
> I have a list of animal families for which i know the number of species in
> each family.
>
> I am working under the assumption that a species has a 7.48% chance of
> being at risk.
>

Is this over all families, or within a particular family? If the former, why
does a distinction of family matter?

>
> I want to simulate the number of species expected to be at risk under a
> random binomial distribution with 10,000 randomizations.
>

I guess you've stated the p, but what's the n? The number of species in each
family? If you're simulating on a family by family basis, then it would seem
that a binomial(nspecies, 0.0748) distribution would be the reference.
Assuming you have multiple families, do you want separate simulations per
family, or do you want to do some sort of weighting (perhaps proportional to
size) over all families? The latter is doable, but it would require a
two-stage simulation: one to randomly select a family and then to randomly
select a species.

Dennis


>
> I am relatively knew to this field and would greatly appreciate a
> "idiot-proof" response, I.e how should the data be entered into R? I was
> thinking of using read.table, header = T, where the table has F = Family
> Name, and SP = Number of species in that family?
>
> John
>
> ______________________________________________
> 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.
>

	[[alternative HTML version deleted]]

