saber fallahpour <s_fallahpour <at> yahoo.com> writes: > > Hi > I want to do simulation on quasi-binomial distribution with some covariates. > Does anyone have an idea how to do that? >
There is no such thing as a quasi-binomial distribution, but if you parameterized the beta-binomial distribution appropriately I think it would be straightforward to generate discrete data with a specified maximum value, a mean that was specified by an inverse-link function and a design matrix applied to the covariates, and had a variance proportional (but not equal) to n*p*(1-p). For comparison, you might want to look up the "negative binomial type I" as defined by Hardin and Hilde, which is "quasi-Poisson" in the same sense. See ?model.matrix ?plogis ?dbetabinom in the emdbook package (and probably elsewhere: install the sos package and try findFn("beta-binomial") ______________________________________________ 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.