Closed toddvogel1628 closed 3 years ago
Here's a little more detail on Carl's thoughts for implementing this (might need to create as separate issue(s)):
(regarding modmed.mlm): output is now a list, and look at the "pars" vector. Ideally, we want a wrapper function that would take the result of modmed.mlm as input, and also a value of "w" as input (maybe 0 as the default), and then compute the value of the indirect effect from the "pars" vector and spit that out as output from the wrapper function. Assume the values of "pars" are named so it won't break if the indexing or composition of the vector changes. And then export the function and some docs for it.
extract.modmed.mlm can now do this: 56dda186650af0cecbba0c60054c4211fc5e0176
Include code to specify levels of "W" to test the indirect effect at different levels of W (see example code below).
where "ainteraction" is the coefficient for one interaction term, and "binteraction" is the coefficient for the other interaction term. Sorry, I'd have to re-look at the code to remember the notation. This is what I meant by "simple indirect effect".