[R-sig-eco] Using multiple species data for gam

Greg Guerin greg.guerin at adelaide.edu.au
Thu Feb 12 00:38:37 CET 2015


Hello,

not sure if you are looking to run the GLM/GAMs individually but in one
run, or as a community composition type model to test main
drivers/correlates of combined species occurrences. If the latter, another
option is a GLMM with species having random slope to allow responses to
differ. For this, you would need to stack the occurrence matrix into a
Œlong¹ format (a row for the presence/absence of each species in each plot
with corresponding predictor variables and a field for species).

Response Species Temp Pptn

0	Sp1	30	1000
1	Sp2	30	1000
1	Sp3	30	1000

In lme4, something like:
lmer(Response ~ Temp + Pptn + (1 + Temp + Pptn|Species),
family=binomial(link="logit"), data)

An example with R code in the Appendix:
http://dx.doi.org/10.1111/jvs.12111

Greg

--
Dr Greg Guerin
Postdoctoral Fellow
School of Biological Sciences, Faculty of Science
The University of Adelaide

CRICOS Provider Number 00123M
-----------------------------------------------------------
IMPORTANT: This message may contain confidential or legally privileged
information. If you think it was sent to
you by mistake, please delete all copies and advise the sender. For the
purposes
of the SPAM Act 2003, this
email is authorised by The University of Adelaide.





>
>----------------------------------------------------------------------
>
>Message: 1
>Date: Tue, 10 Feb 2015 09:28:14 -0700
>From: Tim Meehan <tmeeha at gmail.com>
>To: Rajendra Mohan panda <rmp.iit.kgp at gmail.com>
>Cc: "r-sig-ecology at r-project.org" <r-sig-ecology at r-project.org>
>Subject: Re: [R-sig-eco] Using multiple species data for gam
>Message-ID:
>	<CAMTWOzpv58RRX2ocgTCpXh1EPAcxzkSCGKHvdUsaytGhCJH8MQ at mail.gmail.com>
>Content-Type: text/plain; charset="UTF-8"
>
>If you want to do this in a glm framework, you might look into the mvabund
>package:
>
>http://cran.r-project.org/web/packages/mvabund/mvabund.pdf
>
>I've never used it with anything approaching 1000 species, though.
>
>On Tue, Feb 10, 2015 at 2:41 AM, Rajendra Mohan panda
><rmp.iit.kgp at gmail.com
>> wrote:
>
>> Dear All
>>
>> I have >1000 species with presence and absence (0 or 1) values and with
>> seven corresponding predictor variables. If I can run gam/glm for the
>>data
>> using all species data simultaneously vs predictors. Data are arranged
>>in
>> columns against their GPS locations (see below). I know it is possible
>>to
>> do separately for each species.
>>
>> Your kind response is highly appreciated.
>>
>> Sites  Sp1  Sp2 Sp3 Alt Temp Pptn   Ft
>> 1A         0      1    1     20   30     1000 Evergreen
>>
>> With Best Regards
>> Rajendra M Panda
>> School of Water Resources
>> Indian Institute of Technology Kharagpur, India
>>
>>         [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-ecology mailing list
>> R-sig-ecology at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>>
>
>	[[alternative HTML version deleted]]
>
>



More information about the R-sig-ecology mailing list