psi_criterion_function: Psi Criterion given a function
Description
This function generates the Psi Criterion goodness of fit value given an empirical distribution. The function and parameters are given, as well as desired weight of pmf and use of the weighted right-tail cumulative distribution function.
Vector of parameters for model_fn, not including n. For example, for Generalized_Yule(n, rho, alpha), params will be c(rho, alpha)
data
Vector of observed values
model_fn
Function of theoretical model to be used. For example, for Generalized_Yule(n, rho, alpha), model_fn <- Generalied_Yule
pmf_weight
Numeric of weight given to probability mass function for generation of Psi Criterion. For example, if pmf_weight <- 0.5, 50 percent of the Psi Criterion value will be attributed to the probability mass function while the other 50 percent will be attributed to the right-tail cumulative distribution function.
weighted_rt
Boolean used to determine if the weighted right-tail cumulative distribution function should be used or not.
left_trunc
Int used to determine starting index of model to use for optimization
right_trunc
Int used to determine ending index of model to use for optimization