% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/apollo_makeLogLike.R
\name{apollo_makeLogLike}
\alias{apollo_makeLogLike}
\title{Creates log-likelihood function.}
\usage{
apollo_makeLogLike(
  apollo_beta,
  apollo_fixed,
  apollo_probabilities,
  apollo_inputs,
  apollo_estSet = list(estimationRoutine = "bgw"),
  cleanMemory = FALSE
)
}
\arguments{
\item{apollo_beta}{Named numeric vector. Names and values for parameters.}

\item{apollo_fixed}{Character vector. Names (as defined in \code{apollo_beta}) of parameters whose value should not change during estimation.}

\item{apollo_probabilities}{Function. Returns probabilities of the model to be estimated. Must receive three arguments:
\itemize{
  \item \strong{\code{apollo_beta}}: Named numeric vector. Names and values of model parameters.
  \item \strong{\code{apollo_inputs}}: List containing options of the model. See \link{apollo_validateInputs}.
  \item \strong{\code{functionality}}: Character. Can be either \strong{\code{"components"}}, \strong{\code{"conditionals"}}, \strong{\code{"estimate"}} (default), \strong{\code{"gradient"}}, \strong{\code{"output"}}, \strong{\code{"prediction"}}, \strong{\code{"preprocess"}}, \strong{\code{"raw"}}, \strong{\code{"report"}}, \strong{\code{"shares_LL"}}, \strong{\code{"validate"}} or \strong{\code{"zero_LL"}}.
}}

\item{apollo_inputs}{List grouping most common inputs. Created by function \link{apollo_validateInputs}.}

\item{apollo_estSet}{List of estimation options. It must contain at least one element called
estimationRoutine defining the estimation algorithm. See \link{apollo_estimate}.}

\item{cleanMemory}{Logical. If TRUE, then \code{apollo_inputs$draws} and \code{apollo_inputs$database} are erased
throughout the calling stack. Used to reduce memory usage in case of multithreading and a large
database or number o draws.}
}
\value{
apollo_logLike function.
}
\description{
Creates log-likelihood function from the likelihood function apollo_probabilities provided by the user.
}
\details{
Internal use only. Called by \code{apollo_estimate} before estimation.
The returned function can be single-threaded or multi-threaded based on the model options.
}
