Consider a simple location-shift semi-parametric model with two mutually-independent samples (in what follows, $F$ is a cumulative distribution function (CDF) on $\mathbb{ R }$, the $C_i$ and $T_j$ are real-valued outcomes for subjects in control $( C )$ and treatment $( T )$ groups in a randomized controlled trial, $\Delta$ is the treatment effect, and $DP( \alpha_0, F_0 )$ is a Dirichlet Process prior on $F$):
$ \begin{align} ( C_i | F ) & \stackrel{iid}{\sim} F \qquad i = 1, \dots, m \\ ( T_j - \Delta | F ) & \stackrel{iid}{\sim} F \qquad j = 1, \dots, n \\ F & \sim DP( \alpha_0, F_0 ) \\ \Delta & \sim U( - \infty, \infty ) \end{align} $
As usual with the two-independent-samples problem, this has a simple regression reformulation: $y_k = \Delta x_k + e_k, ( e_k | F ) \stackrel{iid}{\sim} F \ ( k = 1, \dots, m + n )$, prior on $\Delta$ diffuse; here $\mathbf{y} = (\mathbf{C}, \mathbf{T})^\intercal$, $\mathbf{ C } = ( C_1, \dots, C_m )$, $\mathbf{ T } = ( T_1, \dots, T_n )$ and $\mathbf{x} = (\underbrace{ 0,\ldots,0}_{m},\underbrace{1,\ldots,1}_{n})^\intercal$.
Questions:
- Is there a CRAN package that does the MCMC fitting for this model in R (if so, what is it)?
- If not, do you know of another source of R code that will do this fitting (if so, where)?
- R code to fit a Polya tree prior on $F$ instead of a Dirichlet Process prior would also interest me greatly.
Many thanks for your help.