% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mixing_ability.R
\name{fitGMASMA}
\alias{fitGMASMA}
\title{Fit GMA-SMA models}
\usage{
fitGMASMA(
  formFix,
  data,
  listZ,
  pkg = "lme4",
  listVCov,
  contrasts = NULL,
  REML = TRUE,
  ...
)
}
\arguments{
\item{formFix}{formula whose right-hand side should only include the fixed effects, the random effects being deduced based on the names of \code{"listZ"}}

\item{data}{data frame; missing data will be removed}

\item{listZ}{named list of design matrices for the random effects; its names should be \code{"GMA"} (compulsory) and, optionally, one of \code{"SMA"}, \code{"SMA_ij"} or \code{"SMA_ii"}}

\item{pkg}{package used to fit the model among lme4, MM4LMM, TMB, INLA and breedR; lme4 and INLA do not use \code{"listVCov"}; breedR does not use \code{"contrasts"}}

\item{listVCov}{named list of variance-covariance matrices for the random effects; the names of this list should be the same as the names of \code{"listZ"}}

\item{contrasts}{see \code{\link[stats:model.matrix]{stats::model.matrix()}}}

\item{REML}{logical}

\item{...}{additional arguments specific to each package}
}
\value{
depends on the chosen package
}
\description{
Fits GMA-SMA models.
}
\examples{
## see the first and second vignettes
}
\seealso{
\code{\link{mkZGMA}}, \code{\link{mkZSMA}}
}
\author{
Timothee Flutre
}
