This function computes sufficient statistics from an RprobitB_data
object for the Gibbs sampler to save computation time.
Arguments
- data
An object of class
RprobitB_data.- normalization
An object of class
RprobitB_normalization, which can be created viaRprobitB_normalization.
Value
A list of sufficient statistics on the data for Gibbs sampling, containing
the elements
N,T,J,P_fandP_rfromdata,Tvec, the vector of choice occasions for each decider of lengthN,csTvec, a vector of lengthNwith the cumulated sums ofTvecstarting from0,W, a list of design matrices differenced with respect to alternative numbernormalization$level$levelfor each decider in each choice occasion with covariates that are linked to a fixed coefficient (orNAifP_f = 0),X, a list of design matrices differenced with respect to alternative numbernormalization$level$levelfor each decider in each choice occasion with covariates that are linked to a random coefficient (orNAifP_r = 0),y, a matrix of dimensionNxmax(Tvec)with the observed choices of deciders in rows and choice occasions in columns, decoded to numeric values with respect to their appearance indata$alternatives, where rows are filled withNAin case of an unbalanced panel,WkW, a matrix of dimensionP_f^2x(J-1)^2, the sum over Kronecker products of each transposed element inWwith itself,XkX, a list of lengthN, each element is constructed in the same way asWkWbut with the elements inXand separately for each decider,rdiff(for the ranked case only), a list of matrices that reverse the base differencing and instead difference in such a way that the resulting utility vector is negative.
