Announcement

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

  • Export results

    Hi!
    I am quite new to Stata so there may be some basic elements that I have not learnt yet. I have some knowledge of Python programming from before, but quite limited. With that said, this is my issue at hand: I do not want to manually copy paste results from Stata (such a waste of time!) and the export function in Stata seems to not cover all areas. So far, I have mainly used the command putexcel to export rscalars, but not many values are saved as such.

    In practise, this is what I want to do. At this point I am not doing anything fancy, just looking at baseline data. I need to get a lot of descriptives (mean etc), run basic tests and I want to do a nice summary to 1. get a good over-view and 2. present to others. And I am using excel/word.

    1. I use e.g. the command tabmore to get mean and confidence intervals. After each tabmore I want to export mean and confidence interval to excel and I do not want to manually copy paste. How can I do this??

    2. I do e.g. ANOVA tests and quite a lot of them. The test value is stored as an rscalar, but not the p-value. How can I export the p-value??

    3. I use tabulate to run Ch2 test. The test value and p-value are saved as rscalars and can be exported. But I also want the number/proportion of observations in each subgroup. How can I export those?

    4. An extra question: At this point I have not found how to do a loop to go through different variables. So in order to not having to write all commands I write the code in excel where I can change from one variable to another using links and then copy it all into a do file. Is there a loop that can do this in Stata? I have only found loops that go through a series of numbers, like from 1 to 10, not through a list of variables.

    Any ideas? Thank you!

  • #2
    I want to add that I have two, more or less basic books, on Stata, I have searched forums and youtube, asked my colleagues (who use the manual copy paste method), so perhaps there is no tool for this. It feels like a fundamental question and to post it here is my final attempt before I have to copy paste (buhaaa). However, I am using Stata 13. Perhaps version 14 have these options if not 13?

    Comment


    • #3
      I am sorry. I am trying to close this tread because it is obviously in the wrong place. I can't find how to!!

      Comment


      • #4
        Hi Sara
        Maybe the basetable from ssc is something for you? try findit basetable.
        Also note that this is a Mata forum
        Kind regards

        nhb

        Comment

        Working...
        X