Skip to content

Conversation

@blucap
Copy link

@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.

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.

1 participant