slapmeg {SlaPMEG}R Documentation

Testing pathways using SLaPMEG (shared latent process mixed effects model and Globaltest) for longitudinal Omics data

Description

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.

Usage

slapmeg(fixed, random, grouping, subject, data, nlimit = 10)

Arguments

fixed

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.

random

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 +.

grouping

name of the covariate representing grouping by the phenotype

subject

name of the covariate representing the repeated measures structure such as subject IDs.

data

data frame containing the variables named in fixed, random, grouping and subject.

nlimit

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.

Value

A list is returned including:

call

the matched call

nfix

Number of fixed effect terms in the model, excluding the mandatory intercept

nrand

Number of random effect terms in the model

nsubj

Number of subjects in the sataset

nrep

Table of repeated measures, and number of subjects with the specified number of repeated measures

tgroup

Table of grouping, and number of subjects in each group

Ynames

Name of the Omics in the pathway

slapconv

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

fixedform

Names of Fixed effect terms

randform

Names of random effect terms

slapmethod

The method which is "joint" if the original slapmeg approach is adopted and pairwise for the pairwise method

SLaP.par

Fitted values for the parameters in the joint class mixed model in the first step

Globaltest

The output from Globaltest at the second step

EB_pred

Empirical bayes estimates for the random effects from the joint model

Author(s)

Mitra Ebrahimpoor

m.ebrahimpoor@lumc.nl

References

Ebrahimpoor, Mitra, Pietro Spitali, Jelle J. Goeman, and Roula Tsonaka. "Pathway testing for longitudinal metabolomics." Statistics in Medicine (2021).

See Also

multslapmeg, pairslapmeg, plotslapmeg

Examples


# 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)


[Package SlaPMEG version 1.0.1 Index]