tuna                 package:bayesm                 R Documentation

_D_a_t_a _o_n _C_a_n_n_e_d _T_u_n_a _S_a_l_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Volume of canned tuna sales as well as a measure of display
     activity, log price and log wholesale price.   Weekly data
     aggregated to the chain level.  This data is extracted from the
     Dominick's Finer Foods database maintained by the University of
     Chicago <URL:
     http://http://research.chicagogsb.edu/marketing/databases/dominicks/dataset.aspx>.
     Brands are seven of the top 10 UPCs in the canned tuna product
     category.

_U_s_a_g_e:

     data(tuna)

_F_o_r_m_a_t:

     A data frame with 338 observations on the following 30 variables.

     '_W_E_E_K' a numeric vector

     '_M_O_V_E_1' unit sales of Star Kist 6 oz.

     '_M_O_V_E_2' unit sales of Chicken of the Sea 6 oz.

     '_M_O_V_E_3' unit sales of Bumble Bee Solid 6.12 oz.

     '_M_O_V_E_4' unit sales of Bumble Bee Chunk 6.12 oz.

     '_M_O_V_E_5' unit sales of Geisha 6 oz.

     '_M_O_V_E_6' unit sales of Bumble Bee Large Cans.

     '_M_O_V_E_7' unit sales of HH Chunk Lite 6.5 oz.

     '_N_S_A_L_E_1' a measure of display activity of Star Kist 6 oz.

     '_N_S_A_L_E_2' a measure of display activity of Chicken of the Sea 6 oz.

     '_N_S_A_L_E_3' a measure of display activity of Bumble Bee Solid 6.12
          oz.

     '_N_S_A_L_E_4' a measure of display activity of Bumble Bee Chunk 6.12
          oz.

     '_N_S_A_L_E_5' a measure of display activity of Geisha 6 oz.

     '_N_S_A_L_E_6' a measure of display activity of Bumble Bee Large Cans.

     '_N_S_A_L_E_7' a measure of display activity of HH Chunk Lite 6.5 oz.

     '_L_P_R_I_C_E_1' log of price of Star Kist 6 oz.

     '_L_P_R_I_C_E_2' log of price of Chicken of the Sea 6 oz.

     '_L_P_R_I_C_E_3' log of price of Bumble Bee Solid 6.12 oz.

     '_L_P_R_I_C_E_4' log of price of Bumble Bee Chunk 6.12 oz.

     '_L_P_R_I_C_E_5' log of price of Geisha 6 oz.

     '_L_P_R_I_C_E_6' log of price of Bumble Bee Large Cans.

     '_L_P_R_I_C_E_7' log of price of HH Chunk Lite 6.5 oz.

     '_L_W_H_P_R_I_C_1' log of wholesale price of Star Kist 6 oz.

     '_L_W_H_P_R_I_C_2' log of wholesale price of Chicken of the Sea 6 oz.

     '_L_W_H_P_R_I_C_3' log of wholesale price of Bumble Bee Solid 6.12 oz.

     '_L_W_H_P_R_I_C_4' log of wholesale price of Bumble Bee Chunk 6.12 oz.

     '_L_W_H_P_R_I_C_5' log of wholesale price of Geisha 6 oz.

     '_L_W_H_P_R_I_C_6' log of wholesale price of Bumble Bee Large Cans.

     '_L_W_H_P_R_I_C_7' log of wholesale price of HH Chunk Lite 6.5 oz.

     '_F_U_L_L_C_U_S_T' total customers visits

_S_o_u_r_c_e:

     Chevalier, A. Judith, Anil K. Kashyap and Peter E. Rossi (2003),
     "Why Don't Prices Rise During Periods of Peak Demand? Evidence
     from Scanner Data,"  _The American Economic Review_ , 93(1),
     15-37.

_R_e_f_e_r_e_n_c_e_s:

     Chapter 7, _Bayesian Statistics and Marketing_ by Rossi et al. 
      <URL:
     http://faculty.chicagogsb.edu/peter.rossi/research/bsm.html>

_E_x_a_m_p_l_e_s:

     data(tuna)
     cat(" Quantiles of sales",fill=TRUE)
     mat=apply(as.matrix(tuna[,2:5]),2,quantile)
     print(mat)

     ##
     ## example of processing for use with rivGibbs
     ##
     if(0)
     {
       data(tuna)                          
       t = dim(tuna)[1]    
       customers = tuna[,30]                 
       sales = tuna[,2:8]                                                        
       lnprice = tuna[,16:22]      
       lnwhPrice= tuna[,23:29]      
       share=sales/mean(customers)
       shareout=as.vector(1-rowSums(share))
       lnprob=log(share/shareout)  

     # create w matrix

       I1=as.matrix(rep(1, t))
       I0=as.matrix(rep(0, t))
       intercept=rep(I1, 4)
       brand1=rbind(I1, I0, I0, I0)
       brand2=rbind(I0, I1, I0, I0)
       brand3=rbind(I0, I0, I1, I0)
       w=cbind(intercept, brand1, brand2, brand3)  
       
     ## choose brand 1 to 4        
               
       y=as.vector(as.matrix(lnprob[,1:4])) 
       X=as.vector(as.matrix(lnprice[,1:4]))     
       lnwhPrice=as.vector(as.matrix (lnwhPrice[1:4]))   
       z=cbind(w, lnwhPrice)
                             
       Data=list(z=z, w=w, x=X, y=y)
       Mcmc=list(R=R, keep=1)
       set.seed(66)
       out=rivGibbs(Data=Data,Mcmc=Mcmc)

       cat(" betadraws ",fill=TRUE)
       summary(out$betadraw)

     if(0){
     ## plotting examples
     plot(out$betadraw)
     }
     }

       

