Re: [R] Obtaining a derivative of nls() SSlogis function

2011-11-19 Thread Katrina Bennett
Thank you to all who have made great suggestions. Both Gabor and David's methods work well for me. I see now where I was going wrong with this, I wasn't loading it to a function. I also did not know expression could be used in that way. Thank you very much for your help! Katrina On Fri, Nov 18,

Re: [R] Obtaining a derivative of nls() SSlogis function

2011-11-18 Thread Gabor Grothendieck
On Thu, Nov 17, 2011 at 4:40 PM, Katrina Bennett wrote: > Hello, I am wondering if someone can help me. I have the following function > that I derived using nls() SSlogis. I would like to find its derivative. I > thought I had done this using deriv(), but for some reason this isn't > working out f

Re: [R] Obtaining a derivative of nls() SSlogis function

2011-11-18 Thread John C Nash
I think you need to make an expression. I tried > nls.fn <- asym/((1+exp((xmid-x.seq)/scal))) Error: object 'asym' not found > nls.fn <- expression(asym/((1+exp((xmid-x.seq)/scal > D(nls.fn,"asym") 1/((1 + exp((xmid - x.seq)/scal))) > Does that help? Maybe there are other approaches too. JN

Re: [R] Obtaining a derivative of nls() SSlogis function

2011-11-18 Thread David Winsemius
On Nov 17, 2011, at 4:40 PM, Katrina Bennett wrote: Hello, I am wondering if someone can help me. I have the following function that I derived using nls() SSlogis. I would like to find its derivative. I thought I had done this using deriv(), but for some reason this isn't working out for me