cpbl / pystata-MOVED-TO-GITLAB

Tools for controlling Stata from Python. Calls Stata, reads log files, generates dynamically customizable LaTeX tables (using cpblTables) from regression output; other tools for calling Stata and reading codebooks, results, etc
GNU General Public License v2.0
4 stars 1 forks source link

Rewrite composeLaTeXregressionTable in pystata_core to be able to take a DataFrame or new models object rather than only the old dict? #4

Open cpbl opened 6 years ago

cpbl commented 6 years ago

Also, see correlation_table() in pandas_utils.py: This should generate three dataframes, or one (blockwise df) with appropriately suffixed columns?: the Pearson coefficients, the s.e., and the p-values.
Then these three df tables should be passable to a utliity to convert it into a cpblTables table with paired rows... I guess it could be one DF with same columns and rows, but then one of the two (columns or rows) be multiindex so as to contain R, se, p And then extra lines / reg stats go in extra rows (or columns)?

What about recording other markup for the table? Keeping musing here.

cpbl commented 6 years ago

Note all these relevant (confused?) functions :

from pystata import formatPairedRow, formatPairedRow_DataFrame  # Now moved to stats_formatting in textables
from cpblUtilities.textables import   interleave_columns_as_rows, interleave_and_format_paired_columns_as_rows
from cpblUtilities import latexFormatEstimateWithPvalue

(this comment is issue cpbl/cpblUtilities#14 )