Announcement

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

  • kountry command

    Hi all, I'm trying to generate iso2 codes for all countries (typed out manually) and I have been told to use the command kountry. Halfway through it says kountry.dta not found and I'm not sure where I've done wrong (I'm a newbie!).

    This is what I did:

    ssc install kountry
    kountry COUNTRY1, from(other) stuck marker --->#this gives the iso3n codes _ISO3N_#
    kountry _ISO3N_, from(iso3n) to(iso2c)
    file /Users/xyz/Library/Application
    Support/Stata/ado/plus/k/kountry.dta not found

    Any advice?

  • #2
    The -kountry- command requires access to an ancillary file kountry.dta which is not installed when you run -ssc install kountry-. You need to follow that with -net get kountry- to get the ancillary file(s). Note: it will copy kountry.dta into whatever is your current directory when you run -net get-. So before doing that be sure to change your current directory to whatever directory you will be working in when you wawnt to run -kountry-.

    Comment


    • #3
      I've uninstalled and reinstalled everything again but still got the same message even after including -net get kountry-. What should I do?
      Last edited by Kye Reen; 05 Jul 2021, 18:49.

      Comment


      • #4
        Try copying kountry.dta and the other ancillary file from wherever you put them with -net get- into /Users/xyz/Library/Application
        Support/Stata/ado/plus/k. Perhpaps -kountry- insists on looking for them there.

        Comment


        • #5
          could you teach me on how to do that?

          Comment


          • #6
            You are running on a Mac, right?

            The following sequence of commands should do what you need.
            Code:
            net get kountry.pkg, from(http://fmwww.bc.edu/RePEc/bocode/k/)
            shell ls kountry.dta
            shell cp kountry.dta  "/Users/xyz/Library/Application Support/Stata/ado/plus/k/"
            shell ls "/Users/xyz/Library/Application Support/Stata/ado/plus/k/kountry.dta"
            The first command downloads kountry.dta into Stata's current working directory. It may tell you that all files exist and are up to date, since you've presumably done this once already.

            The second command confirms that the file is indeed located in Stata's current working directory.

            The third command copies the file to the location where the kountry command was looking for it to be.

            The fourth command confirms that the file was copied successfully.

            Comment


            • #7
              omg I did it! Thank you so much!!

              Comment


              • #8
                Hi,

                when I type
                net get kountry.pkg, from(http://fmwww.bc.edu/RePEc/bocode/k/)

                stata tells me:
                nothing to copy

                The website is still there and kountry.pkg as well. What is the problem here?

                thanks in advance!

                Comment


                • #9
                  Code:
                  ssc describe kountry
                  should tell you that kountry.dta is part of the installation files.

                  Comment


                  • #10
                    ok, so I just have to type

                    ssc install kountry

                    now!

                    thanks!

                    Comment


                    • #11
                      kountry.dta and k_other_extras.txt were incorrectly marked on SSC as ancillary back in 2021. They are now included in the installation files so manual copying of these files to the plus directory is no longer needed.


                      Comment

                      Working...
                      X