[R] Help on adding a negative binomial density plot
David
dasolexa at hotmail.com
Mon Oct 2 11:05:42 CEST 2017
Dear list,
I am just starting on analysis of count data in R 3.4.0. My dataset was obtained from counting particles on a surface before andd after a cleaning process. The sampling positions on the surface are pre-defined and are the same before and after cleaning. I have ~20% of 0's. I want to know if the cleaning process was useful at reducing the number of particles.
I first fit a negative binomial model using
> nbFit<-glmer.nb(Count ~ Cleaning + (1|Sampling_point) , data = myCountDB)
I now would like to add a curve to the histogram representing the negative binomial density function fitted to my data using
> curve(dnbinom(x=, size=, prob=, mu=), add=TRUE)
But I am struggling defining the arguments to dnbinom.
Using the str() function on the nbFit object I see there are many fields returned. And I get lost reading the ?glmer.nb help, greatly because of my lack of knowledge. Which ones should I use?
Thanks ever so much for your valuable help
Dave
[[alternative HTML version deleted]]
More information about the R-help
mailing list