[R-sig-ME] ggplot of Hurdle model

Highland Statistics Ltd highstat at highstat.com
Thu Nov 2 20:17:23 CET 2017


> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 2 Nov 2017 14:52:29 +0100
> From: andreu blanco <andreu.blanco at gmail.com>
> To: r-sig-mixed-models at r-project.org
> Subject: [R-sig-ME] ggplot of Hurdle model
> Message-ID:
> <CAOy7hbCs_niPqWPN-u+zDrgSczfi9J1pHFbPhTc6L_WunY35DQ at mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> According to the information in the Zuur's book "Begginers guide to
> Zero-inflated models with R", I see they suggest a graph to add to the
> research paper. However I don't know how to sketch the model fit to my
> results.
That book contains fully worked out ggplot2 code to sketch the two 
individual components of a hurdle model, and also the expected values of 
the actual hurdle model. Based on your str output below I see you have 
only factors and biomass. So..you can visualise the Bernoulli GLM, and 
you can also visualise the Gamma GLM. Just use geom_errorbar instead of 
geom_ribbon when plotting the results (because you only have factors). 
Being a PhD student means that you should be able to figure this out.

Note that 80 observations is rather small for the things that you are 
(probably) doing. I hope there are no random effects involved.....though 
given the fact that you use glmer it seems that you do.

Kind regards,

Alain

>
> My data structure is:
>
>> str(Aarmata)
> 'data.frame': 80 obs. of  6 variables:
>   $ Location  : Factor w/ 8 levels "C1","C2","O",..: 1 1 1 1 1 5 5 5 5 
> 5 ...
>   $ Protection: Factor w/ 2 levels "C","P": 1 1 1 1 1 2 2 2 2 2 ...
>   $ Exposure  : Factor w/ 2 levels "E","S": 1 1 1 1 1 1 1 1 1 1 ...
>   $ replicates: int  1 2 3 4 5 1 2 3 4 5 ...
>   $ Biomass   : num  124.8 104.8 139.2 102.6 62.9 ...
>
> Any suggestion would be highly appreciated.
>
> Andreu

-- 

Dr. Alain F. Zuur
Highland Statistics Ltd.
9 St Clair Wynd
AB41 6DZ Newburgh, UK
Email: highstat at highstat.com
URL: www.highstat.com

And:
NIOZ Royal Netherlands Institute for Sea Research,
Department of Coastal Systems, and Utrecht University,
P.O. Box 59, 1790 AB Den Burg,
Texel, The Netherlands



Author of:
1. Beginner's Guide to Spatial, Temporal and Spatial-Temporal Ecological 
Data Analysis with R-INLA. (2017).
2. Beginner's Guide to Zero-Inflated Models with R (2016).
3. Beginner's Guide to Data Exploration and Visualisation with R (2015).
4. Beginner's Guide to GAMM with R (2014).
5. Beginner's Guide to GLM and GLMM with R (2013).
6. Beginner's Guide to GAM with R (2012).
7. Zero Inflated Models and GLMM with R (2012).
8. A Beginner's Guide to R (2009).
9. Mixed effects models and extensions in ecology with R (2009).
10. Analysing Ecological Data (2007).


	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list