if you want to sample integers in [1, 33K] without replacement:
theSample = sample(33000, 18000)
b
On Sep 23, 2009, at 7:29 PM, phoebe kong wrote:
Hi all,
I would like to generate ~18K random number from range 1 to ~33K.
I was thinking to use round(runif(18000,1,33000)), however the some
Hi all,
I would like to generate ~18K random number from range 1 to ~33K.
I was thinking to use round(runif(18000,1,33000)), however the some random
numbers generated are repeated.
Do you know a better way?
thanks,
phoebe
[[alternative HTML version deleted]]
__
Hi Dimitris,
Appreciate for your reply with detailed information, many thanks!
I realize that generating random number won't be so simple more than I
expected, but got some hints from the advice. I am actually hoping to do a
parametric bootstrap likelihood test, because this is the way of testing
check the following code:
# settings
n <- 100 # number of sample units
p <- 10 # number of repeated measurements
N <- n * p # total number of measurements
t.max <- 3
# parameter values
betas <- c(0.5, 0.4, -0.5, -0.8) # fixed effects (check also 'X' below)
sigma.b <- 2 # random effects variance
Hi everybody,
I am currently working on glmmML() and wish to generate random number to do
some tests, however, glmm was hypothesized the mixed distributions with
normal and binomial in terms of having a random effect. How would you be
able to generate random number in this case? Is there a functi
5 matches
Mail list logo