[R] Simulating from the Null
Ben Bolker
bbolker at gmail.com
Mon Aug 1 04:12:51 CEST 2011
Jim Silverton <jim.silverton <at> gmail.com> writes:
>
> Hello all,
> I am doing glm with a negative binomial link.
> I have two treatments and 3 replicates in each treatment. My question is
> this, how can I simulate data for the the columns from the null and
[alternative?]
> distribution.
>
Simulate from the null:
fit the null model and use the simulate method:
nullmodel <- glm.nb(response~1,data=yourdata)
simulate(nullmodel)
Simulate from the fitted distribution: as above, but
fit the full model.
More information about the R-help
mailing list