jpl
2009-May-07 14:18 UTC
[R] Draw a random number about the fitting of a glm model using family=quasi
Hi, I desire to draw a random number about the fitting of a glm model using a quasi linear error distribution. For example, if my family is poisson, then this is what I want: model1 = glm(amount~days,family=poisson(link="log"),data=dataset1) mean1 = predict(model1,newdata =data.frame(days=time),type="response") rpois(length(mean1),mean1) But I wish to change my model to: model2 = glm(amount~days,family=quasi(link="log", variance="mu"),data=dataset2) mean2 = predict(model2,newdata =data.frame(days=time),type="response") Is there a way to draw a random number about the mean when I have a quasi-linear error distribution? Thanks. -- View this message in context: http://www.nabble.com/Draw-a-random-number-about-the-fitting-of-a-glm-model-using-family%3Dquasi-tp23427875p23427875.html Sent from the R help mailing list archive at Nabble.com.