The BCHOICE Procedure

Example 27.4 A Random-Effects-Only Logit Model

(View the complete code for this example.)

This example revisits the trash can study that is described earlier in this chapter in the getting-started section A Logit Model Example with Random Effects.

If you want to create a random-effects-only model using the random walk Metropolis sampling as suggested in Rossi, Allenby, and McCulloch (2005), you can add the ALG=RWM option to the PROC BCHOICE statement to use the random walk Metropolis sampling algorithm instead of the default Gamerman Metropolis sampling, add the REMEAN option to the RANDOM statement to request estimation of the nonzero mean of the random effects, and not specify any fixed effects in the MODEL statement as follows:

proc bchoice data=Trashcan outpost=Postsamp seed=123 nmc=50000 thin=2
             alg=rwm nthreads=4;
   class ID Task;
   model Choice = / choiceset=(ID Task);
   random Touchless Steel AutoBag Price80 / sub=ID remean
          monitor=(1 to 5) type=un;
run;

Summary statistics for the mean of the random coefficients (), the covariance of the random coefficients (), and the random coefficients () for the first five individuals are shown in Output 27.4.1.

Output 27.4.1: Posterior Summary Statistics

The BCHOICE Procedure

Posterior Summaries and Intervals
ParameterSubjectNMeanStandard
Deviation
95% HPD Interval
REMean Touchless 250001.72810.27111.19832.2651
REMean Steel 250001.06630.26610.55771.5998
REMean AutoBag 250002.20140.35201.53942.9100
REMean Price80 25000-4.70180.6545-6.0553-3.4883
RECov Touchless, Touchless 250003.11781.14621.35525.3414
RECov Steel, Touchless 25000-0.45170.9922-2.19991.2156
RECov Steel, Steel 250002.68091.03421.03354.6468
RECov AutoBag, Touchless 25000-0.72330.9521-2.60631.0850
RECov AutoBag, Steel 250000.03010.8003-1.42711.5548
RECov AutoBag, AutoBag 250003.68041.55971.12366.7726
RECov Price80, Touchless 25000-1.30321.2372-3.83050.8279
RECov Price80, Steel 25000-1.65331.2926-4.45950.5892
RECov Price80, AutoBag 25000-2.32931.7191-5.73260.6730
RECov Price80, Price80 250007.89693.33062.110114.3416
TouchlessID 1250002.22231.06130.12954.2930
SteelID 1250000.74331.0823-1.30532.9046
AutoBagID 1250003.79701.44061.15356.7240
Price80ID 125000-5.24652.3491-10.0027-0.9522
TouchlessID 225000-0.06120.8563-1.67261.6508
SteelID 225000-0.39620.8279-2.10141.1849
AutoBagID 2250002.70671.33530.11495.3223
Price80ID 2250000.02711.3024-2.51732.6137
TouchlessID 3250001.10290.9627-0.71063.1099
SteelID 3250001.66020.9599-0.15853.5981
AutoBagID 3250000.29611.1676-2.00282.5169
Price80ID 325000-0.95681.5615-4.09402.0521
TouchlessID 4250001.15560.9722-0.78353.0279
SteelID 4250001.39221.0206-0.59893.4310
AutoBagID 4250003.21431.46200.49886.1835
Price80ID 425000-6.64902.5043-11.7925-2.0763
TouchlessID 5250000.48041.1831-1.78392.8515
SteelID 5250002.71191.24320.44365.2051
AutoBagID 5250003.47361.62390.56796.8042
Price80ID 525000-5.11562.5674-10.0957-0.0400


The average part-worths () for touchless opening, steel material, automatic trash bag replacement, and price, which are shown as "REMean Touchless," "REMean Steel," "REMean AutoBag," and "REMean Price80," are very similar to the estimates of the fixed effects in the previous model as shown in Figure 27.9, indicating the equivalence of these two setups. The covariance estimates of the random coefficients () are also very similar.

The next set of parameters show the estimates for the random effects for the first five respondents (see Output 27.4.1). However, these estimates are no longer the deviation from the overall means but are their own effects. The part-worth for touchless opening for the first respondent (ID 1) is 2.2, which is close to the part-worth that is estimated in the model as shown in Figure 27.9.

A caterpillar plot is a side-by-side bar plot of the 95% intervals for multiple variables. A caterpillar plot is usually used to visualize and compare random-effects parameters, which can exist in large numbers in certain models. You can use the %CATER autocall macro to create a caterpillar plot. The %CATER macro requires you to specify an input data set and a list of variables that you want to plot.

In this example, the output data set Postsamp contains posterior draws for all the random-effects parameters. The following statements generate a caterpillar plot for Touchless:

%CATER(data=Postsamp, var=Touchless_ID_:)

Output 27.4.2 is a caterpillar plot of the random effects of touchless opening for the 104 participants in this study. It displays the heterogeneity in preferences for touchless opening among the sample. As shown, the individuals have diverse preferences for the feature of touchless opening for a trash can. Heterogeneity of preferences is an important aspect of the model, and ignoring its presence can lead to incorrect inferences.

Output 27.4.2: Caterpillar Plot of the Random-Effects Parameters

Caterpillar Plot of the Random-Effects Parameters