Announcement

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

  • #16
    I can sympathize with this position. I've had the displeasure on one occasion to have to perform the same analysis with different datasets on fully separate platforms that could not crosstalk with each other. The least painful method was to effectively transcribe the relevant plot data onto one system and use some other language to produce the graphs. Doing it this way also ensured some level of visual consistency between all graphs.

    Comment


    • #17
      insult Stata users by saying that I'm more used to working in R
      None taken, I was just saying that, in my opinion, making the dataset in Stata and creating graphs with R might not be the best idea. If you're bilingual such that you can do data analysis and graphs in R, I'm actually jealous of you Jenner Kerr because I don't know any R at all and I'm very very beginner-ish with Python. So in that respect, you're much better off than I am.

      My main point had more to do with contingencies. What if something goes wrong? What if you need to re-estimate the model for some reason? What if you left off the nested option when that's what you really wanted? Then you'll need to make changes two times over, first to Stata code, then presumably to R code, instead of just adjusting the code for the Stata. Again I'm not saying that this'll happen or even that it's likely, I was just saying why I think sticking to one software at a time is likely the better option. But if not, that's cool too, if your workflow easily accommodates more than one software, then that's awesome and I wouldn't discourage that.

      Comment


      • #18
        Originally posted by Jared Greathouse View Post
        None taken, I was just saying that, in my opinion, making the dataset in Stata and creating graphs with R might not be the best idea. If you're bilingual such that you can do data analysis and graphs in R, I'm actually jealous of you Jenner Kerr because I don't know any R at all and I'm very very beginner-ish with Python. So in that respect, you're much better off than I am.

        My main point had more to do with contingencies. What if something goes wrong? What if you need to re-estimate the model for some reason? What if you left off the nested option when that's what you really wanted? Then you'll need to make changes two times over, first to Stata code, then presumably to R code, instead of just adjusting the code for the Stata. Again I'm not saying that this'll happen or even that it's likely, I was just saying why I think sticking to one software at a time is likely the better option. But if not, that's cool too, if your workflow easily accommodates more than one software, then that's awesome and I wouldn't discourage that.
        I appreciate your comments on the drawbacks between on switching between different statistical softwares, I was only really looking for advice on something within one specific command

        Comment


        • #19
          For the specific cases of function, histogram, and kdensity the undocumented commands twoway__function_gen, twoway__histogram_gen, and twoway__kdensity_gen will provide the data from which the graph is created. See help undocumented.

          Comment


          • #20
            I have found gph2xl useful for extracting data from a Stata graph:

            search gph2xl

            package gph2xl from http://digital.cgdev.org/doc/stata/MO/Misc

            TITLE
            `gph2xl'. Extract and export data and image from a -gph- file

            DESCRIPTION/AUTHOR(S)
            Stata's graph commands sometimes generate and plot data derived from, but not found within, the user's data set. In order to convey to another researcher or a publisher the data used to generate an existing Stata graph, gph2xl extracts the underlying serset and then lists, saves to disc or exports to an Excel file the data.
            If the user elects, gph2xl writes the data to a sheet of an Excel workbook. Optionally, gph2xl pastes the image into other sheets of the same workbook in either or both of the -PNG- or -EMF- graphics formats. Thus a single Excel workbook contains everything a graphics artist would need to reconstruct the figure.
            A user having only a Stata -gph- file can also use gph2xl to extract the underlying data directly from that file.
            gph2xl is an enhanced version of grexport by Lars Kroll.

            Comment


            • #21
              Originally posted by Martyn Sherriff View Post
              I have found gph2xl useful for extracting data from a Stata graph:

              search gph2xl

              package gph2xl from http://digital.cgdev.org/doc/stata/MO/Misc

              TITLE
              `gph2xl'. Extract and export data and image from a -gph- file

              DESCRIPTION/AUTHOR(S)
              Stata's graph commands sometimes generate and plot data derived from, but not found within, the user's data set. In order to convey to another researcher or a publisher the data used to generate an existing Stata graph, gph2xl extracts the underlying serset and then lists, saves to disc or exports to an Excel file the data.
              If the user elects, gph2xl writes the data to a sheet of an Excel workbook. Optionally, gph2xl pastes the image into other sheets of the same workbook in either or both of the -PNG- or -EMF- graphics formats. Thus a single Excel workbook contains everything a graphics artist would need to reconstruct the figure.
              A user having only a Stata -gph- file can also use gph2xl to extract the underlying data directly from that file.
              gph2xl is an enhanced version of grexport by Lars Kroll.
              Thank you, I'll check it out if I run into this problem again!

              Comment


              • #22
                Originally posted by Jenner Kerr View Post
                Thank you all for your advice.


                I managed to figure out a way to get the raw results data out of the command.

                Regarding what I said about how Stata graphs look, it's more that I know you can format them to look nice but for this paper I don't have the time to learn and play around with it. So would rather get the raw data out and put it into R, which I can now do.
                Hey! I'm stuck with a similar problem and was wondering what you did to get the data from the graph? Thanks!

                Comment

                Working...
                X