On Wed, Jun 29, 2011 at 4:35 PM, Lisa <lisa...@gmail.com> wrote: > Yes. I need to do implicit differentiation. After rearrangement, I got > > (x2 – x1) * b = log(1 / y - 1) > > Take derivative of both sides with respect to y, I have > > (x2 – x1) * b’[y] = - 1/y(1-y) > > Since both (x2 – x1) and b’[y] are vectors, I cannot move (x2 – x1) to > RHS. This is why I posted my question here to see if there is some R > functions or some idea that can help me solve this problem. Thanks. >
I am not sure if this counts as an approach that you are trying to exclude but: db[i]/dy = { dlogit(y)/dy } / { dlogit(y)/db[i] } = { 1/{y(1-y)} / { x1[i] - x2[i] } The numerator is taken from your calculation and the denominator is from linearity. -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.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.