[R] Draw a random number about the fitting of a glm model using family=quasi

jpl s-jlubben1 at math.unl.edu
Thu May 7 16:18:01 CEST 2009


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.




More information about the R-help mailing list