% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/transition_matrix.R
\name{transition_matrix}
\alias{transition_matrix}
\title{Compute state transition probability matrix for a given lag}
\usage{
transition_matrix(x, n_s = 15, lag = 1)
}
\arguments{
\item{x}{Numeric vector, the time series.}

\item{n_s}{Integer, number of states (quantile bins). Default 15.}

\item{lag}{Integer, lag order for transition. Default 1.}
}
\value{
A matrix of dimension n_s x n_s with row-wise transition probabilities.
}
\description{
Compute state transition probability matrix for a given lag
}
\examples{
x <- arima.sim(model = list(ar = 0.5), n = 1000)
P <- transition_matrix(x, n_s = 15, lag = 1)
}
