% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PM_compare.R
\name{PM_compare}
\alias{PM_compare}
\title{Compare runs}
\usage{
PM_compare(..., icen = "median", outeq = 1, plot = FALSE)
}
\arguments{
\item{...}{\link{PM_result} objects to compare.  See details.}

\item{icen}{Can be either "median" for the predictions based on medians of
\code{pred.type} parameter value distributions, or "mean".  Default is "median".}

\item{outeq}{Number of the output equation to compare; default is 1.}

\item{plot}{Boolean indicating whether to generate and open the comparison report; default is FALSE}
}
\value{
A highlighted table comparing the selected models with the following columns. In each metric column,
the best value is highlighted in red. In the final best column, the red highlighting applies to the model
with the most "best" metrics. For bias, imprecision, and regression intercept, the best value is the one closest to zero.
For regression slope and R-squared, the best value is the one closest to 1. For -2*LL, AIC, and BIC, the best value is the lowest.
\itemize{
\item \strong{run} The run number of the data
\item \strong{nvar} Number of random parameters in the model
\item \strong{converged} Boolean value if convergence occurred.
\item \strong{-2*ll} Final cycle -2*Log-likelihood
\item One of the following, depending on the option set in \link{setPMoptions}:
\itemize{
\item \strong{aic} Final cycle Akaike Information Criterion OR
\item \strong{bic} Final cycle Bayesian (Schwartz) Information Criterion
}
\item \strong{popBias} Bias, calculated by the method set in \link{setPMoptions}, of the predictions based on \code{icen} population parameters
\item \strong{popImp} Imprecision, calculated by the method set in \link{setPMoptions}, of the predictions based on \code{icen} population parameters
\item \strong{postBias} Bias, calculated by the method set in \link{setPMoptions}, of the predictions based on \code{icen} posterior parameters
\item \strong{postImp} Imprecision, calculated by the method set in \link{setPMoptions}, of the predictions based on \code{icen} posterior parameters
\item \strong{popInt} Intercept of observed vs. population predicted values regression
\item \strong{postInt} Intercept of observed vs. posterior predicted values regression
\item \strong{popSl} Slope of observed vs. population predicted values regression
\item \strong{postSl} Slope of observed vs. posterior predicted values regression
\item \strong{popR2} R-squared of observed vs. population predicted values regression
\item \strong{postR2} R-squared of observed vs. posterior predicted values regression
\item \strong{pval} P-value for each model compared to the first. See details.
\item \strong{best} Number of times each model was the best (lowest) in the above bias/imprecision, likelihood, and regression metrics.
}
}
\description{
\verb{ r lifecycle::badge("stable")}

Compare convergence, -2*log likelihood, AIC/BIC, bias,
imprecision, and regression statistics of population and posterior predictions.
Additionally, compare distributions of support points between models (see details)
}
\details{
Objects can be specified separated by commas, e.g. \code{PM_compare(run1, run2, run3)}.
P-values are based on comparison using the nearest neighbors
approach if all models are non-parametrics.  Models may only be compared on
parameters that are included in the first model.  The P-value is the
comparison between each model and the first model in
the list.  Missing P-values are when a model has no parameter names
in common with the first model, and for the first model compared to itself.
Significant P-values indicate
that the null hypothesis should be rejected, i.e. the joint distributions
between the two compared models for that parameter are significantly different.
}
\seealso{
\link{PM_load}
}
\author{
Michael Neely
}
