Consider a simple location-shift semi-parametric model with two mutually-independent samples (here $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} $
- 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)? Many thanks for your help.
P.S. This of course has a regression reformulation: $y_i = \Delta x_i + e_i, ( e_i | F ) \stackrel{iid}{\sim} F$, 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$.
P.P.S. R code to fit a Polya tree prior on $F$ instead of a DP prior would also interest me greatly.