I am new to lmertrees. I am having trouble analyzing how individual stimuli in my data clusters together on the basis of how some participants answered to them in three different conditions. My code throws the following error:
Warning in matrix(0, nrow = mi, ncol = nl) :
NAs introduced by coercion to integer range
Error in matrix(0, nrow = mi, ncol = nl) :
invalid 'nrow' value (too large or NA)
I think it is suggesting that my partitioning variable (the stimuli) has too many levels for the lmertree to handle. It has 37 levels. This is the formula of my lmertree:
dataF.mTree <- lmertree(Response ~ Condition * Country + Trial.Order
| (1 + Condition | Participant.ID) + (1 + Condition | Stimuli.ID)
| Stimuli.ID,
data = dataF)
And this is the structure of my data:
Participant.ID Country Trial.Order Event.ID Condition Response
P01 Spain 1 E01 Zero 12
P01 Spain 2 E02 Partial 67
P01 Spain 3 E03 Full 85
P02 England 3 E01 Partial 45
P02 England 2 E02 Full 69
P02 England 1 E03 Zero 0
P03 Netherlands 2 E01 Full 100
P03 Netherlands 1 E02 Zero 6
P03 Netherlands 3 E03 Partial 30
I read in the internet that some clustering packages in r can handle more partitioning levels than others. Is this right? In those posts people suggested to reduce the number of levels by combining them to form a smaller set of levels, but in my case it is not possible. I truly need to analyze which items cluster together depending on the responses that people gave. Any ideas?