get_densfun | R Documentation |
stats::family
objectThis function is useful for evaluating data against the implied density of a fitted glm
object
get_densfun(family)
family |
an object of type |
A function with arguments x
(data), eta
, (linear predictor from glm
object), dispersion
(summary(m)$dispersion
where m
is a fitted glm
), and n
, vector of group sizes (optional unless family=binomial)
fam = Gamma('log') densfun = get_densfun(fam) densfun(0.2, eta = 2, dispersion=0.5) # the above is equivalent to: dgamma(0.2, scale = exp(2), shape = 1/0.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.