[R-sig-ME] Running multinomial models with random effects

MORAN LOPEZ, TERESA tmoranlopez at mncn.csic.es
Mon Jun 25 12:21:57 CEST 2012


Dear Florian,
I have just figured out what was going on. I haven´t converted my  
dataframe into matrix. Sorry for such an obvious question!


Quoting "MORAN LOPEZ, TERESA":

> Hi Florian,
> thanks a lot for your help. I have been reading De Boeck and  
> Partchev paper and I have some questions.
> First of all I am having some problems when applying dendrify function.
> My dataframe has the following structure:
>   RISK       Area CHOICE
> 1 MONTE      Sopie      2
> 2 MONTE      Sopie      2
> 3 MONTE      Sopie      2
> 4 MONTE Anchurones      3
> 5 MONTE Anchurones      1
> 6 MONTE Anchurones      2
>
> being 1 (both acorns choice, 2 chosing the big one and 3 chosing the  
> small one)
> Following your instructions I mapped my tree as:
> mapping <- cbind(c(0, 1, 1), c(NA, 0, 1))
> Then I remove the first two columns in order to implement dendrify function
> dendrify(jay[,-(1:2)],mapping)
> The following error arise:
> Error: is.matrix(mat) is not TRUE
>
> I have not been able to find the problem. I have  followed tutorial  
> package and paper instructions. mat=(jay[,-(1:2)], has only one  
> column since I only have one item and each row corresponds to one  
> choice event.
> Any suggestions?
>
>
>
>
> Quoting :
>
>> Alternatively, you could fit a "tree-based" mixed logit model
>> based on continuation ratio logits. See a recent JSS paper by De
>> Boeck and Partchev (2012, http://www.jstatsoft.org/v48/c01/).
>>
>> The idea is to convert the three-level response into a binary one
>> using a decision tree. In one possible tree, the first node is
>> indifferent w.r.t. size (response both) vs. picky (response small
>> or big). The second node is small given picky vs. big given
>> picky.
>>
>> You need to extend your data by a two-level node variable. The
>> new response is then binary. The model can be fit using glmer().
>>
>> Best, Florian
>>
>> ---
>> Florian Wickelmaier
>> Department of Psychology
>> University of Tuebingen
>> Schleichstr. 4, 72076 Tuebingen, Germany
>>
>> _______________________________________________
>> 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