[R-sig-ME] Log-normal MCMCglmm

Jarrod Hadfield j.hadfield at ed.ac.uk
Tue Jul 28 13:58:06 CEST 2015


Hi Dani,

You are right. In a glm the link function is concerning the mean:

log(E[y]) = a linear model

this is not generally the same as:

E[log(y)] = a linear model

If y is log-normal

log(E[y]) = E[log(y)]+VAR[log(y)]/2

Implying that you would need to modify you're location effects by the  
variance to recover the location effects under a Gaussian glm with  
log-link.

Cheers,

Jarrod




Quoting Daniel Sol <dsolrueda at gmail.com> on Tue, 28 Jul 2015 13:03:15 +0200:

> Dear Paul and Jarrod,
>
> Thanks a lot for your responses. I read somewhere that in GLM
> log-transforming the response variable and using a log-link is not exactly
> the same, but I did not really know the implications. Based on your
> clarifications, I'm gonna log-transform the response variable. Many thanks
> for your help, I really appreciate it.
>
> Best wishes,
>
> Dani
>
>
>
>
>
>
>
>
> 2015-07-28 12:41 GMT+02:00 Jarrod Hadfield <j.hadfield at ed.ac.uk>:
>
>> Hi Dani,
>>
>> I'm not sure why logging the response is not equivalent? Is it because you
>> wish the residuals to be log normal, but the distribution of other random
>> effects to be normal? If so, then MCMCglmm is not able to handle this: all
>> random effects, including residuals, must be (multivariate) normal on some
>> link scale.
>>
>> Cheers,
>>
>> Jarrod
>>
>>
>>
>>
>>
>> Quoting Daniel Sol <dsolrueda at gmail.com> on Tue, 28 Jul 2015 10:47:29
>> +0200:
>>
>>  Hi Jörg,
>>>
>>> Thanks a lot for the suggestion. I actually have tried to use a Poisson
>>> error, but it looks like my data best fit a log-normal distribution.
>>>
>>> Best,
>>>
>>> Dani
>>>
>>> 2015-07-28 10:40 GMT+02:00 Jörg Albrecht <albrechj at staff.uni-marburg.de>:
>>>
>>>  Hi Dani,
>>>>
>>>> you could try specifying
>>>>
>>>> family = "poisson".
>>>>
>>>> Best,
>>>>
>>>> Jörg
>>>>
>>>>>>>> Jörg Albrecht, PhD
>>>> Postdoctoral researcher
>>>> Institute of Nature Conservation
>>>> Polish Academy of Sciences
>>>> Mickiewicza 33
>>>> 31-120 Krakow, Poland
>>>> www.carpathianbear.pl
>>>> www.globeproject.pl
>>>> www.iop.krakow.pl
>>>>
>>>> Am 25.07.2015 um 11:31 schrieb Daniel Sol <dsolrueda at gmail.com>:
>>>>
>>>> Hi everybody,
>>>>
>>>> I have trouble finding how to implement a MCMCglmm with log-normal
>>>> error. I
>>>> know some people just log-transform the response variable, but this is
>>>> not
>>>> the same.
>>>>
>>>> Many thanks in advance,
>>>>
>>>> Dani
>>>>
>>>> --
>>>> Daniel Sol
>>>> CREAF (Centre for Ecological Research and Forestry Applications)
>>>> CSIC (Spanish National Research Council)
>>>> Bellaterra, Catalonia E-08193, Spain
>>>> TEL: +34 93-5814678
>>>> FAX: +34 93-5814151
>>>> E-MAIL: d.sol at creaf.uab.es
>>>> Webpage: http://dsolrueda.wix.com/sol-group
>>>>
>>>> [[alternative HTML version deleted]]
>>>>
>>>> _______________________________________________
>>>> R-sig-mixed-models at r-project.org mailing list
>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>>>>
>>>>
>>>>
>>>>
>>>
>>> --
>>> Daniel Sol
>>> CREAF (Centre for Ecological Research and Forestry Applications)
>>> CSIC (Spanish National Research Council)
>>> Bellaterra, Catalonia E-08193, Spain
>>> TEL: +34 93-5814678
>>> FAX: +34 93-5814151
>>> E-MAIL: d.sol at creaf.uab.es
>>> Webpage: http://dsolrueda.wix.com/sol-group
>>>
>>>         [[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.
>>
>>
>>
>
>
> --
> Daniel Sol
> CREAF (Centre for Ecological Research and Forestry Applications)
> CSIC (Spanish National Research Council)
> Bellaterra, Catalonia E-08193, Spain
> TEL: +34 93-5814678
> FAX: +34 93-5814151
> E-MAIL: d.sol at creaf.uab.es
> Webpage: http://dsolrueda.wix.com/sol-group
>



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



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