Announcement

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

  • apc command is unrecognized in Stata 16

    Dear all,

    I would like to use the user-written command apc by Cormac O'Dea: https://www.google.com/url?sa=t&rct=...qlIbOCXS_UZ35g

    When I type
    Code:
     ssc install apc
    Stata writes "all files already exist and are up to date".

    However, when I want to execute the command
    Code:
     apc yvar, age(agevar) period(yearvar) cohort(cohortvar)
    Stata writes the error message "command apc is unrecognized".

    I am working with Stata 16 - could anyone help me?

    In case the command does not work (anymore) with Stata 16, could you kindly let me know alternative ways to estimate APC-models in Stata? I do not think that apcfit is suitable to my data - I have a large individual-level dataset and my outcome variable is consumption expenditure.

    Thanks a lot!
    Steph

  • #2
    What happens if you change -apc- to -apcspline- in your command?

    Code:
     
     apcspline yvar, age(agevar) period(yearvar) cohort(cohortvar)
    --
    Bruce Weaver
    Email: [email protected]
    Version: Stata/MP 18.5 (Windows)

    Comment


    • #3
      Code:
      ssc desc apc
      points to:

      Code:
      INSTALLATION FILES                                  (type net install apc)
            apc_cglim.ado
            apc_cglim.hlp
            apc_ie.ado
            apc_ie.hlp
      The Cormac O'Dea files need to be manually installed from the zip file located at: https://www.ifs.org.uk/publications/5998

      Comment


      • #4
        Dear Bruce and Scott,

        Thank you very much for your super-quick answers.

        @Scott: I can use the command now! (Do you by any chance know if I can add control variables to the command? For example education?)

        @Bruce: Using "apcspline" resulted in an error - I do not think that the command is suitable to my data, the authors write that it is for the "fitting of smooth age–period–cohort models to event data".

        Best,
        Stephanie

        Comment


        • #5
          Sorry, I have never used these commands.

          Comment


          • #6
            I've never used them either. I suggested trying -apcspline- in place of -apc- because after I followed the instructions to install -apc-, typing -help apc- brought up a window showing the following:

            Code:
            help for apc not found
            -----------------------------------------------------------------------------------------
            search for apc                                                      (manual:  [R] search)
            -----------------------------------------------------------------------------------------
            
            Search of official help files, FAQs, Examples, and Stata Journals
            
            Search of web resources from Stata and other users
            
            (contacting http://www.stata.com)
            
            22 packages found (Stata Journal and STB listed first)
            ------------------------------------------------------
            etc.

            I had to type -help apcspline- to bring up the help file for the package I installed.

            Code:
            help apcspline                                                         (SJ17-4: st0245_1)
            -----------------------------------------------------------------------------------------
            
            Title
            
                apcspline -- Age-period-cohort modeling
            
            
            Syntax
            
                    apcspline depvar agevar periodvar [if] [in] [weight] [, options]
            
                options               Description
            etc.

            Good luck. I hope you figure it out.
            --
            Bruce Weaver
            Email: [email protected]
            Version: Stata/MP 18.5 (Windows)

            Comment

            Working...
            X