postProcess               package:pscl               R Documentation

_r_e_m_a_p _M_C_M_C _o_u_t_p_u_t _v_i_a _a_f_f_i_n_e _t_r_a_n_s_f_o_r_m_a_t_i_o_n_s

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

     Remap the MCMC iterates in an 'ideal' object via an affine
     transformation, imposing identifying restrictions ex post (aka
     post-processing).

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

     postProcess(object, constraints="normalize", debug = FALSE)

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

  object: an object of class 'ideal'

constraints: list of length 'd+1', each component providing a set of
          'd' restrictions, where 'd' is the dimension of the fitted
          'ideal' model; or the character string 'normalize' (default).
           If a list, the name of each component should uniquely match
          a legislator/subject's name.  See Details.

   debug: logical flag for verbose output, used for debugging

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

     Item-response models are unidentified without restrictions on the
     underlying parameters.  Consider the 'd=1' dimensional case. The
     model is

                  Pr(y_[ij] = 1) = F(x_i b_j - a_j).

     Any linear transformation of the latent traits, say,

                             x* = mx + c

     can be exactly offset by applying the appropriate linear
     transformations to the item/bill parameters, meaning that there is
     no unique set of values for the model parameters that will
     maximize the likelihood function.  In higher dimensions, the
     latent traits can also be transformed via any arbitrary rotation,
     dilation and translation, with offsetting transformations applied
     to the item/bill parameters.

     One strategy in MCMC is to ignore the lack of identification at
     run time, but apply identifying restrictions ex post,
     "post-processing" the MCMC output, iteration-by-iteration.  In a
     'd'-dimensional IRT model, a sufficient condition for global
     identification is to fix 'd+1' latent traits, provided the
     constrained latent traits span the 'd' dimensional latent space.
     This function implements this strategy.  The user supplies a set
     of constrained ideal points in the 'constraints' list.  The
     function then processes the MCMC output in the 'ideal' 'object',
     finding the transformation that maps the current iteration's
     sampled values for 'x' (latent traits/ideal points) into the
     sub-space of identified parameters defined by the fixed points in
     'constraints'; i.e., what is the affine transformation that maps
     the unconstrained ideal points into the constraints.  Aside from
     miniscule numerical inaccuracies resulting from matrix inversion
     etc, this transformation is exact: after post-processing, the
     'd+1' constrained points do not vary over the MCMC iterations. The
     remaining 'n-d-1' ideal points are subject to (posterior)
     uncertainty; the "random tour" of the joint parameter space of
     these parameters produced by the MCMC algorithm has been mapped
     into a subspace in which the parameters are globally identified.

     If the 'ideal' object was produced with 'store.item' set to
     'TRUE', then the item parameters are also post-processed, applying
     the inverse transformation.  Specifically, recall that the IRT
     model is 

                     Pr(y_[ij] = 1) = F(x_i' b_j)

     where in this formulation x_i is a vector of length 'd+1',
     including a '-1' to put a constant term into the model (i.e., the
     intercept or difficulty parameter is part of beta_j).  Let A
     denote the non-singular, 'd+1'-by-'d+1' matrix that maps the x
     into the space of identified parameters.  Recall that this
     transformation is computed iteration by iteration.  Then each x_i
     is transformed to x*_i = Ax_i and b_j is transformed to b_j^* =
     A^(-1) b_j, i = 1, ..., n; j = 1, ..., m.

     Local identification can be obtained for a one-dimensional model
     by simply imposing a normalizing restriction on the ideal points:
     this normalization (mean zero, standard deviation one) is the
     default behavior, but is only valid when the 'rollcall' object was
     fit with 'd=1'.  An offsetting transformation is applied to the
     items parameters as well.  Specifically, in one-dimensional, the
     two-parameter IRT model is 

                  Pr(y_[ij] = 1) = F(x_i b_j - a_j).

     If we normalize the x_i to x*_i = (x_i - c)/m then the offsetting
     transformations for the item/bill parameters are b*_j = b_j m and
     a*_j = a_j - cb_j.

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

     An object of class 'ideal', with components suitably transformed
     and recomputed (i.e., 'x' is transformed and 'xbar' recomputed,
     and if the 'ideal' object was fit with 'store.item=TRUE', 'beta'
     is transformed and 'betabar' is recomputed).

_N_o_t_e:

     Applying transformations to obtain identification can sometimes
     lead to surprising results.  Each data point makes the same
     likelihood contributions with either the identified or
     unidentified parameters.  But, in general, predictions generated
     with the parameters set to their posterior means will differ
     depending on whether one uses the identified subset of parameters
     or the unidentified parameters.  For this reason, caution should
     be used when using a function such as 'predict' after
     post-processing output from 'ideal'.  A better strategy is to
     compute the estimand of interest at each iteration and then take
     averages over iterations.

     When specifying a value of 'burnin' different from that used in
     fitting the 'ideal' object, note a distinction between the
     iteration numbers of the stored iterations, and the number of
     stored iterations.  That is, the 'n'-th iteration stored in an
     'ideal' object will not be iteration 'n' if the user specified
     'thin>1' in the call to 'ideal'. Here, iterations are tagged with
     their iteration number.  Thus, if the user called 'ideal' with
     'thin=10' and 'burnin=100' then the stored iterations are numbered
     '100, 110, 120, ...'.  Any future subsetting via a 'burnin' refers
     to this iteration number.

_A_u_t_h_o_r(_s):

     Simon Jackman jackman@stanford.edu

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

     Hoff, Peter, Adrian E. Raftery and Mark S. Handcock. 2002. Latent
     Space Approaches to Social Network Analysis. _Journal of the
     American Statistical Association_ 97:1090-1098.

     Edwards, Yancy D. and Greg M. Allenby. 2003. Multivariate Analysis
     of Mulitple Response Data. _Journal of Marketing Research_
     40:321-334.

     Rivers, Douglas. 2003.  "Identification of Multidimensional
     Item-Response Models." Typescript.  Department of Political
     Science, Stanford University.

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

     data(s109)

     ## short run for examples
     id1 <- ideal(s109,
                  d=1,
                  meanzero=FALSE,     ## no identification...!
                  store.item=TRUE,
                  maxiter=500,
                  burnin=0,
                  thin=10)

     id1Local <- postProcess(id1)    ## default is to normalize
     summary(id1Local)

     id1pp <- postProcess(id1,
                          constraints=list(BOXER=-1,INHOFE=1))
     summary(id1Local)

     ## Not run: 
     id2 <- ideal(s109,
                  d=2,
                  store.item=TRUE,
                  maxiter=1e4,
                  burnin=0,
                  thin=25)

     tracex(id2,d=1:2,
            legis=c("BOXER","INHOFE","BYRD","CHAFEE","MCCAIN"),
            showAll=TRUE)

     id2pp <- postProcess(id2,
                          constraints=list(BOXER=c(-1,0),
                            INHOFE=c(1,0),
                            CHAFEE=c(0,.25)))

     tracex(id2pp,d=1:2,
            legis=c("BOXER","INHOFE","COLLINS","FEINGOLD","COLEMAN",
              "CHAFEE","MCCAIN","KYL"),
            showAll=TRUE)
     ## End(Not run)

