Skip to content

Mediation pathways and sample weights #350

Answered by raphaelvallat
sobhneek asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @sobhneek,

One of the best reference I know on the topic of mediation is this paper: https://www.sciencedirect.com/science/article/abs/pii/S0005796716301887?via%3Dihub

They recommend adding covariates to all the regressions in the mediation pathway, which is what Pingouin does. They also report a path diagram with covariates included for a single-mediator model:

Regarding the sample_weights, this will not work because the logreg_kwargs are passed to the LogisticRegression estimator but not to the .fit method:

# Initialize and fit
if "solver" not in kwargs:
# https://stats.stackexchange.com/a/204324/253579

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@sobhneek
Comment options

@raphaelvallat
Comment options

Answer selected by raphaelvallat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants