I am running the ds() function about 1000 times as part of a simulation study. It works fine for many of the simulated datasets, however, I have noticed that occasionally it gets stuck (stays like this for > 10 hours and then R crashes) at this point:
Fitting half-normal key function
AIC= 331.062
Fitting half-normal key function with cosine(2) adjustments
AIC= 333.062
Half-normal key function selected.
Is it failing to converge? If so is there a way to have it stop if there is no convergence?
Here is my ds function for context: ds(data = data, key = c("hn","hr","unif"), adjustment = c("cos","herm","poly"), region_table = region_table, sample_table = sample_table, obs_table = obs_table, initial_values = NULL)