Public documentation

Contents

Index

Public interface

GEEBRA.estimating_function_templateType
estimating_function_template(nobs::Function, ef_contribution::Function)

Define an estimating_function_template by supplying:

  • nobs: a function of data that computes the number of observations of the particular data type,
  • ef_contribution: a function of the parameters theta, the data and the observation index i that returns a vector of length length(theta).
source
GEEBRA.get_estimating_functionFunction
get_estimating_function(data::Any, template::estimating_function_template, br::Bool = false)

Construct the estimating function by adding up all contributions in the data according to estimating_function_template. If br = true then automatic differentiation is used to compute the empirical bias-reducing adjustments and add them to the estimating function. The result is a function that stores the estimating functions values at its second argument, in a preallocated vector passed as its first argument, ready to be used withing NLsolve.nlsolve.

source
GEEBRA.estimating_functionFunction
estimating_function(theta::Vector, data::Any, template::estimating_function_template, br::Bool = false)

Construct the estimating function by adding up all contributions in the data according to estimating_function_template, and evaluate it at theta. If br = true then automatic differentiation is used to compute the empirical bias-reducing adjustments and add them to the estimating function.

source
GEEBRA.objective_function_templateType
objective_function_template(nobs::Function, obj_contribution::Function)

Define an objective_function_template by supplying:

  • nobs: a function of data that computes the number of observations of the particular data type,
  • obj_contribution: a function of the parameters theta, the data and the observation index i that returns a real.
source
GEEBRA.objective_functionFunction
objective_function(theta::Vector, data::Any, template::objective_function_template, br::Bool = false)

Construct the objective function by adding up all contributions in the data according to objective_function_template, and evaluate it at theta. If br = true then automatic differentiation is used to compute the empirical bias-reducing penalty and add it to the objective function.

source
StatsBase.fitMethod
fit(template::objective_function_template, data::Any, theta::Vector; estimation_method::String = "M", br_method::String = "implicit_trace", optim_method = LBFGS(), optim_options = Optim.Options())

Fit an objective_function_template on data using M-estimation (keyword argument estimation_method = "M"; default) or RBM-estimation (reduced-bias M estimation; Kosmidis & Lunardon, 2020; keyword argument estimation_method = "RBM"). Bias reduction is either through the maximization of the bias-reducing penalized objective in Kosmidis & Lunardon (2020) (keyword argument br_method = "implicit_trace"; default) or by subtracting an estimate of the bias from the M-estimates (keyword argument br_method = "explicit_trace"). The bias-reducing penalty is constructed internally using automatic differentiation (using the ForwardDiff package), and the bias estimate using a combination of automatic differentiation (using the ForwardDiff package) and numerical differentiation (using the FiniteDiff package).

The maximization of the objective or the penalized objective is done using the Optim package. Optimization methods and options can be supplied directly through the keyword arguments optim_method and optim_options, respectively. optim_options expects an object of class Optim.Options. See the Optim documentation for more details on the available options.

source
StatsBase.fitMethod
fit(template::estimating_function_template, data::Any, theta::Vector; estimation_method::String = "M", br_method::String = "implicit_trace", nlsolve_arguments...)

Fit an estimating_function_template on data using M-estimation (keyword argument estimation_method = "M"; default) or RBM-estimation (reduced-bias M estimation; Kosmidis & Lunardon, 2020; keyword argument estimation_method = "RBM"). Bias reduction is either through the solution of the empirically adjusted estimating functions in Kosmidis & Lunardon (2020) (keyword argument br_method = "implicit_trace"; default) or by subtracting an estimate of the bias from the M-estimates (keyword argument br_method = "explicit_trace"). The bias-reducing adjustments and the bias estimate are constructed internally using automatic differentiation (using the ForwardDiff package).

The solution of the estimating equations or the adjusted estimating equations is done using the NLsolve package. Arguments can be passed directly to NLsolve.nlsolve through keyword arguments. See the NLsolve README for more information on available options.

source