Announcement

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

  • How data structure looks like for conditional logit model (McFadden’s choice)? and clogit vs asclogit?

    Dear all,

    I plan to use conditional logit regression (McFadden’s choice) for my location choice analysis. I am confused about how data structure should look like for the regression. I want to investigate firms' location choice for their R&D investments. Let me simplify my current data structure. Assuming that there are 2 firms in data and they choose one or two places among 3 alternatives (locations), I preliminary build data like the followings.

    firm_id alternatives choice attributes year
    1 a 1 a1 2000
    1 b 0 b1 2000
    1 c 0 c1 2000
    2 a 1 a1 2000
    2 b 1 b1 2000
    2 c 0 c1 2000
    2 a 1 a2 2001
    2 b 0 b2 2001
    2 c 1 c2 2001


    "firm_id" identifies two firms. "alternatives" are three options of locations. "choice" is an actual choice. "attributes" stands for a time-variant characteristic of each location (actually numeric numbers in the data). "Year" means the investment year. Unlike firm 1, firm 2 did multiple choices a year and have invested over 2 years. As you see, I just appended the firm 2's 2001 record right below the 2000 one.

    When I typed "asclogit choice attributes, case(firm_id) alt(alternatives)", my Stata (13) shows the error message that "variable alternatives has replicate levels for one or more cases; this is not allowed".


    Instead, "clogit choice attributes, group(firm_id)" is working but I am not sure that this gave me appropriate results. Would you let me know whether my data structure is correct or not? And "clogit" is proper so I don't need to use "asclogit"?

    Thank you in advance.
Working...
X