Checks that the arguments supplied by the user are appropriate to be passed
to optim(). Used internally in parameter estimation.
check_optim(par0, method, lower, upper, choices = NULL, len = 1)par0, possibly altered via match.arg() if it is a character.
numeric or character. If numeric, it is passed to optim as the
initial estimation, i.e. the par argument. If character, the corresponding
estimation method is called and the result is passed to optim instead.
arguments passed to optim.
character. A vector of available estimation methods for the
par0 argument
integer. The appropriate length of the lower and upper
argument, as well as par if it is numeric.