[R] Obtain gradient at multiple values for exponential decay model

S Ellison S@E|||@on @end|ng |rom LGCGroup@com
Fri Apr 6 15:59:58 CEST 2018


> coef(graphmodeld)
>    (Intercept) graphdata[, 1]
>    4.513544204   -0.006820623
> 
> This corresponds to the linear model but it is still not understood how this helps
> to determine gradients at specific points for the exponential model.

You have fitted log(y) against x. Your fitted linear model is therefore 
log(y) = 4.5135 - 0.00682x

From there:
- do the basic algebra to get y in terms of x
- differentiate analytically to get dy/dx as a function of x.
- write that calculation in R to get your gradients at any value of x.

Or you could get R to give you the differential function from your function for y; see ?D

S Ellison




*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}




More information about the R-help mailing list