% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PM_post.R
\name{PM_post}
\alias{PM_post}
\title{Individual Bayesian posterior predictions at short intervals}
\description{
\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}}

Contains the Bayesian posterior predictions at short intervals
specified as an argument to the \verb{$fit} method of \link{PM_model}. Default is every 12 minutes.
}
\details{
#' The \link{PM_post} object is both a data field within a \link{PM_result}, and itself an R6 object
comprising data fields and associated methods suitable for
analysis and plotting of posterior predictions generated during the run.

Because \link{PM_post} objects are automatically added to the \link{PM_result} at the end of a
successful run, it is generally not necessary for users to generate \link{PM_post} objects
themselves.

The main results are contained in the \verb{$data} field,
and it is this field which is passed to the \verb{$plot} and \verb{$summary} methods.
data frame with population predicted outputs for all subjects.

To provide a more traditional experience in R,
the data frame is separated by columns into fields, e.g. \code{id} or \code{time}. This
allows you to access them in an S3 way, e.g. \code{run1$post$time} if \code{run1} is a
\code{PM_result} object.

However, if you wish to manipulate the entire data frame,
use the \code{data} field, e.g. \code{trough <- run1$post$data |> filter(time == 24)}. If
you are unfamiliar with the base R \verb{|>} pipe function, type \code{help("|>")}
into the R console for documentation and examples.
}
\author{
Michael Neely, Julian Otalvaro
}
\section{Public fields}{
  \if{html}{\out{<div class="r6-fields">}}
  \describe{
    \item{\code{data}}{A data frame with the following columns:
\itemize{
\item \strong{id} Subject id
\item \strong{time} Time of predictions in decimal hours
\item \strong{icen} Prediction based on mean or median of Bayesian posterior parameter distribution
\item \strong{outeq} Output equation number
\item \strong{pred} Predicted output for each outeq
\item \strong{block} Observation blocks within subjects as defined by \emph{EVID=4} dosing events
}}
  }
  \if{html}{\out{</div>}}
}
\section{Methods}{
\subsection{Public methods}{
  \itemize{
    \item \href{#method-PM_post-initialize}{\code{PM_post$new()}}
    \item \href{#method-PM_post-plot}{\code{PM_post$plot()}}
    \item \href{#method-PM_post-summary}{\code{PM_post$summary()}}
    \item \href{#method-PM_post-auc}{\code{PM_post$auc()}}
    \item \href{#method-PM_post-clone}{\code{PM_post$clone()}}
  }
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-PM_post-initialize"></a>}}
\if{latex}{\out{\hypertarget{method-PM_post-initialize}{}}}
\subsection{\code{PM_post$new()}}{
  Create new object populated with Bayesian posterior predicted data at
regular, frequent intervals
  \subsection{Usage}{
    \if{html}{\out{<div class="r">}}
    \preformatted{PM_post$new(PMdata = NULL, path = ".", ...)}
    \if{html}{\out{</div>}}
  }
  \subsection{Arguments}{
    \if{html}{\out{<div class="arguments">}}
    \describe{
      \item{\code{PMdata}}{include Saved, parsed output of prior run, used when source files are not available.
.}
      \item{\code{path}}{include Path to the folder containing the raw results of the run. Default is the current working directory.
.}
      \item{\code{...}}{Not currently used.}
    }
    \if{html}{\out{</div>}}
  }
  \subsection{Details}{
    Creation of new \code{PM_post} object is automatic and not generally necessary
for the user to do.
  }
}

\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-PM_post-plot"></a>}}
\if{latex}{\out{\hypertarget{method-PM_post-plot}{}}}
\subsection{\code{PM_post$plot()}}{
  Plot method
  \subsection{Usage}{
    \if{html}{\out{<div class="r">}}
    \preformatted{PM_post$plot(...)}
    \if{html}{\out{</div>}}
  }
  \subsection{Arguments}{
    \if{html}{\out{<div class="arguments">}}
    \describe{
      \item{\code{...}}{Arguments passed to \link{plot.PM_pop}}
    }
    \if{html}{\out{</div>}}
  }
  \subsection{Details}{
    See \link{plot.PM_pop}.
  }
}

\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-PM_post-summary"></a>}}
\if{latex}{\out{\hypertarget{method-PM_post-summary}{}}}
\subsection{\code{PM_post$summary()}}{
  Summary method
  \subsection{Usage}{
    \if{html}{\out{<div class="r">}}
    \preformatted{PM_post$summary(...)}
    \if{html}{\out{</div>}}
  }
  \subsection{Arguments}{
    \if{html}{\out{<div class="arguments">}}
    \describe{
      \item{\code{...}}{Arguments passed to \link{summary.PM_pop}}
    }
    \if{html}{\out{</div>}}
  }
  \subsection{Details}{
    See \link{summary.PM_post}.
  }
}

\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-PM_post-auc"></a>}}
\if{latex}{\out{\hypertarget{method-PM_post-auc}{}}}
\subsection{\code{PM_post$auc()}}{
  Calculate AUC
  \subsection{Usage}{
    \if{html}{\out{<div class="r">}}
    \preformatted{PM_post$auc(...)}
    \if{html}{\out{</div>}}
  }
  \subsection{Arguments}{
    \if{html}{\out{<div class="arguments">}}
    \describe{
      \item{\code{...}}{Arguments passed to \link{make_AUC}}
      \item{\code{data}}{The object to use for AUC calculation}
    }
    \if{html}{\out{</div>}}
  }
  \subsection{Details}{
    See \link{make_AUC}
  }
}

\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-PM_post-clone"></a>}}
\if{latex}{\out{\hypertarget{method-PM_post-clone}{}}}
\subsection{\code{PM_post$clone()}}{
  The objects of this class are cloneable with this method.
  \subsection{Usage}{
    \if{html}{\out{<div class="r">}}
    \preformatted{PM_post$clone(deep = FALSE)}
    \if{html}{\out{</div>}}
  }
  \subsection{Arguments}{
    \if{html}{\out{<div class="arguments">}}
    \describe{
      \item{\code{deep}}{Whether to make a deep clone.}
    }
    \if{html}{\out{</div>}}
  }
}

}
