Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • [TABLES] identify parts of stored results to consume some function of them

    Dear list members,

    I have a question concerning customizable tables and (I think) more precisely about collect get.

    Suppose the command generating the results I want to tabulate stores e(X), an n x 2 matrix. In my table, I would like to add a third column that is a function of the previous two - say, containing the pairwise differences between the values contained in them.

    I can't find a way to do it. As far as I understand, collect get allows to consume expressions of stored results but these 'named expressions' are described as based on the identifiers of the stored results, so in this case just e(X). Clearly, I need to disaggregate further in and identify each column of e(X) to tell Stata to also store a column containing the differences. I tried to use the Mata expression select() but to no avail - possibly because I don't know how to use it, but also because it may simply not be the way out of the issue. To me, it also looks like there is no way to manipulate the saved results after having consumed them.

    Any suggestion would be much appreciated.
    I'm using StataNow/MP 18.5
Working...
X