Learn R Programming

tvmediation (version 1.1.1)

coeff: Function to estimate coefficients at time t

Description

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

Usage

coeff(j, T1, T2, x, y)

Value

coeff.est

estimated coefficients of the mediation model

nomissing.index

index of complete cases

Arguments

j

a number indicating time point of observation

T1

a vector indicating assignment to treatment 1

T2

a vector indicating assignment to treatment 2

x

matrix of mediator values in wide format

y

matrix of outcome outcomes in wide format