Description Usage Arguments Value Examples
Generate a stanfit object corresponding to a posterior distribution of corrected odds ratio given nondifferential misclassification with Se and Sp (i.e., both are constant and at least one of Se or Sp is lower than 1).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
a |
number of exposed subjects in the case group. |
N1 |
number of total subjects in the case group. |
c |
number of exposed subjects in the control group. |
N0 |
number of total subjects in the control group. |
prior_list |
list of priors. Can be replaced by the function call to |
se |
sensitivity. Do not have to specify this if |
sp |
specificity. Do not have to specify this if |
logitpi0_prior |
mean and sd of the prior normal distribution of |
lor_prior |
mean and sd of the prior normal distribution of corrected log odds ratio. Default to |
chains |
number of Markov Chains. Default to 2. |
traceplot |
Logical, defaulting to |
inc_warmup |
Only evaluated when |
window |
Only evaluated when |
refresh |
an integer value used to control how often the progress of sampling is reported. By default, the progress indicator is turned off, thus refresh <= 0. If on, refresh = max(iter/10, 1) is generally recommended. |
seed |
the seed for random number generation. See stan for more details. |
... |
optional parameters passed to stan. |
It returns a stanfit object of this model, which inherits stanfit class methods. See rstan for more details.
1 2 3 4 5 6 7 | # Case-control study data of Bipolar Disorder with rheumatoid arthritis (Farhi et al. 2016)
# Data from \url{https://www.sciencedirect.com/science/article/pii/S0165032715303864#bib13}\
mod <- nlmeNDiff(bd_meta, lower = 0) # see \code{nlmeNDiff()} for detailed example.
prior_list <- paramEst(mod)
correctedOR(a = 66, N1 = 11782, c = 243, N0 = 57973, prior_list = prior_list,
chains = 3, iter = 10000)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.