Hi all, I am using GLM (logistic model) to study the rainfall occurrence. Here is my glm model, an example to interpret: glm(formula = y ~ x , family = binomial(link = "logit")) y -- rainfall occurrence (0 or 1) at a given day in a year x -- previous rainfall occurrence After fitting the model, I am hoping to perform the simulation (e.g. run 1000 times) based on the previous rainfall occurrence (e.g. January 1) to generate the following sequences of wet and dry days but I don't know how to realize it in R. Does it need a a random number binomially distributed ? Any suggestions would be appreciated in advance! Best wishes -- Wang Yi START Regional Center for Temperate East Asia(TEA), Institute of Atmospheric Physics(IAP), Chinese Academy of Sciences(CAS), Qijiahuozi Huayanli 40#, P.O.Box 9804, Beijing 100029,China E-mail:wangyi at tea.ac.cn