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

GPS formula #239

Merged
merged 27 commits into from
Mar 5, 2024
Merged

GPS formula #239

merged 27 commits into from
Mar 5, 2024

Conversation

Naeemkh
Copy link
Collaborator

@Naeemkh Naeemkh commented Feb 14, 2024

No description provided.

Copy link

codecov bot commented Feb 14, 2024

Codecov Report

Attention: Patch coverage is 48.74214% with 163 lines in your changes are missing coverage. Please review.

❗ No coverage uploaded for pull request base (develop_5@bb08aab). Click here to learn what that means.

Files Patch % Lines
R/estimate_erf.R 0.00% 119 Missing ⚠️
R/trim_it.R 0.00% 27 Missing ⚠️
R/compute_counter_weight.R 81.66% 11 Missing ⚠️
R/compile_pseudo_pop.R 84.21% 3 Missing ⚠️
R/generate_pseudo_pop.R 94.23% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             develop_5     #239   +/-   ##
============================================
  Coverage             ?   68.35%           
============================================
  Files                ?       33           
  Lines                ?     1144           
  Branches             ?        0           
============================================
  Hits                 ?      782           
  Misses               ?      362           
  Partials             ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Naeemkh Naeemkh requested a review from wxwx1993 February 15, 2024 22:13
type_flag <- "data.frame"
} else if (is.object(data_obj) && !isS4(data_obj)){
data <- data_obj$.data
type_flag <- "s3_obj"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warnings: were not covered by tests


plot(pseudo_pop_weighting, include_details = TRUE)

pseudo_pop_matching <- generate_pseudo_pop(.data = m_d,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommend trimming before matching, improving the balance results significantly. Change L60-67 to the following

trimmed_data <- trim_it(data_obj = m_d,
                        trim_quantiles = c(0.05, 0.95),
                        variable = "w")
pseudo_pop_matching <- generate_pseudo_pop(.data = trimmed_data,
                                            cw_obj = cw_object_matching,
                                            covariate_col_names = c("cf1", "cf2", "cf3",
                                                                    "cf4", "cf5", "cf6"),
                                            covar_bl_trs = 0.1,
                                            covar_bl_trs_type = "maximal",
                                            covar_bl_method = "absolute")

@Naeemkh Naeemkh changed the title [WIP] GPS formula GPS formula Mar 5, 2024
@Naeemkh Naeemkh merged commit 07177bf into develop_5 Mar 5, 2024
6 checks passed
@Naeemkh Naeemkh deleted the gps_formula branch March 17, 2024 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants