Announcement

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

  • produce AIC and BIC statistics using abic command

    Hi all
    I am using STATA 14 and i get the following after running a command quietly poisson los male age75 emergency, nolog: unrecognized command: abic. I would like to get AIC and BIC statistics in order to compare models
    Can someone help with this problem
    Regards
    Misheck

  • #2
    abic appears to be a user-written command by Joseph M. Hilbe. You don't say how you heard about it, but that source should document where it comes from. You certainly need to install it before you can use it. See also http://www.statalist.org/forums/help#stata for advice on referring to user-written commands.

    Comment


    • #3
      if all you want is AIC/BIC, then type "estat ic" after estimating your model; no need for user-written commands; in general, help files are your friend;

      Comment


      • #4
        I think Nick and Rich have already answered your question. But I'll also add that I don't think you have shown us exactly what you typed. If you only typed in the poisson command and got the abic warning, that would be weird and might indicate an installation problem. My guess is that there is another line, not shown, where you gave the abic command. For future reference, please copy and paste exactly what you typed and how Stata responded.
        Last edited by Richard Williams; 30 Oct 2015, 08:05.
        -------------------------------------------
        Richard Williams, Notre Dame Dept of Sociology
        StataNow Version: 19.5 MP (2 processor)

        EMAIL: [email protected]
        WWW: https://www3.nd.edu/~rwilliam

        Comment


        • #5
          And please put code and results between CODE delimiters, as explained in FAQ #12.
          Steve Samuels
          Statistical Consulting
          [email protected]

          Stata 14.2

          Comment


          • #6
            I apply a seemingly unrelated biprobit model for my analysis by using the svyset command but I could not get the AIC and BIC value. I tried the estat ic command but it's not working.

            Comment


            • #7
              Originally posted by Strong Marbaniang View Post
              I apply a seemingly unrelated biprobit model for my analysis by using the svyset command but I could not get the AIC and BIC value. I tried the estat ic command but it's not working.
              In complex survey designs, everyone no longer has an equal probability of being sampled. This means that AIC and BIC no longer apply. Hat tip to our Maarten Buis, who answered a similar question back in 2010. If interested, one of Stata’s statisticians explained here why you don’t really have maximum likelihood estimates of the parameters under complex surveys.

              this is a bit pedantic, but presumably you mean that you used the svy prefix, not the svyset command. The latter declares the survey information to Stata. Without the svy prefix, Stata would ignore the survey information.
              Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

              When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

              Comment


              • #8
                Code:
                I mean to say svy prefix. This is the code of seemingly unrelated biprobit model with variable drink_alcohol as an endogenous variable in the second equation.
                svy, subpop( sex_female ): biprobit ( drink_alcohol= i.new_age i.religion i.mart_stus i.education i.residence i.hv270 i.smoke i.milk i.pulse i.fruit ) (Diabetes=i.drink_alcohol i. new_age i.residence i.hv270 i.BMI_Classification i.smoke i.vegetable i.egg i.chicken i.aerated) , nolog

                Code:
                This is the error it shows when I try to get the AIC, BIC value
                . estat ic
                invalid subcommand ic
                r(321);

                Comment


                • #9

                  This is the code of seemingly unrelated biprobit model with variable drink_alcohol as an endogenous variable in the second equation.
                  Code:
                  svy, subpop( sex_female ): biprobit ( drink_alcohol= i.new_age i.religion i.mart_stus i.education i.residence i.hv270 i.smoke i.milk i.pulse i.fruit ) (Diabetes=i.drink_alcohol i. new_age i.residence i.hv270 i.BMI_Classification i.smoke i.vegetable i.egg i.chicken i.aerated) , nolog
                  This is the command i used to get the AIC, BIC value
                  Code:
                  estat ic
                  Error: invalid subcommand ic

                  Comment


                  • #10
                    Originally posted by Strong Marbaniang View Post
                    This is the code of seemingly unrelated biprobit model with variable drink_alcohol as an endogenous variable in the second equation.
                    Code:
                    svy, subpop( sex_female ): biprobit ( drink_alcohol= i.new_age i.religion i.mart_stus i.education i.residence i.hv270 i.smoke i.milk i.pulse i.fruit ) (Diabetes=i.drink_alcohol i. new_age i.residence i.hv270 i.BMI_Classification i.smoke i.vegetable i.egg i.chicken i.aerated) , nolog
                    This is the command i used to get the AIC, BIC value
                    Code:
                    estat ic
                    Error: invalid subcommand ic
                    Perhaps I wasn’t clear. AIC and BIC are not defined in survey estimation. These quantities don’t exist. What are you trying to accomplish?
                    Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

                    When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

                    Comment

                    Working...
                    X