Closed jolyphil closed 2 years ago
I do not have a very elegant solution for you but here's a trick using substitute():
sysuse auto, clear reg price weight length estout, cells("b p(par(p=) f(3))") substitute("p=.000" " <.001""p=" " ") nolz
The result is not necessarily entirely correct, because values lower than .001 that are rounded up to .001 are displayed as .001 and not as <.001.
So you would also do something like the following:
sysuse auto, clear
reg price weight length
mat pval = r(table)
mat pval = pval["pvalue",1...]
forv i = 1 / =colsof(pval)' { if (pval[1,
i']<.001) mat pval[1,`i'] = .a
}
estadd matrix pval
estout, cells("b pval(f(3))") substitute(" .a" "<.001") nolz
ben
On 19 Oct 2021, at 16:29, Philippe Joly @.***> wrote:
Thanks for this great package that has facilitated my life enormously over the last years!
I am trying to reproduce an APA table. See Table 3: https://apastyle.apa.org/style-grammar-guidelines/tables-figures/sample-tables#regression
I roughly get what I want with the following commands:
sysuse auto, clear reg price weight length estout, cells("b(label(Estimate)) se(label(SE)) ci(label(95% CI) par([ , ])) p")
The only thing I am missing is a way to dynamically convert a p value under 0.001 with "p < .001". If the the p value is over 0.001, the actual value should be reported.
Is there a way to do this with estout?
Many thanks!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
Using substitute in combination with .a was a great idea! Thanks a lot. I am wondering if there would be a demand for a wrapper around estout similar to the apa_table()
function in the papaja R package.
Anyhow thanks for your quick response!
Feel free to write such a wrapper ;)
@benjann I think it would be appropriate to close this issue.
If in the correlation table, we can set such notes, that will be great. All correlations with absolute values above 0.050 have p-values below 0.010
This is the requirement from APA
Thanks for this great package that has made my work much easier over the last years!
I am trying to reproduce an APA table. See Table 3: https://apastyle.apa.org/style-grammar-guidelines/tables-figures/sample-tables#regression
I roughly get what I want with the following commands:
The only thing I am missing is a way to dynamically convert a p value under 0.001 with "< .001". If the the p value is over 0.001, the actual value should be reported.
Is there a way to do this with estout?
Many thanks!