Single profile binary DCE - latent class analysis

This forum is for posts covering broader stated choice experimental design issues.

Moderators: Andrew Collins, Michiel Bliemer, johnr

Single profile binary DCE - latent class analysis

Postby sab » Sat Jan 18, 2025 12:59 am

Hi,

I have run a DCE with 12 single profile choice tasks per ppt - they answer Yes or No to each choice task. As a result I am using standard logistic regression to model my data - there's a single row for each participant and choice task, and each row contains the DCE attributes (4 effects coded and 1 continuous) and a choice variable (0 = No, 1 = Yes). In other words, there is no row for the No option.

I am using a mixed effects logistic regression to model the utility of the decision to say Yes and include random intercepts and slopes for ppt_id. Ideally I want to also explore preference heterogeneity using latent class analysis. My problem is I can't work out how to do this in Stata because my data is not in the right layout to use the lclogit command (requires multiple alternatives (i.e. rows) per choice task). I have tried using the gsem method instead (e.g. gsem(choice <- choice var1 var2), logit lclass(C2)) which works but there doesn't seem to be an option to account for panel data.

My question is, is it possible to run a latent class analysis for this type of binary data while also accounting for multiple observations per participant - and if so, is it possible in Stata and/or any other software?

Thanks very much in advance.
sab
 
Posts: 20
Joined: Fri Dec 15, 2023 3:55 am

Re: Single profile binary DCE - latent class analysis

Postby Michiel Bliemer » Sun Jan 19, 2025 9:13 am

As far as I know, you can transform data in Stata from wide to long format and vice versa using the "reshape" command, please refer to the Stata manual. It sounds like you have data in wide format, but Stata expects it in long format. In your case, your second alternative is an opt-out alternative and has a constant, so there is still a second alternative. I am not sure how to indicate an opt-out alternative in Stata. In Nlogit, which also uses long format, you add a second row whereby the first column always has a 1 (for the constant) and zeros in all other columns. Maybe something similar in Stata, I do not know.

Instead of using Stata, you could use Apollo or Biogeme to estimate mixed logit and latent class models. They require the data to be in wide format (as you have) and offer more flexibility in model estimation, so that would be my recommendation.

Michiel
Michiel Bliemer
 
Posts: 1918
Joined: Tue Mar 31, 2009 4:13 pm

Re: Single profile binary DCE - latent class analysis

Postby sab » Sat Feb 01, 2025 2:53 am

Hi Michiel,

Sorry for my delayed reply. Changing to that layout solved this issue, thanks very much for your advice!
sab
 
Posts: 20
Joined: Fri Dec 15, 2023 3:55 am


Return to Choice experiments - general

Who is online

Users browsing this forum: No registered users and 7 guests

cron