Skip to content

Conversation

@blucap
Copy link
Contributor

@blucap blucap commented Nov 8, 2025

Add customizable fixed effects markers, instead of only x or - (fe_present, fe_absent parameters)

Summary
This PR adds two new optional parameters to etable() that allow users to customize the symbols used to indicate the presence or absence of fixed effects in regression tables.

Motivation
Currently, fixed effects are marked with hardcoded symbols: "x" for present and "-" for absent. While functional, these symbols may not suit all presentation contexts or user preferences. Users might prefer more explicit markers like "YES"/"NO", cleaner symbols like "Y"/"N", visual indicators like ✓/✗, or even emoji like ✅/❌.

Changes

  1. Added fe_present parameter (default: "x"): Symbol to display when a fixed effect is present
  2. Added fe_absent parameter (default: "-"): Symbol to display when a fixed effect is absent
  3. Updated docstring with parameter descriptions and examples
  4. Maintains backward compatibility with existing code

Usage Examples

# Use YES/NO
pf.etable([fit1, fit2], fe_present="YES", fe_absent="NO")

# Use Y/N  
pf.etable([fit1, fit2], fe_present="Y", fe_absent="N")

# Use checkmarks
pf.etable([fit1, fit2], fe_present="✓", fe_absent="✗")

# Use emoji
pf.etable([fit1, fit2], fe_present="✅", fe_absent="❌")

# Leave absent blank
pf.etable([fit1, fit2], fe_present="✓", fe_absent="")

Backward Compatibility
The default values match the current behavior, so existing code will continue to work without any changes.

@codecov
Copy link

codecov bot commented Nov 19, 2025

Codecov Report

❌ Patch coverage is 15.38462% with 11 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pyfixest/report/fe_marker_examples.py 0.00% 11 Missing ⚠️
Flag Coverage Δ
core-tests 75.93% <15.38%> (-0.13%) ⬇️
tests-extended ?
tests-vs-r 15.79% <0.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
pyfixest/report/summarize.py 89.88% <100.00%> (ø)
pyfixest/report/fe_marker_examples.py 0.00% <0.00%> (ø)

... and 7 files with indirect coverage changes

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

@s3alfisc s3alfisc merged commit 9622c41 into py-econometrics:master Nov 30, 2025
7 of 9 checks passed
@s3alfisc
Copy link
Member

@all-contributors please add @blucap for code

@allcontributors
Copy link
Contributor

@s3alfisc

I've put up a pull request to add @blucap! 🎉

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