2

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} $

  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)? 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.

  • Could you please explain what a DP model is? Also, what is $\Delta$? – mhdadk Jun 22 '21 at 22:45
  • 1
    I've extensively edited the question -- is it clear now? If so, please re-open it; if not, please give me additional suggestions for increased clarity -- MANY thanks and all best wishes, David Draper – David Draper Jun 22 '21 at 23:02
  • Hi David, unfortunately I don't have the authority to re-open your question. As a general rule, to increase the likelihood of someone answering your question on this site: 1) Check if your question consists of many sub-questions. If it does, ask the questions separately. 2) Make sure you explain your question in the simplest possible terms. You can do this by discarding parts of the question that are details... – mhdadk Jun 22 '21 at 23:51
  • ...that are not really relevant to the question, or by making sure that you explain all the symbols that you use. 3) Try to make your question as short as possible without sacrificing clarity. Unfortunately, this may go against point (2), but there are ways to accomplish this. The best way, in my experience, is to use an example. 4) Please see [this guide](https://stats.stackexchange.com/help/how-to-ask) for other useful tips. I don't think your P.S. is necessary, as it only adds a lot more jargon that makes the question... – mhdadk Jun 22 '21 at 23:54
  • ...difficult to quickly digest for the reader. Hope this helps. Good luck! – mhdadk Jun 22 '21 at 23:59

0 Answers0