[R-sig-ME] BLUPs in relation to fixed effect interaction
Bunnefeld, Nils
n.bunnefeld06 at imperial.ac.uk
Thu Jun 14 09:58:01 CEST 2012
Thanks Luca,
That works very well. Thanks for the paper link, very useful.
Cheers,
Nils
*-----Original Message-----
*From: prvs=151105a2de=lborger at cebc.cnrs.fr
*[mailto:prvs=151105a2de=lborger at cebc.cnrs.fr] On Behalf Of Luca Borger
*Sent: 13 June 2012 11:33
*To: Bunnefeld, Nils
*Cc: 'r-sig-mixed-models at r-project.org'
*Subject: Re: [R-sig-ME] BLUPs in relation to fixed effect interaction
*
*Hello,
*
* >We are interested in how much the villages deviate from the estimate
*of the interaction Question*treat
*
*not sure I got your design and question right, but why not including a
*random slope (with the constraint that the covariate cannot be constant
*within each level
*of the grouping factor of the random effect)?
*
*More generally, I wonder if psychometric methods and item response
*theory might be of interest to you (apologies if I'm misunderstanding):
*http://www.jstatsoft.org/v20/a02/paper
*
*
*
*Cheers,
*Luca
*
*
*
*# Forthcoming book chapter
*# Dispersal Ecology and Evolution (ch. 17)
*# http://ukcatalogue.oup.com/product/9780199608904.do
*---------------------------------------------------------------------
*Luca Borger
*Postdoctoral Research Fellow
*Centre d'Etudes Biologiques de Chizé
*CNRS (UPR1934); INRA (USC1339)
*79360 Villiers-en-Bois, France
*
*Tel: +33 (0)549 09 96 13
*Fax: +33 (0)549 09 65 26
*email: lborger at cebc.cnrs.fr
*Web: http://cnrs.academia.edu/LucaBorger
*Researcher ID: http://www.researcherid.com/rid/C-6003-2008
*Google Scholar: http://scholar.google.com/citations?user=D5CTvNUAAAAJ
*---------------------------------------------------------------------
*# Newly published! Animal Migration: A synthesis (ch. 8):
*# http://ukcatalogue.oup.com/product/9780199568994.do
*
*Le 13/06/2012 11:33, Bunnefeld, Nils a écrit :
*> Dear List,
*>
*>
*> We are using an unmatched count technique to understand the prevalence
*of illegal hunting. This method is used to make sure people are
*anonymous and thus hopefully give honest answers about their illegal
*activity. People are allocated to two treatments and get either a card
*with four activities (teaching, farming, livestock herding and trading,)
*or with five activities (teaching, farming, livestock herding, trading
*and hunting of which one is the sensitive question). The respondents
*then indicate how many activities they are involved in on their card. We
*have also asked each person four times the same question but wanted to
*know whether each of the activities relate to the dry or wet season and
*whether it was for cash or non-cash. So we have Counts as a dependent
*variable as the number of activities each person does, Question with
*four levels (cash dry, cash wet, NonCash dry, NonCash wet), treat with
*two levels (card with 4 activities, card with 5 activities including the
*se!
*> nsitive question, Treatment). We have run the model below with
*Village and id as random effects.
*>
*> We are now interested why villages are different from each other and
*extracted the random effects BLUPs using ranef() to be able to use
*village level explanatory variables in a new model (e.g. distance to
*protected area). This will give us the estimate how much each village
*deviates from the overall number of activities, the overall intercept;
*not really what we are interested in. We are interested in how much the
*villages deviate from the estimate of the interaction Question*treat
*because this gives us estimates about the prevalence of illegal hunting
*in the different seasons rather than the number of activities people are
*involved in. Any comments or ideas how to implement this in R would be
*greatly appreciated. An output from our model is below.
*>
*> Many thanks,
*> Nils
*>
*>
*>> library(lme4)
*>
*>> m1 <- lmer(Counts~Question*treat+(1|Village/id),data=data2,REML=F)
*>
*>
*>
*>> summary(m1)
*>
*> Linear mixed model fit by maximum likelihood
*>
*> Formula: Counts ~ Question * treat + (1 | Village/id)
*>
*> Data: data2
*>
*> AIC BIC logLik deviance REMLdev
*>
*> 7806 7876 -3892 7784 7825
*>
*> Random effects:
*>
*> Groups Name Variance Std.Dev.
*>
*> id:Village (Intercept) 0.21712 0.46596
*>
*> Village (Intercept) 0.13535 0.36791
*>
*> Residual 0.23434 0.48409
*>
*> Number of obs: 4356, groups: id:Village, 1092; Village, 15
*>
*>
*>
*> Fixed effects:
*>
*> Estimate Std. Error t value
*>
*> (Intercept) 1.488733 0.099243 15.001
*>
*> QuestionCash wet 0.095400 0.029285 3.258
*>
*> QuestionNonCash Dry 0.285618 0.029226 9.773
*>
*> QuestionNonCash Wet 0.514709 0.029226 17.611
*>
*> treatTreatment 0.184647 0.040999 4.504
*>
*> QuestionCash wet:treatTreatment -0.065976 0.041561 -1.587
*>
*> QuestionNonCash Dry:treatTreatment0.005799 0.041520 0.140
*>
*> QuestionNonCash Wet:treatTreatment-0.030882 0.041532 -0.744
*>
*>
*>
*>
*>
*>> ranef(m1)
*>
*> $Village
*>
*> (Intercept)
*>
*> Guta 0.0822752928
*>
*> Hunyari -0.0614857190
*>
*> Ketembere 0.6976740857
*>
*> Kitunguruma -0.3494539970
*>
*> Koreri -0.1217766001
*>
*> Kunzugu -0.4999783998
*>
*> Ligamba -0.4522420174
*>
*> Makundusi 0.8675942165
*>
*> Manyamanyama -0.1824419221
*>
*> Merenga -0.0006875998
*>
*> Migungani -0.1540653530
*>
*> Morotonga 0.1473949913
*>
*> Nyamburu -0.1751358164
*>
*> Nyamoko 0.0567038683
*>
*> Robanda 0.1456249700
*>
*>
*>
*>
*>
*> ----------------------------------------------------------------------
*--
*> Dr Nils Bunnefeld
*> Imperial College London
*> Silwood Park
*> SL5 7PY, Ascot, UK
*> http://www.iccs.org.uk/nils-bunnefeld
*> http://fp7hunt.net/
*> Tel: +44 20 7594 9086
*>
*>
*> [[alternative HTML version deleted]]
*>
*> _______________________________________________
*> R-sig-mixed-models at r-project.org mailing list
*> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
*>
*>
*
*
*
More information about the R-sig-mixed-models
mailing list