[R] Obtain gradient at multiple values for exponetial decay model
Jeff Newmiller
jdnewm|| @end|ng |rom dcn@d@v|@@c@@u@
Fri Apr 6 04:53:08 CEST 2018
Try
coef( graphmodeld )
And you don't need to approximate if you use the newdata argument to the predict function.
I think reading the "Introduction to R" that comes with R would help.
--
Sent from my phone. Please excuse my brevity.
On April 5, 2018 2:00:45 PM PDT, g l <gnulinux using gmx.com> wrote:
>> Sent: Thursday, April 05, 2018 at 4:40 PM
>> From: "Jeff Newmiller" <jdnewmil using dcn.davis.ca.us>
>>
>> the coef function.
>>
>
>For the benefit of other novices, used the following command to read
>the documentation:
>
>?coef
>
>Then tried and obtained:
>
>> cvalue100<-coef(graphmodelp~100)
>> cvalue100
>NULL
>
>Then looked at the model values which of course correspond to original
>non-modelled values.
>
>graphmodelp
>1 2 3 4 5 6 7 8
>
>91.244636 69.457794 52.873083 40.248368 30.638107 23.322525 17.753714
>13.514590
> 9 10 11
>10.287658 7.831233 5.961339
>
>This prompted to think that interpolation is required, but the function
>'approx' only seems to perform constant interpolation.
>
>Is the correct thinking to find a function to perform interpolation,
>then find/write a function to differentiate the model at a specific
>value of x, to find gradient at that point?
More information about the R-help
mailing list