For finding the root of the following function I have been using 'uniroot':
f(p) = log(p-1) - log(p) + 1/(p-1) - log(A) - B = 0 where 'p' is a scalar. However, I will have to find this root repeatedly, so I would like to suggest a starting value, which is not possible with 'uniroot'. 'nlm' allows the use of starting values, so I have been thinking of applying 'nlm' to abs(f(p)). Is that the way to go or is there a better way I don't know about? Thanks for your help, Alejandro ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
