Announcement

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

  • scatter plots

    hey there!
    im using stata 14 and want to create the scatter plots between the K (cutt-offs) and H,A,MPI . MEANS 1st graph shown the K with H, 2nd K wth A and 3rd K with MPi. i have 3 cutt off values, 0.33, 0.20, 0.50.
    i hope you will get my point.
    thans

  • #2
    I don't know what cut-offs mean here, nor whether K should be plotted on the x or y axis.

    At a guess

    Code:
    scatter H K 
    
    scatter A K 
    
    scatter MPI K
    is what you want. If that's not right, and you don't get a better answer, you may need to explain much more.

    See also https://www.statalist.org/forums/for...ailable-on-ssc

    Comment


    • #3
      i want to generate the following information in stata and I dont know how to add a column with its variables.
      K H A MPI
      0.2 0.337 0.295 0.1
      0.33 0.116 0.406 0.047
      0 0.014 0.572 0.008

      Comment


      • #4
        I understood
        hey there!
        im using stata 14 and want to create the scatter plots
        But the rest, as my mom's mom would say, I haven't the foggiest idea about what it means or is meant to mean.

        So let's start over. Please give your example data using the dataex command. For us to provide meaningful feedback, you must provide your example data using the dataex command, the real data from an easily importable source (i.e., Github), or the equivalent of a toy example.
        Otherwise, anything we say is simply a waste of time. Note, that I'm not trying to be mean in saying this, I'm saying this because if we can't see your dataset as you do with a minimal worked example, anything we suggest is just guesswork. We need a minimal worked example of a dataset and code that you've tried.

        So please, provide us with your example data that encapsulates the problem.

        Comment


        • #5
          [QUOTE][i want to generate the following information in stata and I don't know how to add a column with its variables.
          K H A MPI
          0.2 0.337 0.295 0.1
          0.33 0.116 0.406 0.047
          0 0.014 0.572 0.008

          I want to create the above data as a table in stata. then scatter plots are constructed

          Comment


          • #6
            So, now the problem appears to be not getting the scatter plots but getting the data into Stata in the first place. I copied and pasted from #3 into the Data Editor and then did

            Code:
            rename *, upper
            and

            Code:
            dataex
            You could do the same or just copy and paste and run the resulting code, as here.



            Code:
            * Example generated by -dataex-. For more info, type help dataex
            clear
            input float(K H A MPI)
             .2 .337 .295   .1
            .33 .116 .406 .047
              0 .014 .572 .008
            end

            Comment


            • #7
              This frustrates me because when I asked you for a minimal worked example, you just repeated the original question in quotes and didn't engage with anything I wrote.
              Code:
              clear
              input K H A MPI
              0.2    0.337    0.295    0.1
              0.33    0.116    0.406    0.047
              0    0.014    0.572    0.008
              end
              scatter K H A MPI
              Is this the result you were hoping for?

              Comment

              Working...
              X