tvcolmm(formula, data, family = cumulative(),
weights, subset, offset, na.action,
control = tvcolmm_control(), ...)tvcolmm_control(alpha = 0.05, bonferroni = TRUE, minsize = 50,
maxnomsplit = 5, maxordsplit = 9,
maxnumsplit = 9, fast = TRUE,
trim = 0.1, estfun.args = list(), nimpute = 5,
seed = NULL, ...)
y ~ -1 + vc(z1, ..., zL, by = x1 + ...+ xP, intercept = TRUE) + re(1|id)
where vc term specifies the varying fixed coefficients. Only
one such vc'data' to be used in the fitting process.NAs. See alpha.from of function
supLM in package fit or to
y ~ Node:x1 + ...+ Node:xP + re(1 + w1 + ...|id)withNodeis a categorical
variable with terminal node labels1,...,M.Node:x1,
..., separately for each moderatorz1,...,zLin each node1,...,M. This yieldsLtimesM(possibly Bonferroni corrected)$p$-values for
rejecting coefficient constancy.alpha,
then select the node and the variable corresponding to the minimum$p$-value. Search and incorporate the optimal
among the candidate splits in the selected node and variable by
exhaustive likelihood search.alpha,
stop the algorithm and return the current model. The implemented coefficient constancy tests used for node and variable
selection (step 2) are based on the M-fluctuation tests of Zeileis and
Hornik (2007), using the observation scores of the fitted mixed
model. The observation scores can be extracted by
nimpute
gives the number of times the coefficient constancy tests are repeated
in each iteration. The final $p$-values are then the averages of
the repetations.
The algorithm combines the splitting technique of Zeileis (2008) with the technique of Hajjem et. al (2011) and Sela and Simonoff (2012) to incorporate regression trees into mixed models.
For the exhaustive search, the algorithm implements a number of split
point reduction methods to decrease the computational complexity. See
the arguments maxnomsplit, maxordsplit and
maxnumsplit. By default, the algorithm also uses the
approximative search model approach proposed in Buergin and Ritschard
(2014c). To disable this option to use the original algorithm, set
fast = FALSE in
Special attention is given to varying intercepts, i.e. the terms that account for the direct effects of the moderators. A common specification is
y ~ -1 + vc(z1, ..., zL, by = x1 + ...+ xP, intercept = TRUE) + re(1 + w1 + ...|id)
Doing so replaces the globale intercept by local intercepts. As mentioned, if a varying intercepts are desired, we recommend to always remove the global intercept.
Zeileis A., Hornik K. (2007), Generalized M-Fluctuation Tests for Parameter Instability, Statistica Neerlandica, 61(4), 488--508. Buergin R. and Ritschard G. (2015a), Tree-Based Varying Coefficient Regression for Longitudinal Ordinal Responses. Computational Statistics & Data Analysis. Forthcoming. Sela R. and J. S. Simonoff (2012). RE-EM trees: A Data Mining Approach for Longitudinal and Clustered data, Machine Learning 86(2), 169--207. A. Hajjem, F. Bellavance and D. Larocque (2011), Mixed Effects Regression Trees for Clustered Data, Statistics & Probability Letters 81(4), 451--459.
## ------------------------------------------------------------------- #
## Example 1: Moderated effect effect of unemployment
##
## Here we fit a varying coefficient ordinal linear mixed on the
## synthetic ordinal longitudinal data 'unemp'. The interest is whether
## the effect of unemployment 'UNEMP' on happiness 'GHQL' is moderated
## by 'AGE', 'FISIT', 'GENDER' and 'UEREGION'. 'FISIT' is the only true
## moderator. For the the partitioning we coefficient constancy tests,
## as described in Buergin and Ritschard (2014a)
## ------------------------------------------------------------------- #
data(unemp)
## fit the model
model.UE <-
tvcolmm(GHQL ~ -1 +
vc(AGE, FISIT, GENDER, UEREGION, by = UNEMP, intercept = TRUE) +
re(1|PID), data = unemp)
## diagnosis
plot(model.UE, "coef")
summary(model.UE)
splitpath(model.UE, steps = 1, details = TRUE)Run the code above in your browser using DataLab