At this time scalecheck does NOT take account of masks. (?? should 110702)
scalecheck(par, lower = lower, upper = upper, bdmsk=NULL, dowarn = TRUE)
# Returns: # list(lpratio, lbratio) -- the log of the ratio of largest to smallest parameters # and bounds intervals (upper-lower) in absolute value (ignoring Inf, NULL, NA)
NOTE: Free paramters outside bounds are adjusted to the nearest bound. We then set parchanged = TRUE which implies the original parameters were infeasible.
There is a check if lower and upper bounds are very close together, in which case a mask is imposed and maskadded is set TRUE. NOTE: it is generally a VERY BAD IDEA to have bounds close together in optimization, but here we use a tolerance based on the double precision machine epsilon. Thus it is not a good idea to rely on scalecheck() to test if bounds constraints are well-posed.