[R] Zero Inflated Models - Plotting Results

lieslpe liesl.erb at colorado.edu
Tue Oct 2 18:56:06 CEST 2012


Dear SamiC,
I am also attempting to plot my zero inflated model on my data. Did you find
a solution? Does anyone else on this list have a solution?

Thanks,
Liesl 

Message from SamiC Jun 30, 2011:
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.




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



More information about the R-help mailing list