% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/complex-models.R
\name{bv_matern}
\alias{bv_matern}
\title{Ngme bivariate model with Matern sub_models}
\usage{
bv_matern(
  mesh,
  sub_models,
  theta = 0,
  rho = 0,
  sd1 = 1,
  sd2 = 1,
  group = NULL,
  share_param = FALSE,
  fix_theta = FALSE,
  ...
)
}
\arguments{
\item{mesh}{the mesh where model is defined}

\item{sub_models}{a list of sub_models (should be two matern models)}

\item{theta}{the parameter related to rotation}

\item{rho}{the parameter related to correlation}

\item{sd1}{scaling parameter for the first sub-model}

\item{sd2}{scaling parameter for the second sub-model}

\item{group}{group vector, can be inherited from ngme() function}

\item{share_param}{TRUE if share the same parameter for 2 sub_models (of same type)}

\item{fix_theta}{TRUE if the rotation parameter is fixed}

\item{...}{ignore}
}
\value{
a list of specification of model
}
\description{
Giving 2 sub_models, build a correlated bivaraite operator based on K = D(theta, eta) %*% diag(K_1, K_2)
\deqn{D(\theta, \rho) = \begin{pmatrix}
  \cos(\theta) + \rho \sin(\theta) & -\sin(\theta) \sqrt{1+\rho^2} \\
  \sin(\theta) - \rho \cos(\theta) & \cos(\theta) \sqrt{1+\rho^2}
\end{pmatrix}}
}
