Skip to content

update - #32

Merged
smasongarrison merged 13 commits into
mainfrom
dev
Oct 6, 2025
Merged

update#32
smasongarrison merged 13 commits into
mainfrom
dev

Conversation

@smasongarrison

Copy link
Copy Markdown
Member

This pull request updates the full_data_workflow.Rmd vignette to improve reproducibility, clarity, and output formatting for the demonstration of discordant-kinship regression. The changes include switching to a synthetic dataset for analysis, enhancing table and regression output formatting, and adding explanatory text and equations to better guide users through the workflow.

Data workflow and reproducibility improvements:

  • Replaces the original wide data (df_wide) with a new synthetic dataset (df_synthetic) generated from filtered cousin pairs, ensuring full reproducibility and clarity of the workflow. This includes setting a random seed and constructing new variables such as ages and weights for siblings. [1] [2] [3]
  • Updates all downstream analysis steps (e.g., OLS regression, discordant regression) to use the new df_synthetic dataset instead of the original data. [1] [2] [3]

Output formatting and presentation:

  • Improves table outputs throughout the vignette by specifying the number of digits and adding captions for clarity, and uses glimpse() for more informative data previews. [1] [2] [3] [4]
  • Changes regression output from plain text to HTML-formatted tables using stargazer for all model summaries, improving readability and consistency. [1] [2] [3] [4]

Documentation and clarity enhancements:

  • Adds LaTeX equations to clearly present regression model specifications for standard, between-family, and discordant-kinship regressions. [1] [2] [3]
  • Expands explanatory text to clarify the ordering of siblings and the interpretation of discordant regression, and provides guidance on using the helper function for discordant regression.

Minor code and style cleanups:

  • Standardizes the use of slice() for table previews and removes commented-out or unused code for improved readability. [1] [2] [3] [4]

These changes make the vignette more robust, user-friendly, and easier to follow for those learning or demonstrating discordant-kinship regression.

Replaces previous wide data with a synthetic cousin dataset for demonstration, ensuring reproducibility and clarity. Adds set.seed for reproducibility, updates data selection and transformation steps, and improves table outputs by specifying digits and captions. Also clarifies regression model equations, improves code chunk organization, and enhances explanations for between-family and discordant-kinship regression sections.
Replaces previous wide data with a synthetic cousin dataset for demonstration, ensuring reproducibility and clarity. Adds set.seed for reproducibility, updates data selection and transformation steps, and improves table outputs by specifying digits and captions. Also clarifies regression model equations, improves code chunk organization, and enhances explanations for between-family and discordant-kinship regression sections.
@smasongarrison
smasongarrison requested a review from Copilot October 5, 2025 21:30
@codecov

codecov Bot commented Oct 5, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.16%. Comparing base (07287ab) to head (2acb65f).
⚠️ Report is 14 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #32      +/-   ##
==========================================
+ Coverage   88.33%   91.16%   +2.83%     
==========================================
  Files           7        7              
  Lines         840      849       +9     
==========================================
+ Hits          742      774      +32     
+ Misses         98       75      -23     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI 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.

Pull Request Overview

Updates the full_data_workflow.Rmd vignette to make the discordant-kinship regression demo reproducible and clearer by switching to a synthetic dataset, improving output formatting, and adding explanatory text and equations.

  • Switches analysis to a reproducible synthetic dataset generated via kinsim
  • Replaces text outputs with HTML tables via stargazer and adds equations/explanations
  • Cleans up table previews and standardizes formatting (digits, captions, slice)

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread vignettes/full_data_workflow.Rmd Outdated
Comment thread vignettes/full_data_workflow.Rmd Outdated
Comment thread vignettes/full_data_workflow.Rmd Outdated
Comment thread vignettes/full_data_workflow.Rmd Outdated
Comment on lines +299 to +302
# CHOOSE ONE based on your path
# source_wide <- df_wide
source_wide <- df_long2wide
# source_wide <- pairs_wide # if you followed the pedigree path
#source_wide <- df_long2wide
source_wide <- df_synthetic # if you followed the pedigree path

