% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/initialize_parameters.R
\name{initialize_parameters}
\alias{initialize_parameters}
\title{Initialize parameters for factor model estimation}
\usage{
initialize_parameters(model_system, data, factor_scores = NULL, verbose = TRUE)
}
\arguments{
\item{model_system}{A model_system object from define_model_system()}

\item{data}{Data frame containing all variables}

\item{factor_scores}{Optional matrix of factor scores (nobs x n_factors). When provided,
factor loadings are estimated by including factor scores as regressors in the
initialization regressions. This is useful for two-stage estimation where factor
scores from Stage 1 can be used to initialize loadings in Stage 2 outcomes.}

\item{verbose}{Whether to print progress (default TRUE)}
}
\value{
List with:
\itemize{
\item \code{init_params} - Initial parameter values
\item \code{factor_variance_fixed} - Logical vector indicating which factor variances must be fixed
}
}
\description{
Estimates each model component separately in R (ignoring factors) to obtain
good starting values. Also checks factor identification.
}
\details{
Factor identification: For each factor, if NO component has a non-zero fixed loading,
then the factor variance is not identified and must be fixed to 1.0.

When \code{factor_scores} is provided, the initialization will estimate loadings by
treating factor scores as additional regressors. For example, for a linear model:
\code{Y ~ X + factor_scores} and the coefficients on factor_scores become the loading
estimates. This typically provides better starting values than the default (0.5).
}
