% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/EM_SREG.R
\name{EM.SREG}
\alias{EM.SREG}
\title{EM-SREG Imputation Method}
\usage{
EM.SREG(
  X,
  PC.nb = 1,
  initial.values = NA,
  precision = 0.01,
  max.iter = 1000,
  change.factor = 1,
  simplified.model = FALSE,
  type = c("EM-SREG", "EM-bSREG")
)
}
\arguments{
\item{X}{A data frame or matrix with genotypes in rows and environments in columns.}

\item{PC.nb}{Number of principal components to be used. Default is 1.}

\item{initial.values}{(optional) Initial values for missing cells. If NA, 
initial values are obtained from column means (environment effects).}

\item{precision}{Convergence threshold. Default is 0.01.}

\item{max.iter}{Maximum number of iterations. Default is 1000.}

\item{change.factor}{Step size for updating missing values (standard is 1).}

\item{simplified.model}{Logical. If TRUE, effects are only calculated in the first iteration.}

\item{type}{Method type: "EM-SREG" (Standard), "EM-bSREG" (Bayesian).}
}
\value{
A list containing:
\itemize{
  \item \code{X}: The imputed matrix.
  \item \code{iter}: The number of iterations until convergence.
}
}
\description{
Iterative algorithm to impute missing values in two-way tables 
  using the Sites Regression (SREG) model. It supports several variants 
  including standard SVD and Bayesian PCA.
}
\references{
Angelini, J., Cervigni, G. D. L., & Quaglino, M. B. (2024). \emph{New 
imputation methodologies for genotype-by-environment data: an extensive 
study of properties of estimators}. Euphytica, 220(6), 92. 
\doi{10.1007/s10681-024-03344-z}
}
\keyword{internal}
