Description Usage Arguments Details Value
For a set of data, X, calculate the probability that each variant acts through the shared factor U
1 | Z_post(X, fit, nsamps = 1000, name_post = "")
|
X |
object of class cause_data. This need not be the same data used to compute 'fit'. |
fit |
object of class cause_post. |
nsamps |
Number of samples to take from the posterior (see Details). |
Let x_i represent the the data in the ith row of 'X'. Let Z_i be the indicator that variant i affects U. We are interested in computing P(Z_i = 1 | posteriors) where posteriors refers to the posterior parameter distributions contained in 'fit'. We compute l(x_i | posteriors, Z=1) and l(x_i | posteriors, Z_i = 0) where l denotes the likelihood. We then compute P(Z_i = 1 | posteriors) = l(x_i | posteriors, Z_i = 1)/(l(x_i | posteriors, Z_i = 1) + l(x_i | posteriors, Z_i = 0))
A vector of probabilities corresponding to the rows of X
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.