Splits data, creates cluster and loads different pieces of the database on each worker.
apollo_makeCluster(
apollo_probabilities,
apollo_inputs,
silent = FALSE,
cleanMemory = FALSE
)
Cluster (i.e. an object of class cluster from package parallel)
Function. Returns probabilities of the model to be estimated. Must receive three arguments:
apollo_beta
: Named numeric vector. Names and values of model parameters.
apollo_inputs
: List containing options of the model. See apollo_validateInputs.
functionality
: Character. Can be either "components"
, "conditionals"
, "estimate"
(default), "gradient"
, "output"
, "prediction"
, "preprocess"
, "raw"
, "report"
, "shares_LL"
, "validate"
or "zero_LL"
.
List grouping most common inputs. Created by function apollo_validateInputs.
Boolean. If TRUE, no messages are printed to the terminal. FALSE by default. It overrides apollo_inputs$silent
.
Boolean. If TRUE, it saves apollo_inputs to disc, and removes database and draws from the apollo_inputs in .GlobalEnv and the parent environment.
Internal use only. Called by apollo_estimate
before estimation. Using multiple cores greatly increases memory consumption.