Copilot AI Oct 5, 2025

Copy link

Choose a reason for hiding this comment

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

The preceding text states 'Below we default to the long path for reproducibility,' but the code now defaults to df_synthetic. Also, the inline comment 'if you followed the pedigree path' is inaccurate for df_synthetic. Please update the prose and inline comment to reflect the new default and data source (e.g., 'synthetic data generated above').

Copilot uses AI. Check for mistakes.
smasongarrison and others added 2 commits October 5, 2025 17:36
# This is the 1st commit message:

Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Mason Garrison <garrissm@wfu.edu>
# This is the commit message #2:

Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Mason Garrison <garrissm@wfu.edu>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Mason Garrison <garrissm@wfu.edu>

Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Mason Garrison <garrissm@wfu.edu>

Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Mason Garrison <garrissm@wfu.edu>
Expanded the introduction with a clearer overview and context for the discordant-kinship regression example.Added a session info section for reproducibility.

Copilot AI 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.

Pull Request Overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 6 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread vignettes/full_data_workflow.Rmd Outdated
# Session Info
```{r}
sessionInfo()
sessioninfo::sessionInfo()

Copilot AI Oct 6, 2025

Copy link

Choose a reason for hiding this comment

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

sessioninfo does not export sessionInfo(); the function is session_info(). Use sessioninfo::session_info() (or utils::sessionInfo() if you intend the base function) to avoid a knit error.

Suggested change
sessioninfo::sessionInfo()
sessioninfo::session_info()

Copilot uses AI. Check for mistakes.
Comment thread vignettes/regression.Rmd
Comment thread vignettes/full_data_workflow.Rmd Outdated
Comment thread vignettes/full_data_workflow.Rmd
Comment thread vignettes/full_data_workflow.Rmd
Comment thread README.Rmd Outdated
Expanded the README with more detailed package description, features, and external reproducible example links. Updated citation information to reflect the current repository URL and removed the year and DOI. Fixed a vignette code example to use sessioninfo::session_info() instead of sessioninfo::sessionInfo().
Renamed 'test-discord_regression_arguments.R' to 'test-discord_regression_estimates.R' to better reflect the contents of the test file.
@smasongarrison
smasongarrison force-pushed the dev branch 2 times, most recently from 17d059b to b4cc3b6 Compare October 6, 2025 19:00
@smasongarrison
smasongarrison requested a review from Copilot October 6, 2025 19:00

Copilot AI 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.

Pull Request Overview

Copilot reviewed 24 out of 26 changed files in this pull request and generated 6 comments.

Comments suppressed due to low confidence (1)

man/discord_data.Rd:1

  • The documentation sets a default for pair_identifiers (c("_s1","_s2")), but the implementation of discord_data() still requires pair_identifiers as a mandatory argument. Either add the default in the function signature or revert the Rd to reflect that it is required, to avoid confusing users and potential vignette failures if the argument is omitted.
% Generated by roxygen2: do not edit by hand

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread man/discord_data_fast.Rd
Comment thread man/discord_data_ram_optimized.Rd
Comment thread man/check_sibling_order_ram_optimized.Rd
Comment thread R/func_discord_data.R Outdated
Comment thread README.md Outdated
Comment thread man/kinsim_internal.Rd Outdated
Corrects the handling of outcome and predictor variables in the legacy data preparation function to avoid subsetting errors. Adds additional tests to improve coverage of legacy comparison and id handling, as noted in NEWS.md. Bumps package version to 1.3.

Add optional id argument for custom kinship pair identifiers

Introduces an optional 'id' argument to kinsim() and kinsim_internal() functions, allowing users to specify unique identifiers for each kinship pair. Updates documentation and tests to reflect and validate the new id handling, ensuring backward compatibility with sequential id assignment when not provided.
The README files were updated to provide more detailed descriptions of package features, vignettes, and external reproducible examples. Vignette summaries now include usage guidance and context for each example. Minor formatting improvements and clarifications were made throughout to enhance readability and user understanding.
@smasongarrison
smasongarrison merged commit 535d63b into main Oct 6, 2025
16 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