I wrote some long code, which basically is to calculate a function int[vars] with Module but NonlinearModelFit doesn't recognize it! It just takes it as a constant, which is wrong. Any ideas why this is happening?
Do you have a code example or some more details on what your function does? Usually NonlinearModelFit can use almost any function you define previously or within NonlinearModelFit.
Did you hand over all relevant variables to the NonlinearModelFit-function?