[R-sig-ME] GLMERTREE and REEMTREE to build regression trees with random effects
Benj@min_CARBONNE @ending from hotm@il@fr
Thu Nov 8 16:48:28 CET 2018
Good morning, everyone,
I am trying to build a regression tree with a predation rate (between 0 and 1) as the response variable, and the abundance of different species as the partitioning variables. In order to take into account the structure of my data (monitoring of several plots nested in different projects, and monitored over different months), I want to use methods to integrate random effects.
I have identified two methods that I think are appropriate: GLMERTREE and REEMTREE.
My question about GLMERTREE is whether I can use it without a "treatment" variable, as follows:
gt <- glmertree(TP_viola ~ 1 |(1 | Data)+(1|Parcelle)+(1|Mois)| HarpalusCP+....+ParophonusCP, joint=TRUE,
data = Compilation_zone_av_genre_CP,family = "binomial", alpha = 0.05)
In addition, do you have any ideas to help me validate the tree? I tried the stabletree package to get information about the stability of the tree (selection of varaibles, and cutpoints) but the stabletree function gives me an error message as follow:
Error in length(value <- as.numeric(value)) == 1L :
(maxstephalfit) PIRLS step-halvings failed to reduce deviance in pwrssUpdate
Which is not the case if I use LMERTREE
Strangely, when I realize my regression tree with REEMTREE as follows:
+ data = Compilation_zone_av_genre_CP, random=list(~1|Projet,~1|Parcelle,~1|Mois))
I get different trees each time I run my code (the trees are more or less deep and different). Moreover, when I visualize my tree with boxplot I see that the values are no longer between 0 and 1. Do you have any idea where this instability comes from, and why the predation values are changed?
Finally, concerning REEMTREE and GLMETREE, do you have any idea how to see the surrogate splits?
Thank you very much
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models