On 02-May-07 07:45:48, Prof Brian Ripley wrote:
> Please do not send everything twice: you are using R-help in both the
> To:
> and Cc: fields.
>
> I disagree with Ted: it _is_ much easier to create a generator for this
> purpose.
>
> Consider
>
> rtgamma <- function(n, ..., tr = log(500))
[EMAIL PROTECTED]
Gesendet: Dienstag, 1. Mai 2007 20:18
An: Thür Brigitte
Cc: r-help@stat.math.ethz.ch
Betreff: RE: [R] Simulation using parts of density function
On 01-May-07 17:03:46, Thür Brigitte wrote:
Hi
My simulation with the followin R code works perfectly:
sim <- replicate(999, sum(exp(
remain<-(x - length(sim))
}
sim<-sim[1:x]}
sim.test <- rbind(sim.test, c(value=sum(sim)))
Thanks for any help,
Brigitte
-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 1. Mai 2007 20:18
An: Thür Brigitte
Cc: r-help@st
On 01-May-07 17:03:46, Thür Brigitte wrote:
>
> Hi
>
> My simulation with the followin R code works perfectly:
> sim <- replicate(999, sum(exp(rgamma(rpois(1,2000),
> scale = 0.5, shape = 12
>
> But now I do not want to have values in object "sim" exceeding
> 5'000'000, that means that I am
Hi
My simulation with the followin R code works perfectly:
sim <- replicate(999, sum(exp(rgamma(rpois(1,2000), scale = 0.5, shape = 12
But now I do not want to have values in object "sim" exceeding 5'000'000, that
means that I am just using the beginning of densitiy function gamma x < 15.4.