Skip to content

Missing data#23

Merged
adw96 merged 5 commits into
statdivlab:mainfrom
svteichman:missing-data
Sep 5, 2025
Merged

Missing data#23
adw96 merged 5 commits into
statdivlab:mainfrom
svteichman:missing-data

Conversation

@svteichman

Copy link
Copy Markdown
Collaborator

Address issue #21

Although raoBust has ways of dealing with missing data (silently dropping incomplete cases, as is done by glm and lm), enviromtx used to throw an error when yy, xx, xstar, or a relevant covariate were missing, because there was an issue with differences in lengths of the data after incomplete cases were dropped and the offset which was saved as a vector without that case being dropped. In this PR, we manually drop cases that are missing values for yy, xx, xstar, or a relevant covariate. We also throw errors if wts or replicates are provided but have a missing value. We test all of this new functionality in "test-missing-data.R". We document this behavior in the enviro_df parameter documentation in fit_mgx_model() and index the version number to denote a bug fix.

Sarah Teichman added 2 commits August 27, 2025 11:47
…ant covariate is missing, remove the observation that it is missing from then proceed. Run tests for these features.
@svteichman svteichman requested a review from adw96 August 27, 2025 18:51
@svteichman

Copy link
Copy Markdown
Collaborator Author

@adw96 message now added when we remove incomplete cases.

@adw96 adw96 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this is great!!

@adw96 adw96 merged commit 05ef16c into statdivlab:main Sep 5, 2025
3 checks passed
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