Skip to content

Commit

Permalink
Use better variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
psychelzh committed Nov 21, 2024
1 parent c47f517 commit f6a1059
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/mediation.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ fit_med <- function(model, data, ...,
}

combine_data_ccas <- function(data) {
df_r <- data |>
data_weight <- data |>
summarise(
across(
c(igs, iss),
Expand All @@ -14,7 +14,7 @@ combine_data_ccas <- function(data) {
.by = cca_id
)
data |>
left_join(df_r, by = "cca_id") |>
left_join(data_weight, by = "cca_id") |>
summarise(
igs = sum(igs * weight_igs) / sum(weight_igs),
iss = sum(iss * weight_iss) / sum(weight_igs),
Expand Down

0 comments on commit f6a1059

Please sign in to comment.