# HARK.estimation¶

Functions for estimating structural models, including optimization methods and bootstrapping tools.

Functions

 bootstrapSampleFromData(data[, weights, seed]) Samples rows from the input array of data, generating a new data array with an equal number of rows (records). main() minimizeNelderMead(objectiveFunction, …[, …]) Minimizes the objective function using the Nelder-Mead simplex algorithm, starting from an initial parameter guess. minimizePowell(objectiveFunction, …[, verbose]) Minimizes the objective function using a derivative-free Powell algorithm, starting from an initial parameter guess.
HARK.estimation.bootstrapSampleFromData(data, weights=None, seed=0)

Samples rows from the input array of data, generating a new data array with an equal number of rows (records). Rows are drawn with equal probability by default, but probabilities can be specified with weights (must sum to 1).

Parameters: data : np.array An array of data, with each row representing a record. weights : np.array A weighting array with length equal to data.shape. seed : int A seed for the random number generator. new_data : np.array A resampled version of input data.
HARK.estimation.minimizeNelderMead(objectiveFunction, parameter_guess, verbose=False, **kwargs)

Minimizes the objective function using the Nelder-Mead simplex algorithm, starting from an initial parameter guess.

Parameters: objectiveFunction : function The function to be minimized. It should take only a single argument, which should be a list representing the parameters to be estimated. parameter_guess : [float] A starting point for the Nelder-Mead algorithm, which must be a valid input for objectiveFunction. verbose : boolean A flag for the amount of output to print. xopt : [float] The values that minimize objectiveFunction.
HARK.estimation.minimizePowell(objectiveFunction, parameter_guess, verbose=False)

Minimizes the objective function using a derivative-free Powell algorithm, starting from an initial parameter guess.

Parameters: objectiveFunction : function The function to be minimized. It should take only a single argument, which should be a list representing the parameters to be estimated. parameter_guess : [float] A starting point for the Powell algorithm, which must be a valid input for objectiveFunction. verbose : boolean A flag for the amount of output to print. xopt : [float] The values that minimize objectiveFunction.