[R-sig-ME] Reserved variable "trait"

Iker Vaquero Alba karraspito at yahoo.es
Tue Oct 20 14:11:38 CEST 2015


   Hello everyone, 

   I am reading the Course Notes at the moment and tomorrow I will implement some bivariate categorical models, hopefully this time including all the elements that need to be included for the models to work optimally. I have two quick questions about the reserved variable "trait":   
   1. One is about its usage: in many places I've seen something like "model1<-cbind(x,y)~trait-1+indepvar1+indepvar2....etc". However, in some others I've seen  "model1<-cbind(x,y)~trait-1+trait:indepvar1+trait:indepvar2...."
   My question: Do I need to add "trait" to each and every single one of my independent variables, or is it enough with adding "trait-1" and then the independent variables? I mean, I have six simple independent variables plus all the possible two-way interactions between them, it would be a bit complicated if it is the last option — unless I do it like "trait:(indep1*indep2*indep3...etc)".
   Additionaly, Jarrod says this in the Course Notes: "I usually suppress the intercept (-1) for these types of models so the second coefficient is not the dierence between the intercept for the 1st level of trait (y.hol) and the second level (y.car) but the actual trait specific intercepts." I suppose this depends on the type of model, but, in which type is it advisable to do it?
   2. The other one is just about the output: Once I have included the reserved variable "trait" in my model (and so I can get a different intercept for each of my responses), will I have any way of knowing which part of the observed variance applies to each of the two response variables looking at the summary output?
   Thank you very much in advance,   Iker
 __________________________________________________________________

   Iker Vaquero-Alba
   Visiting Postdoctoral Research Associate
   Laboratory of Evolutionary Ecology of Adaptations 
   Joseph Banks Laboratories
   School of Life Sciences
   University of Lincoln   Brayford Campus, Lincoln
   LN6 7DL
   United Kingdom

   https://eric.exeter.ac.uk/repository/handle/10036/3381


      De: Jarrod Hadfield <j.hadfield at ed.ac.uk>
 Para: Iker Vaquero Alba <karraspito at yahoo.es> 
CC: "r-sig-mixed-models at r-project.org" <r-sig-mixed-models at r-project.org> 
 Enviado: Lunes 12 de octubre de 2015 12:40
 Asunto: Re: [R-sig-ME] MCMCglmm prior specification
   
Hi,

Usually people think the default priors for the fixed effects (zero  
mean, high variance) are reasonable. However, there are cases where  
stronger priors are useful. For example, a) you might actually have  
some prior information or b) you might have near or complete  
separation in a GLMM (usually with categorical data) and you might  
want to constrain the fixed effects so they don't result in extreme  
predictions.

Cheers,

Jarrod




  Quoting Iker Vaquero Alba <karraspito at yahoo.es> on Mon, 12 Oct 2015  
11:05:58 +0000 (UTC):

>
>    Hi Jarrod,   Thanks a lot for your reply. I had actually found  
> information about it in another post and wanted to "fix" my own  
> question, but for some reason individual posts don't arrive to my  
> email even if I have that option activated, so I couldn't reply to  
> myself.   My question, then, would be: most of the times I see  
> priors with just R and G elements, but not B. Is it not necessary to  
> specify B? Also, if my model does not have random effects, then  
> would it be enough with a prior for R element?
>
>    Thank you very much.   Iker.
>
>
> __________________________________________________________________
>
>    Iker Vaquero-Alba
>    Visiting Postdoctoral Research Associate
>    Laboratory of Evolutionary Ecology of Adaptations
>    Joseph Banks Laboratories
>    School of Life Sciences
>    University of Lincoln   Brayford Campus, Lincoln
>    LN6 7DL
>    United Kingdom
>
>    https://eric.exeter.ac.uk/repository/handle/10036/3381
>
>
>
>
>      De: Jarrod Hadfield <j.hadfield at ed.ac.uk>
>  Para: Iker Vaquero Alba <karraspito at yahoo.es>
> CC: "r-sig-mixed-models at r-project.org" <r-sig-mixed-models at r-project.org>
>  Enviado: Lunes 12 de octubre de 2015 11:56
>  Asunto: Re: [R-sig-ME] MCMCglmm prior specification
>
> Hi,
>
> R defines the prior for the residual covariance matrices. B specifies 
> the prior for the `fixed' effects.
>
> Cheers,
>
> Jarrod
>
>
>
> Quoting Iker Vaquero Alba <karraspito at yahoo.es> on Mon, 12 Oct 2015 
> 10:34:01 +0000 (UTC):
>
>
>
>>    Hello everyone,
>>    I am reading a lot of documentation at the moment about prior 
>> specification in MCMCglmm, and there is still something I have not 
>> very clear. According to some sources, there are mainly two elements 
>> to take into account when defining a prior:   - An R structure that 
>> needs to be specified for each fixed effect. And
>>    - A G structure for each random effect.
>>    However, in other sources another element, B, is introduced as 
>> well, which refers to fixed effects too. In Jarrod's Course Notes, I 
>> see that both R and B have to do with fixed effects: R specifies V 
>> and nu arguments for the variance, and B specifies V and mu elements 
>> for the mean.
>>   
>>    My confusion comes from the fact that almost every time I see an 
>> example of a prior, it just has two elements, R (for fixed effects) 
>> and G (for random effects). Why is this? Is it not so important to 
>> define a prior for the mean? Is it enough with a prior specification 
>> for the variance of fixed effects and another one for all the random 
>> effects?
>>    Thank you very much in advance.   Iker
>>
>>  
>> __________________________________________________________________
>>
>>    Iker Vaquero-Alba
>>    Visiting Postdoctoral Research Associate
>>    Laboratory of Evolutionary Ecology of Adaptations
>>    Joseph Banks Laboratories
>>    School of Life Sciences
>>    University of Lincoln   Brayford Campus, Lincoln
>>    LN6 7DL
>>    United Kingdom
>>
>>    https://eric.exeter.ac.uk/repository/handle/10036/3381
>>
>>
>>     [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-mixed-models at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>>
>
>
>
> --
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.


>
>
>
>
>



-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.




  
	[[alternative HTML version deleted]]



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