Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix coefplot() bug after deleting whitespace before % for CIs in tidy() #327

Merged
merged 2 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pyfixest/FixestMulti.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,8 @@ def tidy(self) -> pd.DataFrame:
- Std. Error: the standard errors of the estimated coefficients
- t value: the t-values of the estimated coefficients
- Pr(>|t|): the p-values of the estimated coefficients
- 2.5 %: the lower bound of the 95% confidence interval
- 97.5 %: the upper bound of the 95% confidence interval
- 2.5%: the lower bound of the 95% confidence interval
- 97.5%: the upper bound of the 95% confidence interval
If `type` is set to "markdown", the resulting DataFrame will be
returned as a markdown-formatted string with three decimal places.
"""
Expand Down
2 changes: 1 addition & 1 deletion pyfixest/visualize.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def _coefplot(
ggplot(df, aes(x="Coefficient", y="Estimate", color="Model"))
+ geom_point(position=position_dodge(0.5))
+ geom_errorbar(
aes(ymin="2.5 %", ymax="97.5 %"), width=0.05, position=position_dodge(0.5)
aes(ymin="2.5%", ymax="97.5%"), width=0.05, position=position_dodge(0.5)
)
+ ylab("Estimate and 95% Confidence Interval")
)
Expand Down
4 changes: 4 additions & 0 deletions tests/test_visualize.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@ def test_visualize():
# iplot
fit5 = feols("Y ~ i(f1)", data=data)
iplot(fit5)

# FixestMulti
fit6 = feols("Y + Y2 ~ X1 + X2 | f1", data=data)
fit6.coefplot()
Loading