So I've been working on a script to calculate log likelihood based on specifically 4 parameters and put them into a particular log-lik function. That script is fine. The issue is optimizing it - whenever I try, it says that the object (for the parameter in question) can not be found. For the sake of simplicity, I will just use a much simpler script that is giving me an identical error when I use the optim() function. The funny part is that I actually pulled this script directly out of a "So I've been working on a script to calculate l