newMediatorOutcome {tvmediation}R Documentation

Function to compute new Mediator and Outcome using time t and t-1 mean centered on the individual.

Description

Part of the set of internal functions called within the tvma function to assist in the estimation of time varying mediation effect.

Usage

newMediatorOutcome(trt, M, Y)

Arguments

trt

numeric binary treatment group indicator for each individual

M

(t.seq x N) matrix where N = number of observations. Column 1 is mediator at time t-1. Column 2 is mediator at time t.

Y

(Nx1) matrix were N = number of observations. Column 1 is outcome at time t-1.

Value

newMO

list containing new mediators, outcomes, and index of complete cases


[Package tvmediation version 1.1.0 Index]