get_coef: A function that extracts coefficients.

View source: R/get_coef.R

get_coefR Documentation

A function that extracts coefficients.

Description

A function that extracts coefficients from mediation and outcome model.

Usage

get_coef(res_SMAHP)

Arguments

res_SMAHP

Outputs from SMAHP

Value

A data frame which includes the name of exposure and mediator with coefficients from mediation and outcome model.

beta1

The coefficient estimate of exposure in mediation model

beta2

The coefficient estimate of mediator in outcome model

beta3

The coefficient estimate of exposure in outcome model

Examples


data(example_dat)
surv_dat <- example_dat$surv_dat
res_SMAHP <- SMAHP(example_dat$X, example_dat$M, example_dat$C, time = surv_dat$time,
status = surv_dat$status)
get_coef(res_SMAHP)


SMAHP documentation built on April 4, 2025, 1:36 a.m.