39 views

Skip to first unread message

Sep 13, 2024, 1:42:00 PMSep 13

to lavaan

Hi all!

I am working on estimating the
power analysis for the mediation model. I have a model similar to the
one presented by Donnelly et al. (2021) specifically the one of
moderated mediation (M = b1X + b2W + b3XW).

My problem is that I do not have a value for b1, b2 to use for the simulation. Instead I have a value for b1 - b2.

kappa.free <- kappa.pop <- matrix(NA, nrow = 2, ncol = 3,

dimnames = list(c("M","Y"), names(exoData)))

dimnames = list(c("M","Y"), names(exoData)))

kappa.free["M","X"] <- "b1"

kappa.free["M","W"] <- "b2"

kappa.free["M","XW"] <- "b3"

kappa.free["Y","X"] <- "c1"

kappa.free["Y","W"] <- "c2"

kappa.free["Y","XW"] <- "c3"

## fill in population parameters

kappa.pop["M","X"] <- b1

kappa.pop["M","W"] <- b2

kappa.pop["M","XW"] <- b3

kappa.pop["Y","X"] <- c1

kappa.pop["Y","W"] <- c2

kappa.pop["Y","XW"] <- c3

(exoPaths <- bind(free = kappa.free, popParam = kappa.pop))

kappa.pop["M","W"] <- b2

kappa.pop["M","XW"] <- b3

kappa.pop["Y","X"] <- c1

kappa.pop["Y","W"] <- c2

kappa.pop["Y","XW"] <- c3

(exoPaths <- bind(free = kappa.free, popParam = kappa.pop))

So, my problem is that I do not have a value for b1 or b2, but only for b1 - b2. Can I pass it into the kappa matrix somehow?

An alternative was to give a random number to b1 and then based on this estimate b2. Yet, I was thinking if is possible to not add restrictions beyond those implemented from the model.

Thanks a lot!

John

Sep 16, 2024, 3:54:16 AMSep 16

to lavaan

I do not have a value for b1 or b2, but only for b1 - b2. Can I pass it into the kappa matrix somehow?

b1-b2 is not a model parameter. It is a linear function of 2 model parameters. An infinite number of {b1, b2} pairs can satisfy the single constraint that their difference equals the one you have in mind for your population. That is effectively a scaling constraint, and you need a second (location) constraint to "identify" these 2 population parameters.

An alternative was to give a random number to b1

Yeah, like that, for example. But b1 is the simple "a" path (i.e., the effect of X on M when W==0), so you probably want to think about what you expect that to be. If b1 == 0, then there is no indirect effect when W == 0.

Yet, I was thinking if is possible to not add restrictions beyond those implemented from the model.

Your fitted model would freely estimate b1 and b2, and simply calculate the defined parameter from those

b_diff := b1 - b2

The population "model" does not estimate anything. To generate data, you need to specify values in the entire matrix.

If by "give a random number to b1", you mean that you would specify a different population parameter in every sample, then yes. You can specify a distribution instead of a fixed population parameter for b1: https://github.com/simsem/simsem/wiki/Example-4:-Random-Parameters

That would make power dependent upon that random parameter.

Terrence D. Jorgensen (he, him, his)

Assistant Professor, Methods and Statistics

Research Institute for Child Development and Education, the University of Amsterdam

http://www.uva.nl/profile/t.d.jorgensen

Sep 16, 2024, 8:58:28 AMSep 16

to lavaan

Thanks a lot for the fast reply! I considered the same with the random population parameter. Thanks for clarifying it and providing the link!

John

Reply all

Reply to author

Forward

0 new messages

Search

Clear search

Close search

Google apps

Main menu