% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/predict.R
\name{fitted.dcvar_model_fit}
\alias{fitted.dcvar_model_fit}
\alias{fitted.dcvar_multilevel_fit}
\alias{fitted.dcvar_multilevel_tv_fit}
\alias{fitted.dcvar_sem_fit}
\alias{fitted.dcvar_tv_fit}
\title{Fitted values from a copula VAR model}
\usage{
\method{fitted}{dcvar_model_fit}(object, type = c("link", "response"), ...)

\method{fitted}{dcvar_multilevel_fit}(object, type = c("link", "response"), ...)

\method{fitted}{dcvar_multilevel_tv_fit}(object, type = c("link", "response"), ...)

\method{fitted}{dcvar_sem_fit}(object, type = c("link", "response"), ...)

\method{fitted}{dcvar_tv_fit}(object, type = c("link", "response"), ...)
}
\arguments{
\item{object}{A fitted model object.}

\item{type}{Character; \code{"link"} (default) returns values on the model's
internal scale (standardized if applicable), \code{"response"} back-transforms
to the original data scale.}

\item{...}{Additional arguments (unused).}
}
\value{
A data frame of posterior-mean fitted values. Single-level fits
return columns \code{time} plus one column per modeled variable. Multilevel
fits additionally include \code{unit}. SEM fits return either latent-state
columns (\code{type = "link"}) or observed-indicator columns
(\code{type = "response"}).
}
\description{
Returns the one-step-ahead fitted values (posterior mean of y_hat) from the
VAR(1) component. For single-level fits (constant, dynamic, HMM, covariate)
this is the mean-centered form \code{y_hat[t] = mu + Phi * (y[t-1] - mu)}.
}
\details{
If the model was fit with \code{standardize = TRUE} (the default), fitted values
are on the standardized (z-scored) scale by default. Use \code{type = "response"}
to back-transform to the original data scale.

\code{fitted()} and \code{predict()} are implemented for the public fit classes. For
multilevel fits, the methods return unit-specific trajectories; because the
data are already person-mean-centered, the link-scale fitted values apply the
unit's VAR matrix to the previous observation with no \code{mu} term
(\code{y_hat[t] = Phi_unit \%*\% y[t-1]}), and the person mean is re-added only for
\code{type = "response"}. For SEM fits, \code{type = "link"}
returns latent-state summaries and \code{type = "response"} returns observed
indicator-scale summaries.
}
