[R] Derivative of a function

Gabor Grothendieck ggrothendieck at gmail.com
Thu Jun 30 03:42:30 CEST 2011


On Wed, Jun 29, 2011 at 4:35 PM, Lisa <lisajca at 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



More information about the R-help mailing list