Announcement

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

  • random coefficient logit models / BLP estimation

    Hi all,
    I am using blp command in Stata 12. This command is used for random coefficient discrete choice models when we use logit functions. Using this command gives me the error with sth that doesn't exist in variables. The error is as follow:
    share variable must be within the interval 0,1
    r(498);
    Anyone knows what is the "share variable"? How can I solve the problem?

    Many thanks,
    Ebad

  • #2
    According to `help blp' :

    Syntax

    blp sharevar [varlist] [if] [in], endog(endogvars=inst) stochastic(svar1=dvars1,svar2=dvars2,..)
    markets(marketvar) [draws(#) demofile(demodata) tolin(#) tolout(#) initsd(init_vals)
    initdemo(init_vals) elast(price_var,mkt_num,prod_var) robust twostep noisily nocons]

    The "share variable" is the dependent variable, which typically represents the market share of some product. Based on the error message, it looks like you're passing in a value of sharevar that is outside the valid range of [0,1]. All market shares are restricted to this interval.

    HTH,

    Brett

    Comment


    • #3
      I am running the same model but i am getting the following error message

      unrecognized command: markets

      What could i be doing wrong?

      Comment


      • #4
        Code:
        blp sharevar [varlist] [if] [in], endog(endogvars=inst) stochastic(svar1=dvars1,svar2=dvars2,..)
        markets(marketvar) [draws(#) demofile(demodata) tolin(#) tolout(#) initsd(init_vals)
        initdemo(init_vals) elast(price_var,mkt_num,prod_var) robust twostep noisily nocons]
        is one command line, not two or three. Don't start a new line with markets.

        Comment


        • #5
          Thank you, its now saying

          file demodata.dta not found

          How do i fix that?

          Comment


          • #6
            I don't know anything about this command except what I see in this thread. Evidently you need a Stata dataset demodata.dta for this example to work.

            Comment


            • #7
              If you type

              Code:
              net describe blp, from(http://fmwww.bc.edu/RePEc/bocode/b)
              net get blp
              you will get the auxilliary files like demodata.dta

              Comment


              • #8
                Thank you, now where do i get the instruments i am getting an error saying

                instrument x12 not found

                Comment


                • #9
                  In the helpfile for blp (which you can access with -help blp-), take a look at Example 2:

                  Code:
                  . use blp_demo,clear
                  ...
                  . gen x12=x1^2
                  Presumably, that is where it comes from.

                  Comment


                  • #10
                    How do i access the help file?

                    Comment


                    • #11
                      See above:

                      Originally posted by Dimitriy V. Masterov View Post
                      In the helpfile for blp (which you can access with -help blp-), take a look at Example 2:

                      Code:
                      . use blp_demo,clear
                      ...
                      . gen x12=x1^2
                      Presumably, that is where it comes from.

                      Comment

                      Working...
                      X