get_simfun | R Documentation |
stats::family
objectThis function is useful for simulating data that will follow a certain glm
model
get_simfun(family)
family |
an object of type |
A function that can receive a linear predictor as input and return simulated samples based on the family and link specification in the stats::family
object. The arguments of this function are: eta
, vector of linear predictors; dispersion
, the return value of summary(model)$dispersion
, where model
is a fitted glm
object; and n
, vector of group sizes (optional unless family=binomial)
fam = Gamma('log') simfun = get_simfun(fam) sims = simfun(eta = 1, dispersion=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.