% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spflow_moments.R
\name{derive_spflow_moments}
\alias{derive_spflow_moments}
\alias{spflow_moment_var}
\alias{spflow_moment_cov}
\title{Compute the moment matrices used during the estimation with \code{\link[=spflow]{spflow()}}}
\usage{
derive_spflow_moments(spflow_matrices, n_o, n_d, N, wt, na_rm = FALSE)

spflow_moment_var(spflow_matrices, wt, N, n_d, n_o)

spflow_moment_cov(Y, spflow_matrices)
}
\value{
A list containing all moments required for the estimation
}
\description{
These are internal functions called within the estimation procedure
}
\details{
The implementation details are derived in
\insertCite{Dargel2021;textual}{spflow} and
\insertCite{Dargel2023;textual}{spflow}.
\subsection{The variance moment:}{

The moment (U'U) moment matrix is grouped into 4 x 4 blocks.
These 16 blocks are derived as interactions from the four sets of variables
U_alpha, U_alpha_I, U_beta, U_gamma.
Only ten blocks are unique and the remaining six are inferred by symmetry.
}

\subsection{The covariance moment:}{

The moment (U'y) is grouped into four blocks using the same arguments.
Here we can use the same function to compute the inner product of y and its
spatial lags with U.
}
}
\references{
\insertAllCited{}
}
\author{
Lukas Dargel
}
\keyword{internal}
