pairslapmeg {SlaPMEG}R Documentation

Testing pathways using SLaPMEG (shared latent process mixed effects model and Globaltest) for longitudinal Omics data based on pairwise estimation approach (a computational solution for latrge pathways)

Description

This function performs pathway testing for longitudinal omics within a two-step framework just as in slapmeg but instead of using a joint shared latent model in the first step, it uses a pairwise approach and runs much faste for larger pathways. After estimating the random effects of the joint model using pairwise fitting, the random effects are used within globaltest to compare the two groups at a pathway level.

Usage

pairslapmeg(fixed, random, grouping, subject, data)

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.

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

slapmeg, multslapmeg, plotslapmeg

Examples



# simulate data with 15 omics
testdata<-simslapmeg(nY=25, ntime=3, nsubj = 30, seed=123)
head(testdata)

#fit slapmeg to test for the differential expression of a pathway of size 15
slapmegfit<- pairslapmeg(Y1+Y2+Y6+Y7+Y8~time, ~1, grouping="group", subject="ID", data=testdata)
slapmegfit
summary(slapmegfit)


[Package SlaPMEG version 1.0.1 Index]