makeObject {meta4diag} | R Documentation |
A function used to make a meta4diag
object.
Description
Takes an internal data list, an internal prior setting list and an INLA
object produced by makeData()
, makePriors()
and runModel()
, respectively and makes a meta4diag
object which contains various informations for later use. This function is used in the main function meta4diag()
and can also be used as a separate function.
Usage
makeObject(model, nsample=FALSE, seed=0L)
Arguments
model |
An |
nsample |
A numerical value specifying the number of posterior samples, default is FALSE. The posterior samples are used to compute the marginals and estimates values of non-linear functions, such as log ratios and diagnostic odds ratios. If |
seed |
A numerical value specifying the random seed to control the RNG for generating posterior samples if nsample > 0. If you want reproducible results, you ALSO need to control the seed for the RNG in R by controlling the variable .Random.seed or using the function set.seed. |
Value
makeObject
returns a meta4diag
object with components:
data |
The provided input data. |
outdata |
The internal data that could be used in INLA from function |
priors.density |
Prior distributions for the variance components and correlation from function |
names.fitted |
Names of the jointly modelled accuracies in the model. For example, se and sp or (1-se) and sp. |
cpu.used |
The cpu time used for running the model. |
call |
The matched call. |
summary.fixed |
Matrix containing the mean and standard deviation (plus, possibly quantiles) of the fixed effects of the model. |
marginals.fixed |
A list containing the posterior marginal densities of the fixed effects of the model. |
summary.expected.(...).accuracy |
Matrix containing the mean and standard deviation (plus, possibly quantiles) of the mean of accuracies transformed with the link function, i.e. E(g(Se)), E(g(Sp)), E(g(1-Se)) and E(g(1-Sp)). Dynamic name for this output. (...) indicates the name of link function used in |
marginals.expected.(...).accuracy |
A list containing the posterior marginal densities of the mean of accuracies transformed with the link function, i.e. E(g(Se)), E(g(Sp)), E(g(1-Se)) and E(g(1-Sp)). Dynamic name for this output. (...) indicates the name of link function used in |
summary.expected.accuracy |
Matrix containing the mean and standard deviation (plus, possibly quantiles) of the mean of the accuracies, i.e. E(Se), E(Sp), E(1-Se) and E(1-Sp). |
marginals.expected.accuracy |
A list containing the posterior marginal densities of of the mean of the accuracies, i.e. E(Se), E(Sp), E(1-Se) and E(1-Sp). |
summary.hyperpar |
A matrix containing the mean and sd (plus, possibly quantiles) of the hyperparameters of the model. |
marginals.hyperpar |
A list containing the posterior marginal densities of the hyperparameters of the model. |
correlation.expected.(...).accuracy |
A correlation matrix between the mean of the accuracies transformed with the link function. Dynamic name for this output. (...) indicates the name of link function used in |
covariance.expected.(...).accuracy |
A covariance matrix between the mean of the accuracies transformed with the link function. Dynamic name for this output. (...) indicates the name of link function used in |
summary.predictor.(...) |
A matrix containing the mean and sd (plus, possibly quantiles) of the linear predictors one transformed accuracy in the model. The accuracy type depends on the model type. See argument |
marginals.predictor.(...) |
A list containing the posterior marginals of the linear predictors of one transformed accuracy in the model. The accuracy type depends on the model type. See argument |
misc |
Some other settings that maybe useful retruned by meta4diag. |
dic |
The deviance information criteria and effective number of parameters. |
cpo |
A list of three elements: |
waic |
A list of two elements: |
mlik |
The log marginal likelihood of the model |
inla.result |
A |
samples.fixed |
A matrix of the fixed effects samples if |
samples.hyperpar |
A matrix of the hyperparameter samples if |
samples.overall.Se |
A matrix containing the mean and sd (plus, possibly quantiles) of overall sensitivity samples if |
samples.overall.Sp |
A matrix containing the mean and sd (plus, possibly quantiles) of overall specificity samples if |
summary.overall.statistics |
A matrix containing the mean and sd (plus, possibly quantiles) of mean positive and negative likelihood ratios and mean diagnostic odds ratios if |
samples.study.specific.Se |
A matrix containing the mean and sd (plus, possibly quantiles) of study specific sensitivity samples if |
samples.study.specific.Sp |
A matrix containing the mean and sd (plus, possibly quantiles) of study specific specificity samples if |
summary.study.specific.LRpos |
A matrix containing the mean and sd (plus, possibly quantiles) of positive likelihood ratios for each study if |
summary.study.specific.LRneg |
A matrix containing the mean and sd (plus, possibly quantiles) of negative likelihood ratios for each study if |
summary.study.specific.DOR |
A matrix containing the mean and sd (plus, possibly quantiles) of diagnostic odds ratios for each study if |
summary.study.specific.RD |
A matrix containing the mean and sd (plus, possibly quantiles) of risk difference for each study if |
summary.study.specific.LDOR |
A matrix containing the mean and sd (plus, possibly quantiles) of log diagnostic odds ratios for each study if |
summary.study.specific.LLRpos |
A matrix containing the mean and sd (plus, possibly quantiles) of log positive likelihood ratios for each study if |
summary.study.specific.LLRneg |
A matrix containing the mean and sd (plus, possibly quantiles) of log negative likelihood ratios for each study if |
Author(s)
Jingyi Guo
See Also
makeData, makePriors, runModel, meta4diag
Examples
## Not run:
if(requireNamespace("INLA", quietly = TRUE)){
require("INLA", quietly = TRUE)
data(Catheter)
outdata = makeData(Catheter)
outpriors = makePriors()
model = runModel(outdata=outdata, outpriors=outpriors, link="logit")
res = makeObject(outdata, outpriors, model, nsample=2000)
}
## End(Not run)