Description Usage Arguments Value Examples
Make an N of 1 object containing data, priors, and a jags model file
1 2 3 4 |
Y |
Outcome of the study. This should be a vector with length of total number of observations. |
Treat |
Treatment indicator vector with same length as the outcome. |
baseline |
baseline Treatment name. This serves as a baseline/placebo when comparing different treatments. |
ncat |
Number of categories. Used in ordinal models. |
response |
Type of outcome. Can be normal, binomial, poisson or ordinal. |
Time |
parameter used for modelling splines. Still under development. |
knots |
parameter used for modelling splines. Still under development. |
alpha.prior |
Prior for the intercept of the model. |
beta.prior |
Prior for the treatment coefficient. |
gamma.prior |
Prior for modelling splines. Still under development. |
dc.prior |
Prior for the length between cutpoints. Used only for ordinal logistic models. |
c1.prior |
Prior for the first cutpoint. Used only for ordinal logistic models. |
rho.prior |
Prior for the correlated error model. Still under development. |
hy.prior |
Prior for the heterogeneity parameter. Supports uniform, gamma, and half normal for normal and binomial response and wishart for multinomial response. It should be a list of length 3, where first element should be the distribution (one of dunif, dgamma, dhnorm, dwish) and the next two are the parameters associated with the distribution. For example, list("dunif", 0, 5) give uniform prior with lower bound 0 and upper bound 5 for the heterogeneity parameter. For wishart distribution, the last two parameter would be the scale matrix and the degrees of freedom. |
Creates list of variables that are used to run the model using nof1.run
Y |
Outcome |
Treat |
Treatment |
baseline |
Baseline variable |
ncat |
Number of categories for ordinal response |
nobs |
Total number of observations in a study |
Treat.name |
Treatment name besides baseline treatment |
response |
The type of response variable |
priors |
Priors that the code will be using. Default priors are used if prior was not specified |
code |
Rjags model file code that is generated using information provided by the user. To view model file inside R, use |
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.