Hello, I have a weird problem here. What I want to do is that I need to draw 1000 samples from a matrix, and use glm on them.
when I used this command, it runs without the problem > qdata.glm = glm(X258 ~ ., family = binomial, data = q2data[sample(dim(q2data)[1], 1000), ]) but if I drew the sample first and run glm() on that sample, it gave a warning. > qdata.sample = q2data[sample(dim(qdata)[1], 1000), ] > qdata.glm = glm(X258 ~ ., family = binomial, qdata.sample) Warning message: In glm.fit(x = X, y = Y, weights = weights, start = start, etastart = etastart, : fitted probabilities numerically 0 or 1 occurred Because I need to use that same sample later, I have to save it in qdata.sample. therefore the first command does not work in my case because I cannot actually get the same 1000 sample after that. anyone knows how to solve this? Thanks! [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.