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
#VariableTypeLen
1HouseIDNum8
2SetNum8
3ChoiceNum8
4BrandChar8
5LogPriceNum8
6LogIncNum8
7FamSizeNum8

The First Six Observations Out of 20,430

ObsHouseIDSetChoiceBrandLogPriceLogIncFamSize
1210001611PPk-0.415523.481242
2210001610PBB-0.400483.481242
3210001610PFl0.086183.481242
4210001610PHse-0.562123.481242
5210001610PGen-1.021653.481242
6210001610PSS-0.162523.481242