How do I conduct a simulation using a logistic model with multiple covariates using R? I'm investigating the asymptotic normality of the estimators of the logistic model. I wish to do a simulation to show that the standard error decreases as sample size n increases. Assume i have explanatory variables x1, x2,...,x7 and response variable y. How do I do this?
 A: Are the x values fixed? or do you want to simulate them as well? from what distribution?
What parameters are you planning on using?
Is your response variable binary (0 or 1) or is it continuous between 0 and 1?  (I have heard both cases refered to as logistic).
The general proceedure is to generate the x data, either from a distribution or a set of fixed values.
Combine the x values and their coefficients to form the linear estimate (this is just arithmatic).
Do any appropriate transformations (inverse logistic in your case).
generate the respones variables from the transformed linear predictor (possibly involving addtional parameters)
Analyze the data and extract the value(s) of interest.
repeat a bunch of times.
If you can give us more details and a clearer picture of what you are trying to do, we may be able to be more specific.
Here is some example code that may get you started:
simfun <- function(n, beta) {
    x <- cbind(1, matrix( rnorm(n*7), ncol=7 ) )
    eta <- x %*% beta
    p <- exp(eta)/(1+exp(eta))
    y <- rbinom( n, 1, p )
    tmp.df <- as.data.frame(x[,-1])
    tmp.df$y <- y
    glm( y ~ ., data=tmp.df, family=binomial )
}

out <- replicate(100, simfun(100, c(0.5, (1:7)/10)), simplify=FALSE )

You can then use sapply to extract the information of interest from the out list.
