A two-step procedure is adopted, first a joint latent process mixed effects model
is fitted and on the longitudinal data to summarize the temporal trend in terms of
several random effects. For computational efficacy, if the size of pathway is
larger than 10 a paired approah is used to estimate the random effects with the
pairslapmeg function. The random effects are the input for globaltest which
is used to compare the two groups at a pathway level.
slapmeg(fixed, random, grouping, subject, data, nlimit = 10)A two-sided linear formula object for specifying the
fixed-effects in the linear mixed model at the latent process level. Names
of omics in the pathway are separated by + on the left of ~ and the
covariates are separated by + on the right of the ~. For
identifiability purposes, the intercept should always be present in the model.
A one-sided formula for the random-effects in the
latent process mixed model and starts with the ~ sign. At least one random
effect should be included. Covariates with a random-effect are separated
by +.
name of the covariate representing grouping by the phenotype
name of the covariate representing the repeated measures structure such as subject IDs.
data frame containing the variables named in fixed, random,
grouping and subject.
A controling arguments telling slapmeg to use pairwise approach for pathways larger than this value, default is 10. Note: fitting the joint model may take long for pathways larger than 20 omics.
A list is returned including:
the matched call
Number of fixed effect terms in the model, excluding the mandatory intercept
Number of random effect terms in the model
Number of subjects in the sataset
Table of repeated measures, and number of subjects with the specified number of repeated measures
Table of grouping, and number of subjects in each group
Name of the Omics in the pathway
Status of convergence: For joint method(=1 if the convergence criteria were satisfied, =2 if the maximum number of iterations was reached, =4 or 5 if a problem occured during optimisation); for the pairwise method, proportion of successfully converged pairs is reported
Names of Fixed effect terms
Names of random effect terms
The method which is "joint" if the original slapmeg approach is adopted and pairwise for the pairwise method
Fitted values for the parameters in the joint class mixed model in the first step
The output from Globaltest at the second step
Empirical bayes estimates for the random effects from the joint model
Ebrahimpoor, Mitra, Pietro Spitali, Jelle J. Goeman, and Roula Tsonaka. "Pathway testing for longitudinal metabolomics." Statistics in Medicine (2021).
# NOT RUN {
# simulate data with 8 omics
testdata<-simslapmeg(nY=8, ntime=5, nsubj = 30, seed=123)
head(testdata)
#fit slapmeg to test for the differential expression of a pathway of size 5
fit<- slapmeg(Y1+Y2+Y6+Y7+Y8~time, ~1, grouping="group", subject="ID", data=testdata)
fit
summary(fit)
# }
Run the code above in your browser using DataLab