% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/complex-models.R
\name{spacetime}
\alias{spacetime}
\title{Ngme space-time non-separable model specification}
\usage{
spacetime(
  mesh,
  lambda = 1,
  alpha = 2,
  cc = 1,
  kappa = 1,
  fix_gamma = FALSE,
  theta_gamma_x = 0,
  theta_gamma_y = 0,
  shared_theta_gamma = FALSE,
  B_gamma_x = matrix(1, nrow = mesh[[2]]$n, ncol = 1),
  B_gamma_y = matrix(1, nrow = mesh[[2]]$n, ncol = 1),
  B_gamma_x_list = NULL,
  B_gamma_y_list = NULL,
  stabilization = TRUE
)
}
\arguments{
\item{mesh}{A list of two objects:
\itemize{
  \item mesh_t - The temporal mesh
  \item mesh_s - The spatial mesh
}}

\item{lambda}{The spatial damping parameter.}

\item{alpha}{2 or 4, SPDE smoothness parameter.}

\item{cc}{Parameter c in the SPDE.}

\item{kappa}{Kappa parameter from Matern SPDE.}

\item{fix_gamma}{TRUE if fix gamma (advection term), FALSE if estimate gamma.}

\item{theta_gamma_x}{The x component of the advection term: \code{gamma_x = B_gamma_x \%*\% theta_gamma_x}.}

\item{theta_gamma_y}{The y component of the advection term: \code{gamma_y = B_gamma_y \%*\% theta_gamma_y}.}

\item{shared_theta_gamma}{TRUE if share the same theta_gamma for all time nodes. (theta_gamma_x and theta_gamma_y will be the same)}

\item{B_gamma_x}{The design matrix for the x component of the advection term.}

\item{B_gamma_y}{The design matrix for the y component of the advection term.}

\item{B_gamma_x_list}{A list of design matrices for the x component of the advection term on every time node, length(B_gamma_x_list) == nt-1.}

\item{B_gamma_y_list}{A list of design matrices for the y component of the advection term on every time node, length(B_gamma_y_list) == nt-1.}

\item{stabilization}{TRUE if using a stabilization term (for implicit Euler).}
}
\value{
ngme_operator object.
}
\description{
Implements a non-separable space-time model based on the advection-diffusion SPDE with first-order derivative in time.
The model combines temporal and spatial components through a finite difference method (implicit Euler) for temporal discretization
and finite element method (continuous Galerkin) for spatial discretization. When advection dominates diffusion,
the "Streamline Diffusion" stabilization technique is applied.
}
\details{
The model is particularly useful for large space-time datasets in environmental science, offering computationally
efficient methods for parameter estimation, kriging prediction, and conditional simulations.

For details, see \doi{10.1016/j.spasta.2024.100847}
}
