simulate_from_family: Simulate response from a GLM family
Description
Draw random samples from the distribution specified by a GLM family object.
Usage
simulate_from_family(mu, family, n, nygrid)
Value
Numeric matrix (n x nygrid) of simulated response values.
Arguments
- mu
Numeric matrix (n x nygrid) of mean values on the response scale.
- family
A family object (e.g., binomial(), poisson()).
- n
Number of observations.
- nygrid
Number of response grid points.