-
Notifications
You must be signed in to change notification settings - Fork 59
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
Feature request: different ways to display coefficient digits in etable #82
Comments
That's not a bug, it's a choice. The argument Since you're not the only one requesting this feature, I'll see what I can do. But it won't be before a while, so maybe you could use modelsummary instead? |
Thanks for the clarification. I understand this is a choice. |
Sure. I'm letting the issue open until the feature is added. |
One more thing, I noticed that some R- squared values use scientific notation while others don't. I am not sure if this is also a choice. |
I also encountered the scientific notation issue. Hopefully, the etable function will be refined. This seems to be the only factor keeping people from using it in place of plm and/or lfe. |
So here's an update: I've added a different way to display the decimals. I have separated the display for the fit statistics, now there's the new argument Here's an example of the new behavior: n = 1e3
base = data.frame(x1 = rnorm(n), x2 = rnorm(n))
base$y = base$x1 / 1000 + 10*base$x2 + rnorm(n, sd = 150)
res1 = feols(y ~ x1, base)
res2 = feols(y ~ I(1000*x1) + x2, base)
etable(res1, res2, digits = 2)
#> res1 res2
#> Dependent Var.: y y
#>
#> (Intercept) -4.4 (4.8) -4.2 (4.8)
#> x1 5.5 (5.1)
#> I(1000 x x1) 0.005 (0.005)
#> x2 4.1 (5.1)
#> _______________ __________ _____________
#> S.E. type Standard Standard
#> Observations 1,000 1,000
#> R2 0.001 0.002
#> Adj. R2 0.0002 -0.0001
etable(res1, res2, digits = "r2")
#> res1 res2
#> Dependent Var.: y y
#>
#> (Intercept) -4.39 (4.76) -4.16 (4.77)
#> x1 5.55 (5.08)
#> I(1000 x x1) 0.01 (0.01)
#> x2 4.10 (5.07)
#> _______________ ____________ ____________
#> S.E. type Standard Standard
#> Observations 1,000 1,000
#> R2 0.001 0.002
#> Adj. R2 0.0002 -0.0001
etable(res1, res2, digits = "r2", digits.stats = "r2")
#> res1 res2
#> Dependent Var.: y y
#>
#> (Intercept) -4.39 (4.76) -4.16 (4.77)
#> x1 5.55 (5.08)
#> I(1000 x x1) 0.01 (0.01)
#> x2 4.10 (5.07)
#> _______________ ____________ ____________
#> S.E. type Standard Standard
#> Observations 1,000 1,000
#> R2 0.00 0.00
#> Adj. R2 0.00 -0.00
setFixest_etable(digits = "r2", digits.stats = 2)
etable(res1, res2)
#> res1 res2
#> Dependent Var.: y y
#>
#> (Intercept) -4.39 (4.76) -4.16 (4.77)
#> x1 5.55 (5.08)
#> I(1000 x x1) 0.01 (0.01)
#> x2 4.10 (5.07)
#> _______________ ____________ ____________
#> S.E. type Standard Standard
#> Observations 1,000 1,000
#> R2 0.001 0.002
#> Adj. R2 0.0002 -0.0001 The default behavior for It's in the dev branch but I'll submit the new version to the CRAN next week. |
Thanks for the update! Have you looked into the R squared value scientific notation issue? |
Yes, it was due to the initial format displaying many digits for the statistics--it has been naturally solved by the introduction of the new argument Now the scientific notation will still be popping but only when |
Just to say that I'll submit to the CRAN this week, so if you have any other comment/suggestion on that issue I'll try to implement them before submission. |
I have tested it extensively. It works well. |
Great then, I'll let it that way. |
It seems that When I use But when I use Ok, I see you have the rule:
I'd prefer to see |
The LaTex output of etable shows an inconsistent number of decimal places for estimated coefficients, t values, and R squared values. Specifically, some of my coefficients have 1 decimal place while the others have about 4. The t values also show this inconsistent pattern. Meanwhile, the R squared values have 7 decimal places.
In my area (accounting and finance), all journal papers require numbers to have the same decimal places.
The text was updated successfully, but these errors were encountered: