Displaying 1 result from an estimated 1 matches for "simuldata".
Did you mean:
simuldat
2008 Nov 20
0
generate random number
...n)
treat.rep <- rep(treat, each = p)
X <- cbind(1, treat.rep,
time.rep, treat.rep * time.rep) # fixed effects design matrix
muY <- plogis(c(X %*% betas) + b[id]) # conditional probabilities
y <- rbinom(N, 1, muY) # simulate binary responses
# put the simulated data in a data.frame
simulData <- data.frame(
id = id,
y = y,
treat = treat.rep,
time = time.rep
)
# fit the model
library(glmmML)
fit <- glmmML(y ~ treat * time, data = simulData, cluster = id)
summary(fit)
I hope it helps.
Best,
Dimitris
Odette Gaston wrote:
> Hi everybody,
>
> I am cu...