I meant to write "logit transformation” not “logic”. 

I haven’t read too much about beta regression and the article I posted doesn’t mention it, but Peter’s advice sounds good too. 

Mollie

------------------------
Mollie Brooks, PhD
Postdoctoral Researcher, Population Ecology Research Group http://www.popecol.org
Institute of Evolutionary Biology & Environmental Studies, University of Zürich



On 28 Nov 2013, at 10:17 AM, Peter Solymos <solymos@ualberta.ca> wrote:

> So you want like a dose-response relationship using proportions of time as
> response if I understand correctly. And you are worried that some
> overdispersion might be present. The beta regression deals with continuous
> proportions as outcome and you can model overdispersion (even as a function
> of covariates) in the betareg package. The only restriction there is that
> you can't have 0 or 1 as response (some of the package authors have papers
> about zero-and-one-inflated beta regression which does not seem overly
> complicated to implement in R).
> 
> Peter
> 
> --
> Péter Sólymos, Dept Biol Sci, Univ Alberta, T6G 2E9, Canada AB
> solymos@ualberta.ca, Ph 780.492.8534, http://psolymos.github.com
> Alberta Biodiversity Monitoring Institute, http://www.abmi.ca
> Boreal Avian Modelling Project, http://www.borealbirds.ca
> 
> 
> On Wed, Nov 27, 2013 at 6:08 PM, marieline gentes <mlgentes2@yahoo.com>wrote:
> 
>> Hello Chris and Peter,
>> 
>> Thank you very much for your quick answers. But as I pointed out, this
>> study really is not a resource selection project (sorry I did not provide
>> more background). We are not really interested in knowing why the birds are
>> going to a specific habitat rather than an other habitat. The global aim is
>> to investigate the effects of habitat use on contaminant profiles, and the
>> target audience is ecotoxicologists....The question I presented here is
>> just a very small portion of the analysis : we just want to provide a very
>> basic description of whether males and females spend the same proportion of
>> their time in each of our habitats, if year has an effect, and a few other
>> very basic descriptive trends.
>> 
>> The bulk of the analysis focuses on the links between % contaminant
>> (response variable) and habitat use (independant variable), and I will be
>> using a logit transform on % contaminants followed by linear models, as
>> described in David I. Warton and Francis K. C. Hui 2011. The arcsine is
>> asinine: the analysis of proportions in ecology. Ecology 92:3–10.
>> http://dx.doi.org/10.1890/10-0340.1.
>> 
>> So back to my original question: Chris - yes, it seems that I won't get
>> away without going back to the original binary data if I want to take into
>> account the repeated/random effects created by a bird having multiple data
>> points.
>> 
>> I am also wondering if it would be terribly wrong to simply use a logit
>> transform on the % of time in each habitat ? I would then have only one
>> data point for each bird. This mean the data would be treated as a real
>> proportion, not as binomial anymore. But since the sampling intensity is
>> the same for each bird, i.e., the same denominator (the same total number
>> of GPS positions for each bird), maybe the results would be almost
>> identical ?
>> 
>> Thank you so much again for your time,
>> 
>> Marie
>> 
>> 
>> 
>> 
>>  On Wednesday, November 27, 2013 7:19:47 PM, Peter Solymos <
>> solymos@ualberta.ca> wrote:
>> Chris,
>> 
>> It is not random effect strictly speaking, but something like that. The
>> problem is this: RSF models are often constructed as mixed models with
>> random intercept. But it is known that the intercept is a function of the
>> other parameters and the available (background) distribution. So a random
>> intercept is then hard to justify, but still used quite a bit.
>> 
>> The matched design in RSF/RSPF is analogous to the matched case-control
>> design in logistic regression. So one can specify a global availability
>> (all pixels in a landscape are equally available for each individual), or
>> local availability (used points and available points in the vicinity are
>> matched for each individual separately).
>> 
>> I hope this clarifies the issue. Cheers,
>> 
>> Peter
>> 
>> --
>> Péter Sólymos, Dept Biol Sci, Univ Alberta, T6G 2E9, Canada AB
>> solymos@ualberta.ca, Ph 780.492.8534, http://psolymos.github.com
>> Alberta Biodiversity Monitoring Institute, http://www.abmi.ca
>> Boreal Avian Modelling Project, http://www.borealbirds.ca
>> 
>> 
>> On Wed, Nov 27, 2013 at 4:50 PM, Chris Howden <
>> chris@trickysolutions.com.au> wrote:
>> 
>> Hi Peter,
>> 
>> Does it have the ability to fit random effects? Or some other way to
>> address the pseudoreplication expected in RSF studies using GPS fix data
>> with little time between fixes ? (Just had a quick look at the rspf
>> package and I couldn't see any)
>> 
>> 
>> 
>> Chris Howden B.Sc. (Hons) GStat.
>> Founding Partner
>> Evidence Based Strategic Development, IP Commercialisation and Innovation,
>> Data Analysis, Modelling and Training
>> (mobile) 0410 689 945
>> (skype) chris.howden
>> chris@trickysolutions.com.au
>> 
>> 
>> 
>> 
>> Disclaimer: The information in this email and any attachments to it are
>> confidential and may contain legally privileged information. If you are
>> not the named or intended recipient, please delete this communication and
>> contact us immediately. Please note you are not authorised to copy, use or
>> disclose this communication or any attachments without our consent.
>> Although this email has been checked by anti-virus software, there is a
>> risk that email messages may be corrupted or infected by viruses or other
>> interferences. No responsibility is accepted for such interference. Unless
>> expressly stated, the views of the writer are not those of the company.
>> Tricky Solutions always does our best to provide accurate forecasts and
>> analyses based on the data supplied, however it is possible that some
>> important predictors were not included in the data sent to us. Information
>> provided by us should not be solely relied upon when making decisions and
>> clients should use their own judgement.
>> 
>> 
>> -----Original Message-----
>> From: r-sig-ecology-bounces@r-project.org
>> [mailto:r-sig-ecology-bounces@r-project.org] On Behalf Of Peter Solymos
>> Sent: Thursday, 28 November 2013 10:33 AM
>> To: marieline gentes
>> Cc: r-sig-ecology@r-project.org
>> Subject: Re: [R-sig-eco] Logistic regression with repeated measures ?
>> 
>> Marie,
>> 
>> Your problem and data seems to me a resource selection problem with
>> matched use-availability design. Estimating procedure for that design is
>> discussed in Lele and Keim (2006, Ecology 87:3021--3028) and implemented
>> in the ResourceSelection package: rspf function, see description of
>> argument 'm'
>> for specifying matched points for individual birds. The output is a model
>> for probability of selection given the distribution of environmental
>> covariates available for these specific individuals.
>> 
>> Cheers,
>> 
>> Peter
>> 
>> --
>> PC)ter SC3lymos, Dept Biol Sci, Univ Alberta, T6G 2E9, Canada AB
>> solymos@ualberta.ca, Ph 780.492.8534, http://psolymos.github.com Alberta
>> Biodiversity Monitoring Institute, http://www.abmi.ca Boreal Avian
>> Modelling Project, http://www.borealbirds.ca
>> 
>> 
>> On Wed, Nov 27, 2013 at 2:29 PM, marieline gentes
>> <mlgentes2@yahoo.com>wrote:
>> 
>>> Dear list,
>>> 
>>> I am a bit new to logistic regressions. I am working with GPS data
>>> from GPS-tracked birds. My objective is to investigate whether various
>>> covariates influence the probabilty of visiting specific habitats.
>>> Each bird has visited many habitats during the course of its GPS
>> tracking.
>>> 
>>> Here is a small sample of the data:
>>> 
>>> Bird.ID Year Sex body.index Recapt PrevWeek.Rain AgriYes AgriNo
>>> UrbanYes UrbanNo CAL 2010 M 21.99155 13-May-10 1.43 0 100 0 100 CAO
>>> 2011 F -19.91797 27-Apr-11 4.23 54 46 9 91 CFL 2010 F 25.61063
>>> 12-May-10 2.16 31 69 2 98 CFP 2010 M -30.65814 13-May-10 1.43 60 40 0
>>> 100
>>> 
>>> I understand that I have to use logistic regression, with a cbind
>>> code, because my response variable is not binary anymore (the response
>>> is a summary of the success vs failures).
>>> 
>>> Based on R tutorials, I am thinking about codes that would look like
>> this:
>>> 
>>> Agri.RainSex = glm(cbind(AgriYes, AgriNo) ~ PrevWeekRain + Sex + Year
>>> + Year*Sex,family=binomial (logit), data=mydata) However, contrary to
>>> the examples I see online, my data are from individual birds, not from
>>> groups of birds. If I had been using the raw binary data, each bird
>>> would have 100 hundred lines (I converted the percentages into
>>> success/failures)(all my % are weighted the same - that is not a
>>> problem here). Am I supposed to take into account some kind of
>>> repeated measure in my model ?
>>> 
>>> Notes:
>>> For people who are thinking about overdispersed data: my data does not
>>> seem to be overdispersed. But I will inspect that after I am confident
>>> that my basic model is ok. So this question is about dealing with
>>> repeated measured, not about adding a random intercept for
>> overdispersion.
>>> 
>>> For people who are working with habitat selection models: this is not
>>> the case here. We are not working on resource selection. We want to
>>> fit a simple logistic regression on this data as a part of data
>>> exploration. This ultimate goal is to link contaminant burden with the
>>> proportion of time spent in a given habitat.
>>> 
>>> Thank you for your advice,
>>> 
>>> Marie
>>>        [[alternative HTML version deleted]]
>>> 
>>> 
>>> _______________________________________________
>>> R-sig-ecology mailing list
>>> R-sig-ecology@r-project.org
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>>> 
>>> 
>> 
>>        [[alternative HTML version deleted]]
>> 
>> 
>> 
>> 
>> 
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


	[[alternative HTML version deleted]]

