2
$\begingroup$

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:

  1. Is there a CRAN package that does the MCMC fitting for this model in R (if so, what is it)?
  2. If not, do you know of another source of R code that will do this fitting (if so, where)?
  3. 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.

$\endgroup$
3
  • $\begingroup$ David, have did you happen to find any such package since this question was posted? I'd be happy to find one too. $\endgroup$
    – pglpm
    Commented Sep 5, 2021 at 9:16
  • $\begingroup$ I'm told that DPpackage (orphaned at CRAN) can do this, but I've not yet tried it. $\endgroup$ Commented Sep 16, 2021 at 23:28
  • $\begingroup$ Thank you David. I recommend you take a look at the Nimble package, it's very powerful and versatile. $\endgroup$
    – pglpm
    Commented Sep 17, 2021 at 13:26

0