Programming the statistical procedures from SAS

How to model heterogeneity using PROC MCMC

Reply
Frequent Contributor
Posts: 84

How to model heterogeneity using PROC MCMC

[ Edited ]

In the following dataset, purchase is a binary variable that shows if a consumer has purchased an item, price and income respectively show the price of the item and the income of the consumer. 

 

data tmp;
   input price income purchase @@;
   ind = _N_;
   datalines;
10  39  0     	23  62  0   	23  81  0     	26  51  0  
17  39  0    	 5   6  0   	53  74  0    	55  72  0  
32  51  0    	46  79  0   	10  13  0     	 8  16  1  
10  30  1    	 8  28  1   	23  45  1     	0    4  1  
 3  12  1    	22  41  1   	15  30  1    	32  51  1  
 3   7  1  
;

I know that price of an item affects the purchase decision. However, this effect is not the same for all of the consumers because consumers have different sensitivities to price. In other words, the coefficient of price for each individual is different and is affected by income and other unobserved factors. 

 

I know PROC MCMC and bayesian methods should be used to model this, but I am not able to figure it out, Can you help me with that? 

The following links provide real good examples

http://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_mcmc_sect056...

http://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_mcmc_sect054...

Ask a Question
Discussion stats
  • 0 replies
  • 152 views
  • 0 likes
  • 1 in conversation