Announcement

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

  • egen function

    Good morning,

    I read with great interest the posts of Liza Burina. In fact, I am facing the exact same problem with the egen function (on Stata 12) and unfortunatly, your exchange were not conclusive.
    How did you solve this problem?

    I checked as you advised that I have the "group" function in my Stata 12 (see below):
    . which _ggroup, all

    C:\Users\LAURED~1\AppData\Local\Temp\Rar$EXa0.989\ Stata 12\ado\base\_\_ggroup.ado
    *! version 2.1.2 18jun2011

    Still, no function of the egen works, even though the function is available on my Stata:
    . egen id=group(sanction_id)
    unknown egen function group()
    r(133);

    Could you please help me with that problem?
    Or do you know another way how to group variables?

    Thank you very much in advance for your kind help.
    Best regards

  • #2
    I guess your are referring to this post?* Actually, this thread is inconclusive because the original poster never came back. The advice is probably still good: contact tech-support. And, please report back.

    If you wish to discuss this more on the forum, show us the results of

    Code:
    set trace on
    egen id=group(sanction_id)
    set trace off
    in code-delimiters as I did above.

    Best
    Daniel


    * Better link to the post than to the person. If it had been a link to Nick Cox, nobody would ever be able to identify which of his 10,000 posts you are referring to.

    Comment


    • #3
      Thank you Daniel for your reply and advice.
      Here are the results:
      Code:
      [CODE][
      . set trace on

      .
      . egen id=group(sanction_id)
      ---------------------------------------------------------------------------------------- begin egen ---
      - version 6, missing
      - local cvers = _caller()
      - gettoken type 0 : 0, parse(" =(")
      - gettoken name 0 : 0, parse(" =(")
      - if `"`name'"'=="=" {
      = if `"="'=="=" {
      - local name `"`type'"'
      = local name `"id"'
      - local type : set type
      - }
      - else {
      gettoken eqsign 0 : 0, parse(" =(")
      if `"`eqsign'"' != "=" {
      error 198
      }
      }
      - confirm new variable `name'
      = confirm new variable id
      id already defined
      ------------------------------------------------------------------------------------------ end egen ---
      r(110);

      .
      . set trace off/CODE]

      Thank you very much for your kind help!
      Best
      Laure

      Comment


      • #4
        Good morning again,
        I just realized that the variable was already defined, so you will find below the code for the egen=group(#) function, when it does not exist already:

        . set trace on

        .
        . egen id=group(sanction_id)
        ------------------------------------------------------------------------------------------------------------- begin egen ---
        - version 6, missing
        - local cvers = _caller()
        - gettoken type 0 : 0, parse(" =(")
        - gettoken name 0 : 0, parse(" =(")
        - if `"`name'"'=="=" {
        = if `"="'=="=" {
        - local name `"`type'"'
        = local name `"id"'
        - local type : set type
        - }
        - else {
        gettoken eqsign 0 : 0, parse(" =(")
        if `"`eqsign'"' != "=" {
        error 198
        }
        }
        - confirm new variable `name'
        = confirm new variable id
        - gettoken fcn 0 : 0, parse(" =(")
        - gettoken args 0 : 0, parse(" ,") match(par)
        - capture qui findfile _g`fcn'.ado
        = capture qui findfile _ggroup.ado
        ------------------------------------------------------------------------------------------------------- begin findfile ---
        - version 8
        - gettoken fn 0 : 0, parse(" ,")
        - syntax [, ALL noDEScend PATH(string)]
        - if `"`path'"'=="" {
        = if `""'=="" {
        - local path `"`c(adopath)'"'
        = local path `"UPDATES;BASE;SITE;.;PERSONAL;PLUS;OLDPLACE"'
        - }
        - local n 0
        - local subdir : adosubdir `"`fn'"'
        = local subdir : adosubdir `"_ggroup.ado"'
        - if `"`subdir'"' != "" {
        = if `"_"' != "" {
        - gettoken d path : path, parse(";")
        - while `"`d'"'!="" {
        = while `"UPDATES"'!="" {
        - if `"`d'"' != ";" {
        = if `"UPDATES"' != ";" {
        - local d : sysdir `"`d'"'
        = local d : sysdir `"UPDATES"'
        - local ffn `"`d'`fn'"'
        = local ffn `"C:\Users\LAURED~1\AppData\Local\Temp\Rar.732\Sta ta 12\ado\updates/_ggroup.ado"'
        - capture confirm file `"`ffn'"'
        = capture confirm file `"C:\Users\LAURED~1\AppData\Local\Temp\Rar.732\Sta ta 12\ado\updates/_ggroup.ado"'
        - if _rc==0 {
        di as txt `"`ffn'"'
        if "`all'"=="" {
        ret local fn `"`ffn'"'
        exit
        }
        if `n' {
        ret local fn `"`return(fn)' "`ffn'""'
        }
        else ret local fn `""`ffn'""'
        local n 1
        }
        - if "`descend'"=="" {
        = if ""=="" {
        - local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
        = local ffn `"C:\Users\LAURED~1\AppData\Local\Temp\Rar.732\Sta ta 12\ado\updates/_/_ggroup.ado"'
        - capture confirm file `"`ffn'"'
        = capture confirm file `"C:\Users\LAURED~1\AppData\Local\Temp\Rar.732\Sta ta 12\ado\updates/_/_ggroup.ado"'
        - if _rc==0 {
        di as txt `"`ffn'"'
        if "`all'"=="" {
        ret local fn `"`ffn'"'
        exit
        }
        if `n' {
        ret local fn `"`return(fn)' "`ffn'""'
        }
        else ret local fn `"`ffn'"'
        local n 1
        }
        - }
        - }
        - gettoken d path : path, parse(" ;")
        - }
        - while `"`d'"'!="" {
        = while `";"'!="" {
        - if `"`d'"' != ";" {
        = if `";"' != ";" {
        local d : sysdir `"`d'"'
        local ffn `"`d'`fn'"'
        capture confirm file `"`ffn'"'
        if _rc==0 {
        di as txt `"`ffn'"'
        if "`all'"=="" {
        ret local fn `"`ffn'"'
        exit
        }
        if `n' {
        ret local fn `"`return(fn)' "`ffn'""'
        }
        else ret local fn `""`ffn'""'
        local n 1
        }
        if "`descend'"=="" {
        local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
        capture confirm file `"`ffn'"'
        if _rc==0 {
        di as txt `"`ffn'"'
        if "`all'"=="" {
        ret local fn `"`ffn'"'
        exit
        }
        if `n' {
        ret local fn `"`return(fn)' "`ffn'""'
        }
        else ret local fn `"`ffn'"'
        local n 1
        }
        }
        }
        - gettoken d path : path, parse(" ;")
        - }
        - while `"`d'"'!="" {
        = while `"BASE"'!="" {
        - if `"`d'"' != ";" {
        = if `"BASE"' != ";" {
        - local d : sysdir `"`d'"'
        = local d : sysdir `"BASE"'
        - local ffn `"`d'`fn'"'
        = local ffn `"C:\Users\LAURED~1\AppData\Local\Temp\Rar.732\Sta ta 12\ado\base/_ggroup.ado"'
        - capture confirm file `"`ffn'"'
        = capture confirm file `"C:\Users\LAURED~1\AppData\Local\Temp\Rar.732\Sta ta 12\ado\base/_ggroup.ado"'
        - if _rc==0 {
        di as txt `"`ffn'"'
        if "`all'"=="" {
        ret local fn `"`ffn'"'
        exit
        }
        if `n' {
        ret local fn `"`return(fn)' "`ffn'""'
        }
        else ret local fn `""`ffn'""'
        local n 1
        }
        - if "`descend'"=="" {
        = if ""=="" {
        - local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
        = local ffn `"C:\Users\LAURED~1\AppData\Local\Temp\Rar.732\Sta ta 12\ado\base/_/_ggroup.ado"'
        - capture confirm file `"`ffn'"'
        = capture confirm file `"C:\Users\LAURED~1\AppData\Local\Temp\Rar.732\Sta ta 12\ado\base/_/_ggroup.ado"'
        - if _rc==0 {
        di as txt `"`ffn'"'
        if "`all'"=="" {
        ret local fn `"`ffn'"'
        exit
        }
        if `n' {
        ret local fn `"`return(fn)' "`ffn'""'
        }
        else ret local fn `"`ffn'"'
        local n 1
        }
        - }
        - }
        - gettoken d path : path, parse(" ;")
        - }
        - while `"`d'"'!="" {
        = while `";"'!="" {
        - if `"`d'"' != ";" {
        = if `";"' != ";" {
        local d : sysdir `"`d'"'
        local ffn `"`d'`fn'"'
        capture confirm file `"`ffn'"'
        if _rc==0 {
        di as txt `"`ffn'"'
        if "`all'"=="" {
        ret local fn `"`ffn'"'
        exit
        }
        if `n' {
        ret local fn `"`return(fn)' "`ffn'""'
        }
        else ret local fn `""`ffn'""'
        local n 1
        }
        if "`descend'"=="" {
        local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
        capture confirm file `"`ffn'"'
        if _rc==0 {
        di as txt `"`ffn'"'
        if "`all'"=="" {
        ret local fn `"`ffn'"'
        exit
        }
        if `n' {
        ret local fn `"`return(fn)' "`ffn'""'
        }
        else ret local fn `"`ffn'"'
        local n 1
        }
        }
        }
        - gettoken d path : path, parse(" ;")
        - }
        - while `"`d'"'!="" {
        = while `"SITE"'!="" {
        - if `"`d'"' != ";" {
        = if `"SITE"' != ";" {
        - local d : sysdir `"`d'"'
        = local d : sysdir `"SITE"'
        - local ffn `"`d'`fn'"'
        = local ffn `"C:\Users\LAURED~1\AppData\Local\Temp\Rar.732\Sta ta 12\ado\site/_ggroup.ado"'
        - capture confirm file `"`ffn'"'
        = capture confirm file `"C:\Users\LAURED~1\AppData\Local\Temp\Rar.732\Sta ta 12\ado\site/_ggroup.ado"'
        - if _rc==0 {
        di as txt `"`ffn'"'
        if "`all'"=="" {
        ret local fn `"`ffn'"'
        exit
        }
        if `n' {
        ret local fn `"`return(fn)' "`ffn'""'
        }
        else ret local fn `""`ffn'""'
        local n 1
        }
        - if "`descend'"=="" {
        = if ""=="" {
        - local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
        = local ffn `"C:\Users\LAURED~1\AppData\Local\Temp\Rar.732\Sta ta 12\ado\site/_/_ggroup.ado"'
        - capture confirm file `"`ffn'"'
        = capture confirm file `"C:\Users\LAURED~1\AppData\Local\Temp\Rar.732\Sta ta 12\ado\site/_/_ggroup.ado"'
        - if _rc==0 {
        di as txt `"`ffn'"'
        if "`all'"=="" {
        ret local fn `"`ffn'"'
        exit
        }
        if `n' {
        ret local fn `"`return(fn)' "`ffn'""'
        }
        else ret local fn `"`ffn'"'
        local n 1
        }
        - }
        - }
        - gettoken d path : path, parse(" ;")
        - }
        - while `"`d'"'!="" {
        = while `";"'!="" {
        - if `"`d'"' != ";" {
        = if `";"' != ";" {
        local d : sysdir `"`d'"'
        local ffn `"`d'`fn'"'
        capture confirm file `"`ffn'"'
        if _rc==0 {
        di as txt `"`ffn'"'
        if "`all'"=="" {
        ret local fn `"`ffn'"'
        exit
        }
        if `n' {
        ret local fn `"`return(fn)' "`ffn'""'
        }
        else ret local fn `""`ffn'""'
        local n 1
        }
        if "`descend'"=="" {
        local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
        capture confirm file `"`ffn'"'
        if _rc==0 {
        di as txt `"`ffn'"'
        if "`all'"=="" {
        ret local fn `"`ffn'"'
        exit
        }
        if `n' {
        ret local fn `"`return(fn)' "`ffn'""'
        }
        else ret local fn `"`ffn'"'
        local n 1
        }
        }
        }
        - gettoken d path : path, parse(" ;")
        - }
        - while `"`d'"'!="" {
        = while `"."'!="" {
        - if `"`d'"' != ";" {
        = if `"."' != ";" {
        - local d : sysdir `"`d'"'
        = local d : sysdir `"."'
        - local ffn `"`d'`fn'"'
        = local ffn `"./_ggroup.ado"'
        - capture confirm file `"`ffn'"'
        = capture confirm file `"./_ggroup.ado"'
        - if _rc==0 {
        di as txt `"`ffn'"'
        if "`all'"=="" {
        ret local fn `"`ffn'"'
        exit
        }
        if `n' {
        ret local fn `"`return(fn)' "`ffn'""'
        }
        else ret local fn `""`ffn'""'
        local n 1
        }
        - if "`descend'"=="" {
        = if ""=="" {
        - local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
        = local ffn `"./_/_ggroup.ado"'
        - capture confirm file `"`ffn'"'
        = capture confirm file `"./_/_ggroup.ado"'
        - if _rc==0 {
        di as txt `"`ffn'"'
        if "`all'"=="" {
        ret local fn `"`ffn'"'
        exit
        }
        if `n' {
        ret local fn `"`return(fn)' "`ffn'""'
        }
        else ret local fn `"`ffn'"'
        local n 1
        }
        - }
        - }
        - gettoken d path : path, parse(" ;")
        - }
        - while `"`d'"'!="" {
        = while `";"'!="" {
        - if `"`d'"' != ";" {
        = if `";"' != ";" {
        local d : sysdir `"`d'"'
        local ffn `"`d'`fn'"'
        capture confirm file `"`ffn'"'
        if _rc==0 {
        di as txt `"`ffn'"'
        if "`all'"=="" {
        ret local fn `"`ffn'"'
        exit
        }
        if `n' {
        ret local fn `"`return(fn)' "`ffn'""'
        }
        else ret local fn `""`ffn'""'
        local n 1
        }
        if "`descend'"=="" {
        local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
        capture confirm file `"`ffn'"'
        if _rc==0 {
        di as txt `"`ffn'"'
        if "`all'"=="" {
        ret local fn `"`ffn'"'
        exit
        }
        if `n' {
        ret local fn `"`return(fn)' "`ffn'""'
        }
        else ret local fn `"`ffn'"'
        local n 1
        }
        }
        }
        - gettoken d path : path, parse(" ;")
        - }
        - while `"`d'"'!="" {
        = while `"PERSONAL"'!="" {
        - if `"`d'"' != ";" {
        = if `"PERSONAL"' != ";" {
        - local d : sysdir `"`d'"'
        = local d : sysdir `"PERSONAL"'
        - local ffn `"`d'`fn'"'
        = local ffn `"c:\ado\personal/_ggroup.ado"'
        - capture confirm file `"`ffn'"'
        = capture confirm file `"c:\ado\personal/_ggroup.ado"'
        - if _rc==0 {
        di as txt `"`ffn'"'
        if "`all'"=="" {
        ret local fn `"`ffn'"'
        exit
        }
        if `n' {
        ret local fn `"`return(fn)' "`ffn'""'
        }
        else ret local fn `""`ffn'""'
        local n 1
        }
        - if "`descend'"=="" {
        = if ""=="" {
        - local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
        = local ffn `"c:\ado\personal/_/_ggroup.ado"'
        - capture confirm file `"`ffn'"'
        = capture confirm file `"c:\ado\personal/_/_ggroup.ado"'
        - if _rc==0 {
        di as txt `"`ffn'"'
        if "`all'"=="" {
        ret local fn `"`ffn'"'
        exit
        }
        if `n' {
        ret local fn `"`return(fn)' "`ffn'""'
        }
        else ret local fn `"`ffn'"'
        local n 1
        }
        - }
        - }
        - gettoken d path : path, parse(" ;")
        - }
        - while `"`d'"'!="" {
        = while `";"'!="" {
        - if `"`d'"' != ";" {
        = if `";"' != ";" {
        local d : sysdir `"`d'"'
        local ffn `"`d'`fn'"'
        capture confirm file `"`ffn'"'
        if _rc==0 {
        di as txt `"`ffn'"'
        if "`all'"=="" {
        ret local fn `"`ffn'"'
        exit
        }
        if `n' {
        ret local fn `"`return(fn)' "`ffn'""'
        }
        else ret local fn `""`ffn'""'
        local n 1
        }
        if "`descend'"=="" {
        local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
        capture confirm file `"`ffn'"'
        if _rc==0 {
        di as txt `"`ffn'"'
        if "`all'"=="" {
        ret local fn `"`ffn'"'
        exit
        }
        if `n' {
        ret local fn `"`return(fn)' "`ffn'""'
        }
        else ret local fn `"`ffn'"'
        local n 1
        }
        }
        }
        - gettoken d path : path, parse(" ;")
        - }
        - while `"`d'"'!="" {
        = while `"PLUS"'!="" {
        - if `"`d'"' != ";" {
        = if `"PLUS"' != ";" {
        - local d : sysdir `"`d'"'
        = local d : sysdir `"PLUS"'
        - local ffn `"`d'`fn'"'
        = local ffn `"c:\ado\plus/_ggroup.ado"'
        - capture confirm file `"`ffn'"'
        = capture confirm file `"c:\ado\plus/_ggroup.ado"'
        - if _rc==0 {
        di as txt `"`ffn'"'
        if "`all'"=="" {
        ret local fn `"`ffn'"'
        exit
        }
        if `n' {
        ret local fn `"`return(fn)' "`ffn'""'
        }
        else ret local fn `""`ffn'""'
        local n 1
        }
        - if "`descend'"=="" {
        = if ""=="" {
        - local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
        = local ffn `"c:\ado\plus/_/_ggroup.ado"'
        - capture confirm file `"`ffn'"'
        = capture confirm file `"c:\ado\plus/_/_ggroup.ado"'
        - if _rc==0 {
        di as txt `"`ffn'"'
        if "`all'"=="" {
        ret local fn `"`ffn'"'
        exit
        }
        if `n' {
        ret local fn `"`return(fn)' "`ffn'""'
        }
        else ret local fn `"`ffn'"'
        local n 1
        }
        - }
        - }
        - gettoken d path : path, parse(" ;")
        - }
        - while `"`d'"'!="" {
        = while `";"'!="" {
        - if `"`d'"' != ";" {
        = if `";"' != ";" {
        local d : sysdir `"`d'"'
        local ffn `"`d'`fn'"'
        capture confirm file `"`ffn'"'
        if _rc==0 {
        di as txt `"`ffn'"'
        if "`all'"=="" {
        ret local fn `"`ffn'"'
        exit
        }
        if `n' {
        ret local fn `"`return(fn)' "`ffn'""'
        }
        else ret local fn `""`ffn'""'
        local n 1
        }
        if "`descend'"=="" {
        local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
        capture confirm file `"`ffn'"'
        if _rc==0 {
        di as txt `"`ffn'"'
        if "`all'"=="" {
        ret local fn `"`ffn'"'
        exit
        }
        if `n' {
        ret local fn `"`return(fn)' "`ffn'""'
        }
        else ret local fn `"`ffn'"'
        local n 1
        }
        }
        }
        - gettoken d path : path, parse(" ;")
        - }
        - while `"`d'"'!="" {
        = while `"OLDPLACE"'!="" {
        - if `"`d'"' != ";" {
        = if `"OLDPLACE"' != ";" {
        - local d : sysdir `"`d'"'
        = local d : sysdir `"OLDPLACE"'
        - local ffn `"`d'`fn'"'
        = local ffn `"c:\ado/_ggroup.ado"'
        - capture confirm file `"`ffn'"'
        = capture confirm file `"c:\ado/_ggroup.ado"'
        - if _rc==0 {
        di as txt `"`ffn'"'
        if "`all'"=="" {
        ret local fn `"`ffn'"'
        exit
        }
        if `n' {
        ret local fn `"`return(fn)' "`ffn'""'
        }
        else ret local fn `""`ffn'""'
        local n 1
        }
        - if "`descend'"=="" {
        = if ""=="" {
        - local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
        = local ffn `"c:\ado/_/_ggroup.ado"'
        - capture confirm file `"`ffn'"'
        = capture confirm file `"c:\ado/_/_ggroup.ado"'
        - if _rc==0 {
        di as txt `"`ffn'"'
        if "`all'"=="" {
        ret local fn `"`ffn'"'
        exit
        }
        if `n' {
        ret local fn `"`return(fn)' "`ffn'""'
        }
        else ret local fn `"`ffn'"'
        local n 1
        }
        - }
        - }
        - gettoken d path : path, parse(" ;")
        - }
        - while `"`d'"'!="" {
        = while `""'!="" {
        if `"`d'"' != ";" {
        local d : sysdir `"`d'"'
        local ffn `"`d'`fn'"'
        capture confirm file `"`ffn'"'
        if _rc==0 {
        di as txt `"`ffn'"'
        if "`all'"=="" {
        ret local fn `"`ffn'"'
        exit
        }
        if `n' {
        ret local fn `"`return(fn)' "`ffn'""'
        }
        else ret local fn `""`ffn'""'
        local n 1
        }
        if "`descend'"=="" {
        local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
        capture confirm file `"`ffn'"'
        if _rc==0 {
        di as txt `"`ffn'"'
        if "`all'"=="" {
        ret local fn `"`ffn'"'
        exit
        }
        if `n' {
        ret local fn `"`return(fn)' "`ffn'""'
        }
        else ret local fn `"`ffn'"'
        local n 1
        }
        }
        }
        gettoken d path : path, parse(" ;")
        }
        - }
        - if "`all'"=="" | `n'==0 {
        = if ""=="" | 0==0 {
        - di as err `"file "`fn'" not found"'
        = di as err `"file "_ggroup.ado" not found"'
        - exit 601
        }
        --------------------------------------------------------------------------------------------------------- end findfile ---
        - if (`"`r(fn)'"' == "") {
        = if (`""' == "") {
        - di as error "unknown egen function `fcn'()"
        = di as error "unknown egen function group()"
        unknown egen function group()
        - exit 133
        }
        --------------------------------------------------------------------------------------------------------------- end egen ---
        r(133);

        .
        . set trace off

        .
        Thank you very much in advance for your help!
        Best
        Laure

        Comment


        • #5
          Laure: Something is very wrong with your Stata installation if Stata can't find that file. It comes with the installation media and has done so for a very long time. I'd consider re-installing or as already suggested contacting StataCorp technical support (make sure that you cite licencing information).

          There is a crumb of comfort in that one piece of code is looking for

          C:\Users\LAURED~1\AppData\Local\Temp\Rar.732\Sta ta 12\ado\updates/_/_ggroup.ado

          and another says that the file is in

          C:\Users\LAURED~1\AppData\Local\Temp\Rar$EXa0.989\ Stata 12\ado\base\_\_ggroup.ado

          These aren't the same. First off, you have a dollar sign somehow in the second filepath. Stata is going to try to interpret that as a part of a global macro reference.

          Second, there are different spaces around (and within) "Stata 12" in your filepaths as you report them.

          Third, these seem to be strange places to install Stata on Windows. Why anywhere that is \Local\Temp?
          Last edited by Nick Cox; 16 Aug 2017, 08:38.

          Comment


          • #6
            Please cross reference other posts with the exact same questions.

            Nick Cox did point to Stata tech-support as I have here before.

            Are you sure this is a properly installed and up-to data version of Stata that you are running? I might be wrong but in

            Code:
            C:\Users\LAURED~1\AppData\Local\Temp\Rar.732\Sta ta 12\ado\updates/_ggroup.ado
            The "Temp" part is a bit irritating as this usually point to a temporary folder where you would likely not install programs. Also the "Rar.732" seems to indicate some sort of compressed folder which is also usually not used when programs are installed. Last the name Stata is spelled "Sta ta 12" which seems like that name has been typed in by someone rather than been created by an automated installation process.

            Best
            Daniel

            Comment


            • #7
              Daniel and I make similar points. Let me phrase this positively: if you or your institution have purchased your copy of Stata, you can contact StataCorp technical support (although Stata 12 may now only get limited support). Stata itself doesn't come as files to be decompressed using rar.
              Last edited by Nick Cox; 16 Aug 2017, 08:43.

              Comment


              • #8
                Thank you very much for your help! I will contact StatCorp Technical Support.
                Best
                Laure

                Comment


                • #9
                  Hi Laure,

                  Can you please share what did you find?

                  Thanks
                  Sidra

                  Comment


                  • #10
                    Laure deb hasn't been active here since 06 Sep 2017.

                    If you have the same or a similar problem, I stand by the advice in #7.

                    Comment


                    • #11
                      i'm facing the same problem as Laura
                      set trace on

                      . egen id=group(sanction_id)
                      ------------------------------------------------------------------------------------------------- begin egen ---
                      - version 6, missing
                      - local cvers = _caller()
                      - gettoken type 0 : 0, parse(" =(")
                      - gettoken name 0 : 0, parse(" =(")
                      - if `"`name'"'=="=" {
                      = if `"="'=="=" {
                      - local name `"`type'"'
                      = local name `"id"'
                      - local type : set type
                      - }
                      - else {
                      gettoken eqsign 0 : 0, parse(" =(")
                      if `"`eqsign'"' != "=" {
                      error 198
                      }
                      }
                      - confirm new variable `name'
                      = confirm new variable id
                      - gettoken fcn 0 : 0, parse(" =(")
                      - gettoken args 0 : 0, parse(" ,") match(par)
                      - if "`c(adoarchive)'"=="1" {
                      = if ""=="1" {
                      capture qui _stfilearchive find _g`fcn'.ado
                      if _rc {
                      di as error "unknown egen function `fcn'()"
                      exit 133
                      }
                      }
                      - else {
                      - capture qui findfile _g`fcn'.ado
                      = capture qui findfile _ggroup.ado
                      ------------------------------------------------------------------------------------------- begin findfile ---
                      - version 8
                      - gettoken fn 0 : 0, parse(" ,")
                      - syntax [, ALL noDEScend PATH(string)]
                      - if `"`path'"'=="" {
                      = if `""'=="" {
                      - local path `"`c(adopath)'"'
                      = local path `"BASE;SITE;.;PERSONAL;PLUS;OLDPLACE"'
                      - }
                      - local n 0
                      - local subdir : adosubdir `"`fn'"'
                      = local subdir : adosubdir `"_ggroup.ado"'
                      - if `"`subdir'"' != "" {
                      = if `"_"' != "" {
                      - gettoken d path : path, parse(";")
                      - while `"`d'"'!="" {
                      = while `"BASE"'!="" {
                      - if `"`d'"' != ";" {
                      = if `"BASE"' != ";" {
                      - local d : sysdir `"`d'"'
                      = local d : sysdir `"BASE"'
                      - local ffn `"`d'`fn'"'
                      = local ffn `"C:\Users\USERPC~1\AppData\Local\Temp\Rar.297\Sta ta 15.0 x64\ado\base/_ggroup.ado"'
                      - capture confirm file `"`ffn'"'
                      = capture confirm file `"C:\Users\USERPC~1\AppData\Local\Temp\Rar.297\Sta ta 15.0 x64\ado\base/_ggroup.ado"'
                      - if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `""`ffn'""'
                      local n 1
                      }
                      - if "`descend'"=="" {
                      = if ""=="" {
                      - local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
                      = local ffn `"C:\Users\USERPC~1\AppData\Local\Temp\Rar.297\Sta ta 15.0 x64\ado\base/_/_ggroup.ado"'
                      - capture confirm file `"`ffn'"'
                      = capture confirm file `"C:\Users\USERPC~1\AppData\Local\Temp\Rar.297\Sta ta 15.0 x64\ado\base/_/_ggroup.ado"'
                      - if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `"`ffn'"'
                      local n 1
                      }
                      - }
                      - }
                      - gettoken d path : path, parse(" ;")
                      - }
                      - while `"`d'"'!="" {
                      = while `";"'!="" {
                      - if `"`d'"' != ";" {
                      = if `";"' != ";" {
                      local d : sysdir `"`d'"'
                      local ffn `"`d'`fn'"'
                      capture confirm file `"`ffn'"'
                      if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `""`ffn'""'
                      local n 1
                      }
                      if "`descend'"=="" {
                      local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
                      capture confirm file `"`ffn'"'
                      if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `"`ffn'"'
                      local n 1
                      }
                      }
                      }
                      - gettoken d path : path, parse(" ;")
                      - }
                      - while `"`d'"'!="" {
                      = while `"SITE"'!="" {
                      - if `"`d'"' != ";" {
                      = if `"SITE"' != ";" {
                      - local d : sysdir `"`d'"'
                      = local d : sysdir `"SITE"'
                      - local ffn `"`d'`fn'"'
                      = local ffn `"C:\Users\USERPC~1\AppData\Local\Temp\Rar.297\Sta ta 15.0 x64\ado\site/_ggroup.ado"'
                      - capture confirm file `"`ffn'"'
                      = capture confirm file `"C:\Users\USERPC~1\AppData\Local\Temp\Rar.297\Sta ta 15.0 x64\ado\site/_ggroup.ado"'
                      - if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `""`ffn'""'
                      local n 1
                      }
                      - if "`descend'"=="" {
                      = if ""=="" {
                      - local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
                      = local ffn `"C:\Users\USERPC~1\AppData\Local\Temp\Rar.297\Sta ta 15.0 x64\ado\site/_/_ggroup.ado"'
                      - capture confirm file `"`ffn'"'
                      = capture confirm file `"C:\Users\USERPC~1\AppData\Local\Temp\Rar.297\Sta ta 15.0 x64\ado\site/_/_ggroup.ado"'
                      - if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `"`ffn'"'
                      local n 1
                      }
                      - }
                      - }
                      - gettoken d path : path, parse(" ;")
                      - }
                      - while `"`d'"'!="" {
                      = while `";"'!="" {
                      - if `"`d'"' != ";" {
                      = if `";"' != ";" {
                      local d : sysdir `"`d'"'
                      local ffn `"`d'`fn'"'
                      capture confirm file `"`ffn'"'
                      if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `""`ffn'""'
                      local n 1
                      }
                      if "`descend'"=="" {
                      local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
                      capture confirm file `"`ffn'"'
                      if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `"`ffn'"'
                      local n 1
                      }
                      }
                      }
                      - gettoken d path : path, parse(" ;")
                      - }
                      - while `"`d'"'!="" {
                      = while `"."'!="" {
                      - if `"`d'"' != ";" {
                      = if `"."' != ";" {
                      - local d : sysdir `"`d'"'
                      = local d : sysdir `"."'
                      - local ffn `"`d'`fn'"'
                      = local ffn `"./_ggroup.ado"'
                      - capture confirm file `"`ffn'"'
                      = capture confirm file `"./_ggroup.ado"'
                      - if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `""`ffn'""'
                      local n 1
                      }
                      - if "`descend'"=="" {
                      = if ""=="" {
                      - local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
                      = local ffn `"./_/_ggroup.ado"'
                      - capture confirm file `"`ffn'"'
                      = capture confirm file `"./_/_ggroup.ado"'
                      - if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `"`ffn'"'
                      local n 1
                      }
                      - }
                      - }
                      - gettoken d path : path, parse(" ;")
                      - }
                      - while `"`d'"'!="" {
                      = while `";"'!="" {
                      - if `"`d'"' != ";" {
                      = if `";"' != ";" {
                      local d : sysdir `"`d'"'
                      local ffn `"`d'`fn'"'
                      capture confirm file `"`ffn'"'
                      if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `""`ffn'""'
                      local n 1
                      }
                      if "`descend'"=="" {
                      local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
                      capture confirm file `"`ffn'"'
                      if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `"`ffn'"'
                      local n 1
                      }
                      }
                      }
                      - gettoken d path : path, parse(" ;")
                      - }
                      - while `"`d'"'!="" {
                      = while `"PERSONAL"'!="" {
                      - if `"`d'"' != ";" {
                      = if `"PERSONAL"' != ";" {
                      - local d : sysdir `"`d'"'
                      = local d : sysdir `"PERSONAL"'
                      - local ffn `"`d'`fn'"'
                      = local ffn `"c:\ado\personal/_ggroup.ado"'
                      - capture confirm file `"`ffn'"'
                      = capture confirm file `"c:\ado\personal/_ggroup.ado"'
                      - if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `""`ffn'""'
                      local n 1
                      }
                      - if "`descend'"=="" {
                      = if ""=="" {
                      - local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
                      = local ffn `"c:\ado\personal/_/_ggroup.ado"'
                      - capture confirm file `"`ffn'"'
                      = capture confirm file `"c:\ado\personal/_/_ggroup.ado"'
                      - if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `"`ffn'"'
                      local n 1
                      }
                      - }
                      - }
                      - gettoken d path : path, parse(" ;")
                      - }
                      - while `"`d'"'!="" {
                      = while `";"'!="" {
                      - if `"`d'"' != ";" {
                      = if `";"' != ";" {
                      local d : sysdir `"`d'"'
                      local ffn `"`d'`fn'"'
                      capture confirm file `"`ffn'"'
                      if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `""`ffn'""'
                      local n 1
                      }
                      if "`descend'"=="" {
                      local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
                      capture confirm file `"`ffn'"'
                      if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `"`ffn'"'
                      local n 1
                      }
                      }
                      }
                      - gettoken d path : path, parse(" ;")
                      - }
                      - while `"`d'"'!="" {
                      = while `"PLUS"'!="" {
                      - if `"`d'"' != ";" {
                      = if `"PLUS"' != ";" {
                      - local d : sysdir `"`d'"'
                      = local d : sysdir `"PLUS"'
                      - local ffn `"`d'`fn'"'
                      = local ffn `"c:\ado\plus/_ggroup.ado"'
                      - capture confirm file `"`ffn'"'
                      = capture confirm file `"c:\ado\plus/_ggroup.ado"'
                      - if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `""`ffn'""'
                      local n 1
                      }
                      - if "`descend'"=="" {
                      = if ""=="" {
                      - local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
                      = local ffn `"c:\ado\plus/_/_ggroup.ado"'
                      - capture confirm file `"`ffn'"'
                      = capture confirm file `"c:\ado\plus/_/_ggroup.ado"'
                      - if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `"`ffn'"'
                      local n 1
                      }
                      - }
                      - }
                      - gettoken d path : path, parse(" ;")
                      - }
                      - while `"`d'"'!="" {
                      = while `";"'!="" {
                      - if `"`d'"' != ";" {
                      = if `";"' != ";" {
                      local d : sysdir `"`d'"'
                      local ffn `"`d'`fn'"'
                      capture confirm file `"`ffn'"'
                      if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `""`ffn'""'
                      local n 1
                      }
                      if "`descend'"=="" {
                      local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
                      capture confirm file `"`ffn'"'
                      if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `"`ffn'"'
                      local n 1
                      }
                      }
                      }
                      - gettoken d path : path, parse(" ;")
                      - }
                      - while `"`d'"'!="" {
                      = while `"OLDPLACE"'!="" {
                      - if `"`d'"' != ";" {
                      = if `"OLDPLACE"' != ";" {
                      - local d : sysdir `"`d'"'
                      = local d : sysdir `"OLDPLACE"'
                      - local ffn `"`d'`fn'"'
                      = local ffn `"c:\ado/_ggroup.ado"'
                      - capture confirm file `"`ffn'"'
                      = capture confirm file `"c:\ado/_ggroup.ado"'
                      - if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `""`ffn'""'
                      local n 1
                      }
                      - if "`descend'"=="" {
                      = if ""=="" {
                      - local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
                      = local ffn `"c:\ado/_/_ggroup.ado"'
                      - capture confirm file `"`ffn'"'
                      = capture confirm file `"c:\ado/_/_ggroup.ado"'
                      - if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `"`ffn'"'
                      local n 1
                      }
                      - }
                      - }
                      - gettoken d path : path, parse(" ;")
                      - }
                      - while `"`d'"'!="" {
                      = while `""'!="" {
                      if `"`d'"' != ";" {
                      local d : sysdir `"`d'"'
                      local ffn `"`d'`fn'"'
                      capture confirm file `"`ffn'"'
                      if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `""`ffn'""'
                      local n 1
                      }
                      if "`descend'"=="" {
                      local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
                      capture confirm file `"`ffn'"'
                      if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `"`ffn'"'
                      local n 1
                      }
                      }
                      }
                      gettoken d path : path, parse(" ;")
                      }
                      - }
                      - if "`all'"=="" | `n'==0 {
                      = if ""=="" | 0==0 {
                      - di as err `"file "`fn'" not found"'
                      = di as err `"file "_ggroup.ado" not found"'
                      - exit 601
                      }
                      --------------------------------------------------------------------------------------------- end findfile ---
                      - if (`"`r(fn)'"' == "") {
                      = if (`""' == "") {
                      - di as error "unknown egen function `fcn'()"
                      = di as error "unknown egen function group()"
                      unknown egen function group()
                      - exit 133
                      }
                      }
                      --------------------------------------------------------------------------------------------------- end egen ---
                      r(133);

                      . . set trace off/CODE]
                      varlist not allowed
                      r(101);

                      . egen id=group(sanction_id)
                      ------------------------------------------------------------------------------------------------- begin egen ---
                      - version 6, missing
                      - local cvers = _caller()
                      - gettoken type 0 : 0, parse(" =(")
                      - gettoken name 0 : 0, parse(" =(")
                      - if `"`name'"'=="=" {
                      = if `"="'=="=" {
                      - local name `"`type'"'
                      = local name `"id"'
                      - local type : set type
                      - }
                      - else {
                      gettoken eqsign 0 : 0, parse(" =(")
                      if `"`eqsign'"' != "=" {
                      error 198
                      }
                      }
                      - confirm new variable `name'
                      = confirm new variable id
                      - gettoken fcn 0 : 0, parse(" =(")
                      - gettoken args 0 : 0, parse(" ,") match(par)
                      - if "`c(adoarchive)'"=="1" {
                      = if ""=="1" {
                      capture qui _stfilearchive find _g`fcn'.ado
                      if _rc {
                      di as error "unknown egen function `fcn'()"
                      exit 133
                      }
                      }
                      - else {
                      - capture qui findfile _g`fcn'.ado
                      = capture qui findfile _ggroup.ado
                      ------------------------------------------------------------------------------------------- begin findfile ---
                      - version 8
                      - gettoken fn 0 : 0, parse(" ,")
                      - syntax [, ALL noDEScend PATH(string)]
                      - if `"`path'"'=="" {
                      = if `""'=="" {
                      - local path `"`c(adopath)'"'
                      = local path `"BASE;SITE;.;PERSONAL;PLUS;OLDPLACE"'
                      - }
                      - local n 0
                      - local subdir : adosubdir `"`fn'"'
                      = local subdir : adosubdir `"_ggroup.ado"'
                      - if `"`subdir'"' != "" {
                      = if `"_"' != "" {
                      - gettoken d path : path, parse(";")
                      - while `"`d'"'!="" {
                      = while `"BASE"'!="" {
                      - if `"`d'"' != ";" {
                      = if `"BASE"' != ";" {
                      - local d : sysdir `"`d'"'
                      = local d : sysdir `"BASE"'
                      - local ffn `"`d'`fn'"'
                      = local ffn `"C:\Users\USERPC~1\AppData\Local\Temp\Rar.297\Sta ta 15.0 x64\ado\base/_ggroup.ado"'
                      - capture confirm file `"`ffn'"'
                      = capture confirm file `"C:\Users\USERPC~1\AppData\Local\Temp\Rar.297\Sta ta 15.0 x64\ado\base/_ggroup.ado"'
                      - if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `""`ffn'""'
                      local n 1
                      }
                      - if "`descend'"=="" {
                      = if ""=="" {
                      - local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
                      = local ffn `"C:\Users\USERPC~1\AppData\Local\Temp\Rar.297\Sta ta 15.0 x64\ado\base/_/_ggroup.ado"'
                      - capture confirm file `"`ffn'"'
                      = capture confirm file `"C:\Users\USERPC~1\AppData\Local\Temp\Rar.297\Sta ta 15.0 x64\ado\base/_/_ggroup.ado"'
                      - if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `"`ffn'"'
                      local n 1
                      }
                      - }
                      - }
                      - gettoken d path : path, parse(" ;")
                      - }
                      - while `"`d'"'!="" {
                      = while `";"'!="" {
                      - if `"`d'"' != ";" {
                      = if `";"' != ";" {
                      local d : sysdir `"`d'"'
                      local ffn `"`d'`fn'"'
                      capture confirm file `"`ffn'"'
                      if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `""`ffn'""'
                      local n 1
                      }
                      if "`descend'"=="" {
                      local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
                      capture confirm file `"`ffn'"'
                      if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `"`ffn'"'
                      local n 1
                      }
                      }
                      }
                      - gettoken d path : path, parse(" ;")
                      - }
                      - while `"`d'"'!="" {
                      = while `"SITE"'!="" {
                      - if `"`d'"' != ";" {
                      = if `"SITE"' != ";" {
                      - local d : sysdir `"`d'"'
                      = local d : sysdir `"SITE"'
                      - local ffn `"`d'`fn'"'
                      = local ffn `"C:\Users\USERPC~1\AppData\Local\Temp\Rar.297\Sta ta 15.0 x64\ado\site/_ggroup.ado"'
                      - capture confirm file `"`ffn'"'
                      = capture confirm file `"C:\Users\USERPC~1\AppData\Local\Temp\Rar.297\Sta ta 15.0 x64\ado\site/_ggroup.ado"'
                      - if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `""`ffn'""'
                      local n 1
                      }
                      - if "`descend'"=="" {
                      = if ""=="" {
                      - local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
                      = local ffn `"C:\Users\USERPC~1\AppData\Local\Temp\Rar.297\Sta ta 15.0 x64\ado\site/_/_ggroup.ado"'
                      - capture confirm file `"`ffn'"'
                      = capture confirm file `"C:\Users\USERPC~1\AppData\Local\Temp\Rar.297\Sta ta 15.0 x64\ado\site/_/_ggroup.ado"'
                      - if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `"`ffn'"'
                      local n 1
                      }
                      - }
                      - }
                      - gettoken d path : path, parse(" ;")
                      - }
                      - while `"`d'"'!="" {
                      = while `";"'!="" {
                      - if `"`d'"' != ";" {
                      = if `";"' != ";" {
                      local d : sysdir `"`d'"'
                      local ffn `"`d'`fn'"'
                      capture confirm file `"`ffn'"'
                      if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `""`ffn'""'
                      local n 1
                      }
                      if "`descend'"=="" {
                      local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
                      capture confirm file `"`ffn'"'
                      if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `"`ffn'"'
                      local n 1
                      }
                      }
                      }
                      - gettoken d path : path, parse(" ;")
                      - }
                      - while `"`d'"'!="" {
                      = while `"."'!="" {
                      - if `"`d'"' != ";" {
                      = if `"."' != ";" {
                      - local d : sysdir `"`d'"'
                      = local d : sysdir `"."'
                      - local ffn `"`d'`fn'"'
                      = local ffn `"./_ggroup.ado"'
                      - capture confirm file `"`ffn'"'
                      = capture confirm file `"./_ggroup.ado"'
                      - if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `""`ffn'""'
                      local n 1
                      }
                      - if "`descend'"=="" {
                      = if ""=="" {
                      - local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
                      = local ffn `"./_/_ggroup.ado"'
                      - capture confirm file `"`ffn'"'
                      = capture confirm file `"./_/_ggroup.ado"'
                      - if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `"`ffn'"'
                      local n 1
                      }
                      - }
                      - }
                      - gettoken d path : path, parse(" ;")
                      - }
                      - while `"`d'"'!="" {
                      = while `";"'!="" {
                      - if `"`d'"' != ";" {
                      = if `";"' != ";" {
                      local d : sysdir `"`d'"'
                      local ffn `"`d'`fn'"'
                      capture confirm file `"`ffn'"'
                      if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `""`ffn'""'
                      local n 1
                      }
                      if "`descend'"=="" {
                      local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
                      capture confirm file `"`ffn'"'
                      if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `"`ffn'"'
                      local n 1
                      }
                      }
                      }
                      - gettoken d path : path, parse(" ;")
                      - }
                      - while `"`d'"'!="" {
                      = while `"PERSONAL"'!="" {
                      - if `"`d'"' != ";" {
                      = if `"PERSONAL"' != ";" {
                      - local d : sysdir `"`d'"'
                      = local d : sysdir `"PERSONAL"'
                      - local ffn `"`d'`fn'"'
                      = local ffn `"c:\ado\personal/_ggroup.ado"'
                      - capture confirm file `"`ffn'"'
                      = capture confirm file `"c:\ado\personal/_ggroup.ado"'
                      - if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `""`ffn'""'
                      local n 1
                      }
                      - if "`descend'"=="" {
                      = if ""=="" {
                      - local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
                      = local ffn `"c:\ado\personal/_/_ggroup.ado"'
                      - capture confirm file `"`ffn'"'
                      = capture confirm file `"c:\ado\personal/_/_ggroup.ado"'
                      - if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `"`ffn'"'
                      local n 1
                      }
                      - }
                      - }
                      - gettoken d path : path, parse(" ;")
                      - }
                      - while `"`d'"'!="" {
                      = while `";"'!="" {
                      - if `"`d'"' != ";" {
                      = if `";"' != ";" {
                      local d : sysdir `"`d'"'
                      local ffn `"`d'`fn'"'
                      capture confirm file `"`ffn'"'
                      if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `""`ffn'""'
                      local n 1
                      }
                      if "`descend'"=="" {
                      local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
                      capture confirm file `"`ffn'"'
                      if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `"`ffn'"'
                      local n 1
                      }
                      }
                      }
                      - gettoken d path : path, parse(" ;")
                      - }
                      - while `"`d'"'!="" {
                      = while `"PLUS"'!="" {
                      - if `"`d'"' != ";" {
                      = if `"PLUS"' != ";" {
                      - local d : sysdir `"`d'"'
                      = local d : sysdir `"PLUS"'
                      - local ffn `"`d'`fn'"'
                      = local ffn `"c:\ado\plus/_ggroup.ado"'
                      - capture confirm file `"`ffn'"'
                      = capture confirm file `"c:\ado\plus/_ggroup.ado"'
                      - if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `""`ffn'""'
                      local n 1
                      }
                      - if "`descend'"=="" {
                      = if ""=="" {
                      - local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
                      = local ffn `"c:\ado\plus/_/_ggroup.ado"'
                      - capture confirm file `"`ffn'"'
                      = capture confirm file `"c:\ado\plus/_/_ggroup.ado"'
                      - if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `"`ffn'"'
                      local n 1
                      }
                      - }
                      - }
                      - gettoken d path : path, parse(" ;")
                      - }
                      - while `"`d'"'!="" {
                      = while `";"'!="" {
                      - if `"`d'"' != ";" {
                      = if `";"' != ";" {
                      local d : sysdir `"`d'"'
                      local ffn `"`d'`fn'"'
                      capture confirm file `"`ffn'"'
                      if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `""`ffn'""'
                      local n 1
                      }
                      if "`descend'"=="" {
                      local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
                      capture confirm file `"`ffn'"'
                      if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `"`ffn'"'
                      local n 1
                      }
                      }
                      }
                      - gettoken d path : path, parse(" ;")
                      - }
                      - while `"`d'"'!="" {
                      = while `"OLDPLACE"'!="" {
                      - if `"`d'"' != ";" {
                      = if `"OLDPLACE"' != ";" {
                      - local d : sysdir `"`d'"'
                      = local d : sysdir `"OLDPLACE"'
                      - local ffn `"`d'`fn'"'
                      = local ffn `"c:\ado/_ggroup.ado"'
                      - capture confirm file `"`ffn'"'
                      = capture confirm file `"c:\ado/_ggroup.ado"'
                      - if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `""`ffn'""'
                      local n 1
                      }
                      - if "`descend'"=="" {
                      = if ""=="" {
                      - local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
                      = local ffn `"c:\ado/_/_ggroup.ado"'
                      - capture confirm file `"`ffn'"'
                      = capture confirm file `"c:\ado/_/_ggroup.ado"'
                      - if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `"`ffn'"'
                      local n 1
                      }
                      - }
                      - }
                      - gettoken d path : path, parse(" ;")
                      - }
                      - while `"`d'"'!="" {
                      = while `""'!="" {
                      if `"`d'"' != ";" {
                      local d : sysdir `"`d'"'
                      local ffn `"`d'`fn'"'
                      capture confirm file `"`ffn'"'
                      if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `""`ffn'""'
                      local n 1
                      }
                      if "`descend'"=="" {
                      local ffn `"`d'`subdir'`c(dirsep)'`fn'"'
                      capture confirm file `"`ffn'"'
                      if _rc==0 {
                      di as txt `"`ffn'"'
                      if "`all'"=="" {
                      ret local fn `"`ffn'"'
                      exit
                      }
                      if `n' {
                      ret local fn `"`return(fn)' "`ffn'""'
                      }
                      else ret local fn `"`ffn'"'
                      local n 1
                      }
                      }
                      }
                      gettoken d path : path, parse(" ;")
                      }
                      - }
                      - if "`all'"=="" | `n'==0 {
                      = if ""=="" | 0==0 {
                      - di as err `"file "`fn'" not found"'
                      = di as err `"file "_ggroup.ado" not found"'
                      - exit 601
                      }
                      --------------------------------------------------------------------------------------------- end findfile ---
                      - if (`"`r(fn)'"' == "") {
                      = if (`""' == "") {
                      - di as error "unknown egen function `fcn'()"
                      = di as error "unknown egen function group()"
                      unknown egen function group()
                      - exit 133
                      }
                      }
                      --------------------------------------------------------------------------------------------------- end egen ---
                      r(133);
                      . set trace off
                      Thank you very much in advance for your help!
                      Best regards

                      Comment


                      • #12
                        Your Stata files are supposedly in

                        C:\Users\USERPC~1\AppData\Local\Temp\Rar.297\Sta ta 15.0 x64

                        That's just a non-standard installation, to put it politely. Stata does not install in such a place.

                        I don't know why people expect that a report of the same problem won't get the same answer. Please see again #6 and #7. Or I will repeat the main point here:

                        Let me phrase this positively: if you or your institution have purchased your copy of Stata, you can contact StataCorp technical support [...]. Stata itself doesn't come as files to be decompressed using rar.
                        Or -- to put it more plainly -- if you have a cracked or pirated or "borrowed" copy of Stata, it appears mangled beyond repair. No remedy from us, except installing Stata properly.

                        Comment

                        Working...
                        X