Skip to contents

This function extracts the significant effects from a publication table generated by any of the make_pub_table_from_...() functions.

Usage

get_sig_effects_from_pub_table(table, pattern = "\\*|\\+", fixed = F)

Arguments

table

Publication generated for lavaan models or tidy summaries

pattern

Regular expression used to find significant effects (default is any * or +)

fixed

(logical) Whether pattern is to be searched as is (TRUE) or as a regular expression (FALSE)

Value

data.frame with columns Outcome, Predictor, and Sign (indicating whether the coefficient is positive or negative)

Examples

library(lavaan)
ana <- list()
ana$y1 <- sem("y1 ~ x1+x2", df)
ana$y2 <- sem("y2 ~ x1+x2", df)
pub <- ana |> make_pub_table_from_lavaan_models()
pub |> get_sig_effects_from_pub_table()
#>   Outcome Predictor Sign
#> 1      y1        x1    +
#> 2      y1        x2    +
#> 3      y2        x1    +
#> 4      y2        x2    +