Hello everyone,
I have a question regarding the user-written command -polychoric-. Based on this post in the Stata forum, I have been able to extract the return matrix from polychoric, save it to a Stata matrix and export it an .rtf file using esttab matrix(correlations). I have now tried to use esttab to change how many decimals are displayed. However, I have had no luck so far with different combinations of "cells(fmt(X))". My assumption is that esttab does not recognized the correlations as coefficients and thus is not able to change the decimals. I am not sure if there is a fix.
I have a question regarding the user-written command -polychoric-. Based on this post in the Stata forum, I have been able to extract the return matrix from polychoric, save it to a Stata matrix and export it an .rtf file using esttab matrix(correlations). I have now tried to use esttab to change how many decimals are displayed. However, I have had no luck so far with different combinations of "cells(fmt(X))". My assumption is that esttab does not recognized the correlations as coefficients and thus is not able to change the decimals. I am not sure if there is a fix.
Code:
use https://www.stata-press.com/data/r17/nlsw88.dta polychoric age race married industry occupation union matrix correlations = r(R) esttab matrix(correlations) using "Yourfilepath/Correlations.rtf", replace label cells(fmt(%9.4f))

Comment