Group variables regarding the position in mediation chain

Description

In mediation analysis, variables affects other variables as a chain. This function will group variables regarding the chain of mediation analysis.

Usage

1

Arguments

beta

The regression coefficient in path analysis.

Value

The list of set of variables in the mediation chain. The variables in position 1 will be the independent variables. The variables in the last variables will be the end of the chain.

Author(s)

Sunthud Pornprasertmanit (psunthud@gmail.com)

See Also

  • findPossibleFactorCor to find the possible position for latent correlation given a regression coefficient matrix

Examples

1
2
3
4
5
6
7
path <- matrix(0, 9, 9)
path[4, 1] <- path[7, 4] <- NA
path[5, 2] <- path[8, 5] <- NA
path[6, 3] <- path[9, 6] <- NA
path[5, 1] <- path[8, 4] <- NA
path[6, 2] <- path[9, 5] <- NA
findRecursiveSet(path)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.