Announcement

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

  • twoway connected or xtline

    Year Country FDI year
    2000 Cambodia 4.0501412 2000
    2001 Cambodia 3.742602 2001
    2002 Cambodia 3.3828954 2002
    2003 Cambodia 1.8002746 2003
    2004 Cambodia 2.4619467 2004
    2005 Cambodia 6.05716 2005
    2006 Cambodia 6.6425029 2006
    2007 Cambodia 10.038949 2007
    2008 Cambodia 8.4707444 2008
    2009 Cambodia 9.4667163 2009
    2010 Cambodia 12.491377 2010
    2011 Cambodia 11.994842 2011
    2012 Cambodia 14.252361 2012
    2013 Cambodia 13.388486 2013
    2014 Cambodia 11.047159 2014
    2015 Cambodia 10.098664 2015
    2016 Cambodia 12.369221 2016
    2017 Cambodia 12.551102 2017
    2000 India .791041 2000
    2001 India 1.1696929 2001
    2002 India 1.1498324 2002
    2003 India .75362817 2003
    2004 India .83286554 2004
    2005 India .93857341 2005


    Hi,

    Above is my dataset in this form..I want to know, what code can I use to generate the following graph? I am confused. Thank you
    Attached Files

  • #2
    one relatively easy way is to use the user-written "sepscatter"; use -search- to find and install

    Comment


    • #3
      Either tw connected or xtline will give you the graph in #1, but you will need if conditions to customize the marker symbols and colors. These are added directly in tw connected or through the addplot() option in xtline.

      Comment


      • #4
        Your example graph (no source or reference) shows eight countries. Speak up anyone who thinks it's a great success except in the literal sense that it shows the data.

        https://www.statalist.org/forums/for...using-linkplot is a discussion of the general problem with several links.

        What's not clear from #1 is how many countries you want to show and how messy the data are. For this variable I would want to try logit scale or some relative of that if zeros are present.

        Comment


        • #5
          Thank you all!

          I am just confused how the data frame should be put when we are using a particular type of graph.

          Comment

          Working...
          X