[R] Zero Inflated Models - Plotting Results

SamiC s.cox.10 at aberdeen.ac.uk
Thu Jun 30 19:41:05 CEST 2011


Hi,

I am fitting a zero inflated negative binomial model to my data.  I have
pretty much got my selected model and now i am wanting to plot the model to
the origional data.

Example.

f8<-formula(Birds~Tide+Fish+Zooplankton+Chlorophylla|StratificationIndex)
Nb8<-zeroinfl(f8, dist="negbin", link= "logit", data=ocean)

Tide is a factor, so i assume i have to plot a different graph for each
level of the factor.

what i essentially want to do is plot a graph for each variables against
birds with the fitted line of the model.

I have been using the predict function, but i get the same trend for every
graph and variable.  I was reading that the predict function gives a mean
across all the values (or something to this effect).

Does anyone know how to code for this in R.  from the above model i want to
plot birds~fish (the original data) and then fit the line of the
relationship from the model.

Thanks





--
View this message in context: http://r.789695.n4.nabble.com/Zero-Inflated-Models-Plotting-Results-tp3636373p3636373.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list