I think I have found my problem, but I dont know how to correct it. I have found an old post saying that it might be a problem if the starting values are evaluated at Inf (see link here http://r.789695.n4.nabble.com/Help-about-nlminb-function-td3089048.html)
But how can I run nlminb without the starting values being evaluated at Inf.? What I more specifically want to do, is to set C and D equal to 0 for the starting values, but to have it evaluated for Inf for the rest (C and D equal to what the function says). Does anyone have a suggestion on how to do this? Is the solution to do loops instead of vectorisation? Please help me Thanks in advance! -- View this message in context: http://r.789695.n4.nabble.com/Error-message-object-of-type-closure-is-not-subsettable-tp3752886p3764513.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.