[R] Quasi-Binomial simulation
Ben Bolker
bbolker at gmail.com
Tue Oct 4 14:14:33 CEST 2011
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")
More information about the R-help
mailing list