Important: Read this before posting to this forum

  1. This forum is for questions related to the use of Apollo. We will answer some general choice modelling questions too, where appropriate, and time permitting. We cannot answer questions about how to estimate choice models with other software packages.
  2. There is a very detailed manual for Apollo available at http://www.ApolloChoiceModelling.com/manual.html. This contains detailed descriptions of the various Apollo functions, and numerous examples are available at http://www.ApolloChoiceModelling.com/examples.html. In addition, help files are available for all functions, using e.g. ?apollo_mnl
  3. Before asking a question on the forum, users are kindly requested to follow these steps:
    1. Check that the same issue has not already been addressed in the forum - there is a search tool.
    2. Ensure that the correct syntax has been used. For any function, detailed instructions are available directly in Apollo, e.g. by using ?apollo_mnl for apollo_mnl
    3. Check the frequently asked questions section on the Apollo website, which discusses some common issues/failures. Please see http://www.apollochoicemodelling.com/faq.html
    4. Make sure that R is using the latest official release of Apollo.
  4. If the above steps do not resolve the issue, then users should follow these steps when posting a question:
    1. provide full details on the issue, including the entire code and output, including any error messages
    2. posts will not immediately appear on the forum, but will be checked by a moderator first. This may take a day or two at busy times. There is no need to submit the post multiple times.

CNL unlabeled design

Ask questions about model specifications. Ideally include a mathematical explanation of your proposed model.
Post Reply
LuisPilli
Posts: 3
Joined: 03 Feb 2022, 16:53

CNL unlabeled design

Post by LuisPilli »

Hi,

I have a SP data set from an unlabeled design and I want to specify a CNL model.

The attribute supporting nests is brand, which can be unavailable or appear more than once in any given task. Thus, any nest can also be unavailable.

I do not see any straight way to specify this model from the manual and examples. Is there any previous experience that can orient me in this specification?

Regards,
Luis
stephanehess
Site Admin
Posts: 998
Joined: 24 Apr 2020, 16:29

Re: CNL unlabeled design

Post by stephanehess »

Hi

can you be a bit more specific, maybe by giving us an overview of your proposed CNL structure? How many alternatives do you have, how many nests will there be, etc

Stephane
--------------------------------
Stephane Hess
www.stephanehess.me.uk
LuisPilli
Posts: 3
Joined: 03 Feb 2022, 16:53

Re: CNL unlabeled design

Post by LuisPilli »

Hi Stephane,

Thanks for your prompt reply.

I have 6 brands (A-F) as an attribute in an unlabelled design, i.e., one brand can be absent or it can appear more than once in any task. Choice tasks have 6 alternatives.

The simplest structure that I would like to test would have four nests, which would be AB (low-tier), CD (mid-tier), EF (high-tier), A-F. My objective is to estimate the probabilities of different consideration sets, allowing one of the consideration sets to include every brand. It means that every brand maps into 2 nests (low, mid, or high AND A-F).

Is this explanation better?

cheers
Luis
dpalma
Posts: 190
Joined: 24 Apr 2020, 17:54

Re: CNL unlabeled design

Post by dpalma »

Hi Luis,

I am afraid that there is no straightforward way to code your model in Apollo. What you are proposing is that the nesting structure changes from one observation to the next. For example, in the first observation alternatives 1, 2, 3, 4, 5, and 6 might be branded A, B, C, D, E, and F, respectively, so the nesting would be low={1, 2}, mid={3, 4}, and high={5, 6}. But then in the second observations alternatives 1, 2, 3, 4, 5, and 6 might be branded A, A, B, B, F, F, so the nesting would be low={1, 2, 3, 4}, mid={empty}, high={5, 6}. You cannot do that in Apollo, as the nesting is assumed to remain the same across observations.

The way I see it, you have two possible ways to model this.
  • The first approach would be using a Mixed logit with error components. So you create three error components, one for each "nest". Then, in the utility of all alternatives you multiply these error components by dummy variables, where only one of the dummy variables takes value 1 at a time, depending on the nest the alternative belong to. So the utilities would look something like the following:

    Code: Select all

    V[["alt1"]] = ... + (brand_1 %in% c("A","B"))*EC_low + (brand_1 %in% c("C","D"))*EC_mid + (brand_1 %in% c("E","F"))*EC_high
    Where EC_low, EC_mid, and EC_high are the error components associated to each "nest", so they would be draws.
  • The second approach is more complicated, but would allow you using CNL. It would require you to reshape your data thoroughly. Let's imagine each brand can be repeated up to two times in each choice set. Then you can create a database where each choice has 12 labelled alternatives, but only six are available at a time. The alternatives would be A1, A2, B1, B2, C1, C2, D1, D2, E1, E2, F1, F2. If in your original data observation 1 has alternatives branded A, B, C, D, E, and F, then in your reshaped data observation 1 would have alternatives A1, B1, C1, D1, E1, and F1 available, and all other alternatives not available. If the second observation in your original data has alternatives branded A, A, B, B, F, F, then in your reshaped data you would have alternatives A1, A2, B1, B2, F1, and F2 available, and all others not available. This would allow you to nest alternatives as follows: low={A1, A2, B1, B2}, mid={C1, C2, D1, D2}, high={E1, E2, F1, F2}.
Both of these approaches can be easily expanded to account for your overlapping of nests (i.e. where alternative A could belong to either low or mid).

Best wishes
David
LuisPilli
Posts: 3
Joined: 03 Feb 2022, 16:53

Re: CNL unlabeled design

Post by LuisPilli »

Thanks, David!

This was very useful, indeed.
The solution through the mixed logit is quite interesting. But I think that the CNL would allow more straightforward tests of my ideas.

cheers
Luis
Post Reply