[ede2d4]: / man / posterior_performance.Rd

Download this file

52 lines (46 with data), 1.7 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/postestimation.R
\name{posterior_performance}
\alias{posterior_performance}
\title{Posterior measures of performance}
\usage{
posterior_performance(
obj,
prob = 0.95,
sub.idx = NULL,
summary = TRUE,
cores = getOption("mc.cores", 1)
)
}
\arguments{
\item{obj}{An object of class \code{hsstan} or \code{kfold}.}
\item{prob}{Width of the posterior interval (0.95, by default). It is
ignored if \code{summary=FALSE}.}
\item{sub.idx}{Vector of indices of observations in the dataset to be used
in computing the performance measures. If \code{NULL} (default), all
observations in the dataset are used.}
\item{summary}{Whether a summary of the distribution of the performance
measure should be returned rather than the pointwise values
(\code{TRUE} by default).}
\item{cores}{Number of cores to use for parallelization (the value of
\code{options("mc.cores")} by default).}
}
\value{
The mean, standard deviation and posterior interval of the performance
measure (R-squared or AUC) if \code{summary=TRUE}, or a vector of values
of the performance measure with length equal to the size of the posterior
sample if \code{summary=FALSE}. Attribute \code{type} reports whether the performance
measures are cross-validated or not. If \code{sub.idx} is not \code{NULL}, attribute
\code{subset} reports the index of observations used in the computations.
}
\description{
Compute the log-likelihood and a relevant measure of performance (R-squared
or AUC) from the posterior samples.
}
\examples{
\donttest{
\dontshow{utils::example("hsstan", echo=FALSE)}
# continued from ?hsstan
posterior_performance(hs.biom, cores=1)
}
}