Announcement

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

  • Precombine command output

    Hi! I am trying to use the stata command 'precombine' created by Mark Chatfield to compare variables in two datasets. The report prints out in the Stata results window, but I'm having trouble storing these results in a table or dataset format. I've tried using ereturn list, etc but it seems like nothing is stored in the current memory when the report is produced. The report printed is really useful but super long and so it would be great if I could somehow get it into a format that is filterable. If anyone has any experience with this or any suggestions, I would be super grateful!

    https://journals.sagepub.com/doi/pdf...867X1501500301

  • #2
    Since -precombine- is not an estimation program, you would not expect to find anything with -ereturn-. If you would find it anywhere, it would be in -r()- and you would see it with -return list-. But I'll save you the time and trouble of experimenting: there's nothing left behind in -r()- either. FWIW I agree with you that the absence of any results that can be further managed within Stata is -precombine-'s greatest weakness.

    I could imagine saving the Results window output in a text-log file and then writing a Stata program using -file read- to parse it, but writing such a program would not be simple at all.

    Comment


    • #3
      If you want a text copy, try

      Code:
      log using test.log , replace
      precombine _examination _medical_records, describe(type format vallabname varlab) uniquevars
      log close

      Comment


      • #4
        You could try modifying -precombine- to return the results you needed in r() - see https://www.stata.com/manuals/preturn.pdf . It might be much easier than parsing the log file.

        Comment

        Working...
        X