meta4diag
object.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.
makeObject(model, nsample=FALSE, seed=0L)
An INLA
object. Get from function runModel()
.
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 nsample
is given, summary.summarized.statistics
, summary.fitted.LRpos
, summary.fitted.LRneg
, summary.fitted.DOR
and samples of \(E(se)\), \(E(sp)\), \(E(1-se)\) and \(E(1-sp)\) will be returned.
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.
makeObject
returns a meta4diag
object with components:
The provided input data.
The internal data that could be used in INLA from function makeData()
.
Prior distributions for the variance components and correlation from function makePriors()
.
Names of the jointly modelled accuracies in the model. For example, se and sp or (1-se) and sp.
The cpu time used for running the model.
The matched call.
Matrix containing the mean and standard deviation (plus, possibly quantiles) of the fixed effects of the model.
A list containing the posterior marginal densities of the fixed effects of the model.
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 runModel()
, i.e. if link function is "logit", the full name of this output is "summary.expected.logit.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 runModel()
, i.e. if link function is "logit", the full name of this output is "marginals.expected.logit.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).
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).
A matrix containing the mean and sd (plus, possibly quantiles) of the hyperparameters of the model.
A list containing the posterior marginal densities of the hyperparameters of the model.
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 runModel()
.
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 runModel()
.
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 model.type
. For example, the possible accuracy type could be \(g(se)\), \(g(sp)\), \((se)\) or \((sp)\), where \(g()\) is the link function.
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 model.type
. For example, the possible accuracy type could be \(g(se)\), \(g(sp)\), \((se)\) or \((sp)\), where \(g()\) is the link function.
Some other settings that maybe useful retruned by meta4diag.
The deviance information criteria and effective number of parameters.
A list of three elements: cpo$cpo
are the values of the conditional predictive ordinate (CPO), cpo$pit
are the values of the
probability integral transform (PIT) and cpo$failure
indicates whether some assumptions are violated. In short, if
cpo$failure[i] > 0 then some assumption is violated, the higher the
value (maximum 1) the more seriously.
A list of two elements: waic$waic
is the Watanabe-Akaike information criteria, and waic$p.eff
is the estimated effective number of parameters.
The log marginal likelihood of the model
A INLA
object that from function runModel()
which implements INLA.
A matrix of the fixed effects samples if nsample
is given.
A matrix of the hyperparameter samples if nsample
is given.
A matrix containing the mean and sd (plus, possibly quantiles) of overall sensitivity samples if nsample
is given.
A matrix containing the mean and sd (plus, possibly quantiles) of overall specificity samples if nsample
is given.
A matrix containing the mean and sd (plus, possibly quantiles) of mean positive and negative likelihood ratios and mean diagnostic odds ratios if nsample
is given.
A matrix containing the mean and sd (plus, possibly quantiles) of study specific sensitivity samples if nsample
is given.
A matrix containing the mean and sd (plus, possibly quantiles) of study specific specificity samples if nsample
is given.
A matrix containing the mean and sd (plus, possibly quantiles) of positive likelihood ratios for each study if nsample
is given.
A matrix containing the mean and sd (plus, possibly quantiles) of negative likelihood ratios for each study if nsample
is given.
A matrix containing the mean and sd (plus, possibly quantiles) of diagnostic odds ratios for each study if nsample
is given.
A matrix containing the mean and sd (plus, possibly quantiles) of risk difference for each study if nsample
is given.
A matrix containing the mean and sd (plus, possibly quantiles) of log diagnostic odds ratios for each study if nsample
is given.
A matrix containing the mean and sd (plus, possibly quantiles) of log positive likelihood ratios for each study if nsample
is given.
A matrix containing the mean and sd (plus, possibly quantiles) of log negative likelihood ratios for each study if nsample
is given.
makeData, makePriors, runModel, meta4diag
# 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)
}
# }
Run the code above in your browser using DataLab