| maximize_log_likelihood | R Documentation |
Maximizes the log-likelihood using the
GSL
implementation of the BFGS algorithm. This function is primarily intended for
advanced usage. The estimate functionality is a fast,
analysis-oriented alternative. If the
GSL is not
available, the function returns a trivial result list with status set equal to -1.
If the
C++17
execution policies
are available, the implementation of the optimization is parallelized.
maximize_log_likelihood( object, start, step, objective_tolerance, gradient_tolerance, max_it ) ## S4 method for signature 'equilibrium_model' maximize_log_likelihood( object, start, step, objective_tolerance, gradient_tolerance, max_it )
object |
A model object. |
start |
Initializing vector. |
step |
Optimization step. |
objective_tolerance |
Objective optimization tolerance. |
gradient_tolerance |
Gradient optimization tolerance. |
max_it |
Maximum allowed number of iterations. |
A list with the optimization output.
estimate
model <- simulate_model(
"equilibrium_model", list(
# observed entities, observed time points
nobs = 500, tobs = 3,
# demand coefficients
alpha_d = -0.9, beta_d0 = 14.9, beta_d = c(0.3, -0.2), eta_d = c(-0.03, -0.01),
# supply coefficients
alpha_s = 0.9, beta_s0 = 3.2, beta_s = c(0.03), eta_s = c(0.05, 0.02)
),
seed = 99
)
# maximize the model's log-likelihood
mll <- maximize_log_likelihood(
model,
start = NULL, step = 1e-5,
objective_tolerance = 1e-4, gradient_tolerance = 1e-3, max_it = 1e+3
)
mll
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.