% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ild_plot.R
\name{ild_plot_predicted_trajectory}
\alias{ild_plot_predicted_trajectory}
\title{Observed and fitted values vs time (trajectory overlay)}
\usage{
ild_plot_predicted_trajectory(
  fit,
  time_var = c(".ild_time_num", ".ild_seq"),
  max_ids = 20L,
  seed = 42L,
  facet_by = NULL
)
}
\arguments{
\item{fit}{Model from [ild_lme()] or [ild_brms()] (must carry `ild_data`).}

\item{time_var}{`.ild_time_num` or `.ild_seq` (default first of these in [match.arg()]).}

\item{max_ids, seed}{Passed through for subsampling persons.}

\item{facet_by}{Optional column name in `ild_data` for [ggplot2::facet_wrap()].}
}
\value{
A `ggplot` object.
}
\description{
Uses [augment_ild_model()] or [ild_augment()] on the fitted object and plots
two lines per person (observed vs fitted) against `time_var`. For a scatter of
observed vs fitted, use [ild_plot()] with `type = "fitted"`.
}
