Mreg {dpasurv}R Documentation

Internal mediator regression function storing a linear regression estimate for each event time

Description

Do not call this function on its own

Usage

Mreg(regformula, obstimes, startt, stopt, event, mediator, dataset, w = 1)

Arguments

regformula

independent variable input as for standard lm fuction in R

obstimes

observed event times at which Aalen's additive model is estimated via the function Areg

startt

start time of the observation intervals

stopt

end time of the observation intervals (actual event times)

event

event indicator

mediator

mediator of interest

dataset

dataset (in counting process format)

w

(optional) weights (not actually used in the default implementation of dynamic path analysis, set to 1)

Value

data.frame with observation times and estimated coefficients for independent variables in "regformula"

Examples

library(dpasurv)

data(simdata)

obj <- Mreg(~x, sort(simdata$stop[simdata$event==1]), "start", "stop", "event", "M", simdata)


[Package dpasurv version 0.1.0 Index]