Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ensure extreme SE values excluded prior to meta-analysis of logged yi vals #146

Closed
egouldo opened this issue Sep 2, 2024 · 1 comment · Fixed by #148
Closed

ensure extreme SE values excluded prior to meta-analysis of logged yi vals #146

egouldo opened this issue Sep 2, 2024 · 1 comment · Fixed by #148
Assignees
Labels
bug an unexpected problem or unintended behavior

Comments

@egouldo
Copy link
Owner

egouldo commented Sep 2, 2024

relevant line from logged analysis in manuscript is:

mutate(exclusion_threshold = param_mean + 3*param_sd) %>% i.e.:

back_transformed_predictions <-
  ManyEcoEvo_yi %>%
  prepare_response_variables_yi(estimate_type = "yi",
                                param_table = ManyEcoEvo:::analysis_data_param_tables) %>%
  generate_yi_subsets()


raw_mod_data_logged <-
  back_transformed_predictions %>%
  filter(dataset == "eucalyptus") %>%
  group_by(estimate_type) %>%
  select(estimate_type, data) %>%
  unnest(data) %>%
  rename(study_id = id_col) %>%
  hoist(params, param_mean = list("value", 1), param_sd = list("value", 2)) %>%
  rowwise() %>%
  mutate(exclusion_threshold = param_mean + 3*param_sd) %>%
  filter(fit < exclusion_threshold) %>%
  mutate(log_vals = map2(fit, se.fit, log_transform, 1000)) %>%
  unnest(log_vals) %>%
  select(study_id,
         TeamIdentifier,
         estimate_type,
         starts_with("response_"),
         -response_id_S2,
         ends_with("_log")) %>%
  group_by(estimate_type) %>%
  nest()

so values are removed prior to logging

@egouldo egouldo self-assigned this Sep 2, 2024
@egouldo egouldo added the bug an unexpected problem or unintended behavior label Sep 2, 2024
@egouldo egouldo added this to the Respond Reviewer Comments milestone Sep 2, 2024
@egouldo
Copy link
Owner Author

egouldo commented Sep 5, 2024

It just occurred to me why exclude_extreme_VZ() isn't behaving as intended for the Euc analyses... now they're on the response scale (raw counts), whereas before they were Z-transformed. So using the default threshold of 3 on estimates on the count scale isn't going to do much at all, hence why we've got extreme values getting through now!

egouldo added a commit that referenced this issue Sep 5, 2024
…ltiplier threshold for population parameter estimates
egouldo added a commit that referenced this issue Sep 5, 2024
egouldo added a commit that referenced this issue Sep 5, 2024
egouldo added a commit that referenced this issue Sep 5, 2024
egouldo added a commit that referenced this issue Sep 5, 2024
…s pipeline

Note that this functionality was previously included in the  manuscript
egouldo added a commit that referenced this issue Sep 5, 2024
@egouldo egouldo closed this as completed in 967852b Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant