Sashelp Data Sets


Margarine Data

The Sashelp.Margarin data set is a scanner panel data set that lists purchases of margarine (Rossi, Allenby, and McCulloch 2005). There are 313 households and a total of 3,405 purchases. The variable HouseID represents the household ID; each household made at least five purchases, which are defined by the choice set variable Set. The variable Choice represents the choice that households made among the six margarine brands for each purchase or choice set. The variable Brand has the value PPK for Parkay stick, PBB for Blue Bonnet stick, PFL for Fleischmann’s stick, PHse for the house brand stick, PGen for the generic stick, and PSS for Shedd’s Spread tub. The variable LogPrice is the logarithm of the product price. The variables LogInc and FamSize provide information about household income and family size, respectively. The following steps display information about the Sashelp.Margarin data set and create Figure B.16:

title 'Margarine Data';
proc contents data=sashelp.Margarin varnum;
   ods select position;
run;

title 'The First Six Observations Out of 20,430';
proc print data=sashelp.Margarin(obs=6);
run;

Figure B.16: Margarine Data

Margarine Data

Variables in Creation Order
# Variable Type Len
1 HouseID Num 8
2 Set Num 8
3 Choice Num 8
4 Brand Char 8
5 LogPrice Num 8
6 LogInc Num 8
7 FamSize Num 8

The First Six Observations Out of 20,430

Obs HouseID Set Choice Brand LogPrice LogInc FamSize
1 2100016 1 1 PPk -0.41552 3.48124 2
2 2100016 1 0 PBB -0.40048 3.48124 2
3 2100016 1 0 PFl 0.08618 3.48124 2
4 2100016 1 0 PHse -0.56212 3.48124 2
5 2100016 1 0 PGen -1.02165 3.48124 2
6 2100016 1 0 PSS -0.16252 3.48124 2