tauCalculate             package:Ratings             R Documentation

_P_o_s_t_e_r_i_o_r _P_r_e_d_i_c_t_i_v_e _P_r_o_b_a_b_i_l_i_t_i_e_s _f_r_o_m _o_r_d_r_a_t_i_n_g

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

     Calculates the quantity labeled tau_{pc} in Ho and Quinn (n.d.). 
     tau_{pc} can be thought of as the probability that a randomly
     chosen rater (from the set of observed raters) will give product p
     a rating of c given the observed data.

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

     tauCalculate(out, ndraws = 500)

_A_r_g_u_m_e_n_t_s:

     out: An output object from the 'ordrating' function. 

  ndraws: The number of Monte Carlo draws used to calculate the
          posterior predictive probabilities. Must be less than or
          equal to the number of rows in 'out'. 

_D_e_t_a_i_l_s:

     Section 3.2 of Ho and Quinn (n.d.) provides full details for how 
     tau_{pc} is calculated. The basic ideas are the following. 

     'tauCalculate' takes the MCMC output from 'ordrating' and
     calculates the sample average (over all row units in Y) of the
     posterior predictive probability of a particular column unit in Y
     being rated as c. This is done for all column units and ratings
     categories.

_V_a_l_u_e:

     A P x C matrix where P is the number of columns in Y and C is the
     number of ordinal rating categories. Each row of this matrix gives
     the posterior predictive probability that a randomly chosen rater,
     from the set of observed raters, will give product p a rating of
     c.

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

     Ho, Daniel E. and Kevin M. Quinn. forthcoming. "Improving the
     Presentation  and Interpretation of Online Ratings Data with
     Model-based Figures."  The American Statistician.

_S_e_e _A_l_s_o:

     'ordrating', 'barplotModelBased', 'starplotModelBased'

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

     ## Not run: 
     ## Mondo Times example from Ho & Quinn (nd).
     ## may have to increase stack limit to run this example on some machines

     data(Mondo)

     ord.out <- ordrating(Mondo, beta.constraint=1, tune=.035, 
                          ma=1, mb=-5, vinva=1, vinvb=0.05,
                          gamma.start=c(-300, 0, 1.5, 3.0, 4.5, 300),
                          thin=20, burnin=20000, mcmc=100000, verbose=1000)

     tau <- tauCalculate(ord.out, 500)



     ## subsetting the Mondo data to include only raters who rated 5 or more 
     ## outlets (should avoid any stacksize problems)

     Mondo.sub <- Mondo[apply(!is.na(Mondo), 1, sum) >= 5, ]
     ## also getting rid of outlets that are not rated now
     Mondo.sub <- Mondo.sub[,apply(is.na(Mondo.sub), 2, mean) != 1] 

     ord.out <- ordrating(Mondo.sub, beta.constraint=1, tune=.035, 
                          ma=1, mb=-5, vinva=1, vinvb=0.05,
                          gamma.start=c(-300, 0, 1.5, 3.0, 4.5, 300),
                          thin=20, burnin=20000, mcmc=100000, verbose=1000)

     tau <- tauCalculate(ord.out, 500)

     ## End(Not run)

