it is easy to fit a distribution using fitdistr poisdata <- rpois(n = 100, lambda = 2) poismle <- fitdistr(poisdata, "Poisson") poismle
but i would like to know whether its possible to get an identical result using glm. I use poistab <- data.frame(table(poisdata)) colnames(poistab) <- c("width","freq"); poistab[,"width"] <- as.numeric(poistab[,"width"]) glm(freq ~ 1-width, family = poisson, data = poistab) but the results are always different. cheers, vumani ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html