% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.R
\name{compare}
\alias{compare}
\title{Compare Two Norm Models Visually}
\usage{
compare(
  model1,
  model2,
  percentiles = c(0.025, 0.1, 0.25, 0.5, 0.75, 0.9, 0.975),
  age = NULL,
  score = NULL,
  weights = NULL,
  title = NULL,
  subtitle = NULL
)
}
\arguments{
\item{model1}{First model object (distribution free, beta-binomial, or shash)}

\item{model2}{Second model object (distribution free, beta-binomial, or shash)}

\item{percentiles}{Vector with percentile scores, ranging from 0 to 1 (exclusive)}

\item{age}{Optional vector with manifest age or group values}

\item{score}{Optional vector with manifest raw score values}

\item{weights}{Optional vector with manifest weights}

\item{title}{Custom title for plot (optional)}

\item{subtitle}{Custom subtitle for plot (optional)}
}
\value{
A ggplot object showing the comparison of both models
}
\description{
This function creates a visualization comparing two norm models by displaying
their percentile curves. The first model is shown with solid lines, the second
with dashed lines. If age and score vectors are provided, manifest percentiles
are displayed as dots. The function works with regular cnorm models, beta-binomial
models, and shash models, allowing comparison between different model types.
}
\examples{
\dontrun{
# Compare different types of models
model1 <- cnorm(group = elfe$group, raw = elfe$raw)
model2 <- cnorm.betabinomial(elfe$group, elfe$raw)
model3 <- cnorm.shash(elfe$group, elfe$raw)

# Compare traditional cnorm with shash
compare(model1, model3, age = elfe$group, score = elfe$raw)

# Compare beta-binomial with shash
compare(model2, model3, age = elfe$group, score = elfe$raw)
}

}
\seealso{
Other plot:
\code{\link[=plot.cnorm]{plot.cnorm()}},
\code{\link[=plot.cnormBetaBinomial]{plot.cnormBetaBinomial()}},
\code{\link[=plot.cnormBetaBinomial2]{plot.cnormBetaBinomial2()}},
\code{\link[=plotDensity]{plotDensity()}},
\code{\link[=plotDerivative]{plotDerivative()}},
\code{\link[=plotNorm]{plotNorm()}},
\code{\link[=plotNormCurves]{plotNormCurves()}},
\code{\link[=plotPercentileSeries]{plotPercentileSeries()}},
\code{\link[=plotPercentiles]{plotPercentiles()}},
\code{\link[=plotRaw]{plotRaw()}},
\code{\link[=plotSubset]{plotSubset()}}
}
\concept{plot}
