Switch to unified view

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