Learn R Programming

skipTrack (version 0.1.2)

postPhi: Metropolis-Hastings step to draw a new value for phi.

Description

In our model the data are drawn from LogN(mu_i + log(c_ij), tau_i). The prior for tau_i is given as Gamma(thetaiphi, phi). This function uses a MH step to draw a new sample of phi. Proposal distribution is Gamma(currentPhirhoPhi, rhoPhi). Note that we parameterize with RATE, not SCALE.

Usage

postPhi(taui, thetai, currentPhi, rhoPhi = 1000)

Value

Numeric, new draw of phi

Arguments

taui

Numeric vector, individuals precisions.

thetai

Numeric vector. individuals precisions means (estimate)

currentPhi

Previous draw of phi

rhoPhi

Proposal rate for gamma distribution that draws proposal for phi, default is 1000.