Skip to content

Update vignettes and plots for Behavior and depressiveness analysis - #58

Open
smasongarrison wants to merge 3 commits into
mainfrom
dev
Open

smasongarrison wants to merge 3 commits into
mainfrom
dev

Conversation

@smasongarrison

Copy link
Copy Markdown
Member

This pull request significantly updates the vignettes/plots.Rmd vignette to use synthetic data and new variable names, shifting the focus from socioeconomic status (SES) and flu vaccinations to "Behavior" and "depressiveness" in kinship pairs. The code and narrative are revised throughout to reflect this new context, including data loading, processing, variable naming, and plot labeling. The changes also streamline the workflow by using synthetic datasets and the discord_data() function for data generation and preparation.

Key changes include:

1. Data Source and Structure Updates

  • Replaces the NLSY79 flu/SES data with synthetic datasets (mz_signif, mz_nonsignif) and generates discordant kin data using discord_data(), focusing on "Behavior" and "depressiveness" as the primary variables. [1] [2]
  • Updates all data preparation and cleaning steps to use these new variables and data structures, removing references to the original SES/flu variables. [1] [2]

2. Variable and Grouping Name Refactoring

  • Renames variables and grouping factors throughout the code and text, e.g., s00_h40_mean → Behavior_mean, flu_total_mean → depressiveness_mean, ses_diff_group → mom_diff_group, to match the new synthetic data context. [1] [2]

3. Plot and Label Updates

  • Revises all plot code to use the new variable names and updates plot titles, axis labels, and legends to refer to "Behavior" and "depressiveness" instead of SES and flu vaccinations. [1] [2] [3] [4] [5] [6] [7] [8]

4. Narrative and Documentation Alignment

  • Updates the vignette text to explain the new variables, describe the synthetic data, and clarify the interpretation of plots in terms of "Behavior" and "depressiveness" differences between kin, rather than SES and flu. [1] [2] [3] [4]

5. Code Cleanup and Output Enhancements

  • Removes obsolete code related to the original data and adds code to save generated plots as PNG files for documentation purposes.

These changes modernize the vignette, making it more generalizable and focused on illustrating patterns in synthetic kinship data using the discord_data() workflow.

Add three individual-level figure assets and overhaul vignettes/plots.Rmd to use Behavior and depressiveness variables instead of SES and flu. Renamed y1/y2 mappings to depressiveness/Behavior, updated data-frame names (df_discord_depressiveness, df_used), renamed grouping variables (mom_diff_group), adjusted plot labels/titles/legends and color scaling to reference Behavior/depressiveness, changed one code chunk eval flag, and added code to save individual_level_plot_b.png. Mostly text/label/variable substitutions and minor plotting logic updates to reflect the new outcome/predictor terminology.
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@smasongarrison smasongarrison linked an issue Oct 23, 2026 that may be closed by this pull request
@codecov

codecov Bot commented Oct 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.20%. Comparing base (86513d1) to head (1625811).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #58   +/-   ##
=======================================
  Coverage   91.20%   91.20%           
=======================================
  Files           7        7           
  Lines         853      853           
=======================================
  Hits          778      778           
  Misses         75       75           

☔ View full report in Codecov by Harness.
📢 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.

This branch has not been deployed

No deployments
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.

Full Vignette for Revision

1 participant