I don't think we have enough information to help you with this.
Do you intent the simulated values for growthrate to be selected from the
values in daT$growthrate? Or do these values define a distribution of values
(perhaps ranging between 0 and 1) and the simulation should use that empirical
On 04/08/2013 09:30, Rui Barradas wrote:
Hello,
See the help page for ?sample.
X <- sample(0:1, 1, replace = TRUE, prob = c(0.25, 0.75))
Hope this helps,
?rbinom would have been a better answer since simpler, faster,
algorithms are available in that case.
Or even
as.integer(runif(100
Thank you very much guys
On Sun, Aug 4, 2013 at 3:51 PM, Prof Brian Ripley wrote:
> On 04/08/2013 09:30, Rui Barradas wrote:
>
>> Hello,
>>
>> See the help page for ?sample.
>>
>> X <- sample(0:1, 1, replace = TRUE, prob = c(0.25, 0.75))
>>
>> Hope this helps,
>>
>
> ?rbinom would have been
So you looked at some unspecified help pages online and tried some unspecified
stuff? Try being more specific next time you post. For example, try reading the
footer of any R-help email. Note that it says read the Posting Guide, and
provide a reproducible example (at least of what you tried that
Hello,
See the help page for ?sample.
X <- sample(0:1, 1, replace = TRUE, prob = c(0.25, 0.75))
Hope this helps,
Rui Barradas
Em 04-08-2013 08:51, Preetam Pal escreveu:
Hi All,
I want to simulate a random variable X which takes values 1 and 0 with
probabilities 75% and 25% respectively
look at functions replicate and mvrnorm functions (the later in the MASS
package).
On Sat, Dec 1, 2012 at 12:02 PM, mboricgs wrote:
> Hello!
>
> How can I do 100 simulations of length 17 from bivariate bivariate normal
> distribution, if I know all 5 parameters?
>
>
>
> --
> View this message
6 matches
Mail list logo