Announcement

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

  • Collect Export in STATA 15

    Hello everyone,

    I would like to use the equivalent of a collect export command after table in stata 15. I know that in stata 17 I can use collect export, but in STATA 15 I can't seem to find a similar solution. What I need is to be able to export the results from:

    Code:
     table (country) (region), c(mean GDP)
    I do not put any data because my problem here is to know whether there is a "collect export" version for stata 15 (and google could not help).
    Can someone help?


    Thanks,
    Dalila

  • #2
    Use the -replace- option to replace the current dataset with the data from the table. Then you can export the dataset.

    Comment


    • #3
      You appear to be asking about the new version of table and collect that were introduced in Stata 17. There is no such backwards compatible version with earlier versions. You will need to find one of the many available ways to export data suitable for your needs.

      Comment


      • #4
        Originally posted by Leonardo Guizzetti View Post
        You appear to be asking about the new version of table and collect that were introduced in Stata 17. There is no such backwards compatible version with earlier versions. You will need to find one of the many available ways to export data suitable for your needs.
        That's true. Just to clarify my answer, if you're using Stata 16 or lower, the old -table- command has the option replace, which will replace the current dataset. So, in Dalila's case, she'd write:
        Code:
        webuse nhanes2l, clear
        table (race) (sex), c(mean age) replace
        and then whatever -export- option is preferred.

        FWIW, if you have Stata 17 and you wanted to use the old table command:
        Code:
        version 16: table (race) (sex), c(mean age) replace

        Comment

        Working...
        X