Learn R Programming

SkeweDF (version 0.1.0)

global_fit_function: Global optimization of a given function given empirical data and parameter bounds

Description

This function generates a single set of optimized parameters and Psi Criterion for a given function within specified starting parameter bounds. This function uses a modified grid search method for optimization

Usage

global_fit_function(
  param_bounds,
  data,
  model_fn_name,
  iter = 1,
  weighted_rt = FALSE,
  n_cores = 1,
  clust
)

Arguments

param_bounds

A list of sequences which indicate space where parameters should be generated and fit

data

Vector of observed values

model_fn_name

Character vector indicating name of function of theoretical model to be used. For example, for Generalized_Yule(n, rho, alpha), model_fn_name <- 'Generalied Yule'

iter

Integer indicating number of iterations to run grid search. Increasing iterations will increase decimal point precision of output parameters.

weighted_rt

Boolean used to determine if the weighted right-tail cumulative distribution function should be used or not.

n_cores

Integer used to indicate number of cores to be used for this function if a socket cluster object is not defined.

clust

socket cluster object from 'parallel::makeCluster()'. This is used if you have already generated a socket cluster object and would like to run this functoin on it. If no object is defined, one will be made for this function call.