[R-sig-ME] lmer with binomial distribution of random effects

Siham El Kihal sihamelkihal at yahoo.de
Mon Mar 9 14:04:57 CET 2015


Dear Thierry,

 

Thanks for your quick answer. You are right, the customer is the grouping factor in my analysis.

I am using for this analysis only data from customers who have a certain minimum number of observations to make the model work.

 

Still I need  to make the distribution of one of the slopes bi-modal, because I am expecting a certain mechanism to have a negative effect and another one to have a positive effect.

 

Do you have some idea in mind how this would work?

 

Thank you so much!

Siham

 

From: Thierry Onkelinx [mailto:thierry.onkelinx at inbo.be] 
Sent: Montag, 9. März 2015 07:58
To: Siham El Kihal; r-sig-mixed-models at r-project.org
Subject: Re: [R-sig-ME] lmer with binomial distribution of random effects

 

Dear Siham,

 

Please keep the mailing list in cc.

 

I assume that customer is the grouping factor. Note that you not only need enough different grouping factor, you also need enough data for each individual grouping factor. Given that you want a random intercept and two slopes, then you need to fit a 3 x 3 covariance matrix. That needs 6 parameters. You won't get a stable fit, unless a decent number of customers have a lot of transactions.

 

Best regards,




ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest 
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance 
Kliniekstraat 25
1070 Anderlecht
Belgium

To call in the statistician after the experiment is done may be no more than asking him to perform a post-mortem examination: he may be able to say what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner 
The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data. ~ John Tukey

 

2015-03-09 12:43 GMT+01:00 Siham El Kihal <sihamelkihal at yahoo.de <mailto:sihamelkihal at yahoo.de> >:

Hi Thierry,

I have tausends of transactions of customers purchases. I guess it should be fine.

Siham

> Le 09.03.2015 à 04:22, Thierry Onkelinx <thierry.onkelinx at inbo.be <mailto:thierry.onkelinx at inbo.be> > a écrit :
>
> Dear Siham,
>
> I would take a step back first. Do you have enough data to fit such a
> complex model?
>
> Best regards,
>
> ir. Thierry Onkelinx
> Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
> Forest
> team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
> Kliniekstraat 25
> 1070 Anderlecht
> Belgium
>
> To call in the statistician after the experiment is done may be no more
> than asking him to perform a post-mortem examination: he may be able to say
> what the experiment died of. ~ Sir Ronald Aylmer Fisher
> The plural of anecdote is not data. ~ Roger Brinner
> The combination of some data and an aching desire for an answer does not
> ensure that a reasonable answer can be extracted from a given body of data.
> ~ John Tukey
>
> 2015-03-09 2:15 GMT+01:00 Ben Bolker < <mailto:bbolker at gmail.com> bbolker at gmail.com>:
>
>> El Kihal, Siham < <mailto:Siham.ElKihal at ...> Siham.ElKihal at ...> writes:
>>
>>>
>>> Dear lmer() friends,
>>>
>>> I am trying to estimate a model with a random
>>> intercept, and 2 random slopes.
>>> I believe that my betas (slopes) do not follow
>>> a normal distribution, but rather a bimodal distribution.
>>> The reason for this that there are two possible
>>> mechanisms that influence the evolution of this variable,
>>> one with a negative influence and another one with a
>>> positive influence. This is why I need to use a bimodal
>>> distribution for my slopes to avoid the fact that
>>> both effects right now cancel out.
>>>
>>> Does anyone of you has already done this or has
>>> an idea how to concretely implement this using lmer()?
>>
>>  This sounds like a latent mixture model problem.  lme4 doesn't
>> do this; you *might* be able to implement an expectation-maximization
>> wrapper around lme4 that would do it, but it wouldn't be entirely
>> trivial.  If I had to do this I would probably turn to JAGS/BUGS.
>> Looking forward to other answers from the list ...
>>
>> _______________________________________________
>> R-sig-mixed-models at r-project.org <mailto:R-sig-mixed-models at r-project.org>  mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
>    [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models at r-project.org <mailto:R-sig-mixed-models at r-project.org>  mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

 


	[[alternative HTML version deleted]]



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