Displaying 11 results from an estimated 11 matches for "graphmodelp".
Did you mean:
graphmodeld
2018 Apr 05
4
Obtain gradient at multiple values for exponetial decay model
...Sent: Thursday, April 05, 2018 at 4:40 PM
> From: "Jeff Newmiller" <jdnewmil at 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...
2018 Apr 05
2
Obtain gradient at multiple values for exponetial decay model
Readers,
Data set:
t,c
0,100
40,78
80,59
120,38
160,25
200,21
240,16
280,12
320,10
360,9
400,7
graphdata<-read.csv('~/tmp/data.csv')
graphmodeld<-lm(log(graphdata[,2])~graphdata[,1])
graphmodelp<-exp(predict(graphmodeld))
plot(graphdata[,2]~graphdata[,1])
lines(graphdata[,1],graphmodelp)
Please what is the function and syntax to obtain gradient values for the model curve at various requested values, e.g.:
when graphdata[,1] at values = 100, 250, 350 ?
2018 Apr 06
3
Obtain gradient at multiple values for exponential decay model
...alized that this would not work in the context of your construction. I had earlier made a more symbolic version using R formulae:
graphdata<-read.csv(text='t,c
0,100
40,78
80,59
120,38
160,25
200,21
240,16
280,12
320,10
360,9
400,7')
graphmodeld<-lm(log(c)~t, graphdata)
graphmodelp<-exp(predict(graphmodeld))
plot(c~t, graphdata)
lines(graphdata[,1],graphmodelp)
myNumDeriv(c(100, 250, 350), graphmodeld )
#----------------------------------------------
1 2 3
-0.31464102 -0.11310753 -0.05718414
>
>
>
> David Winsemius
> A...
2018 Apr 07
0
Obtain gradient at multiple values for exponential decay model
...stion to try it out in this case:
################# reprex (see reprex package)
graphdta <- read.csv( text =
"t,c
0,100
40,78
80,59
120,38
160,25
200,21
240,16
280,12
320,10
360,9
400,7
", header = TRUE )
nd <- c( 100, 250, 300 )
graphmodeld <- lm( log(c) ~ t, data = graphdta )
graphmodelplin <- predict( graphmodeld
, newdata = data.frame( t = nd )
)
graphmodelp <- exp(graphmodelplin)
graphmodelp
#> 1 2 3
#> 46.13085 16.58317 11.79125
# derivative of exp( a + b*t ) is b * exp( a + b*t )
graphmodeldpd...
2018 Apr 05
0
Obtain gradient at multiple values for exponetial decay model
...gmx.com> wrote:
>Readers,
>
>Data set:
>
>t,c
>0,100
>40,78
>80,59
>120,38
>160,25
>200,21
>240,16
>280,12
>320,10
>360,9
>400,7
>
>graphdata<-read.csv('~/tmp/data.csv')
>graphmodeld<-lm(log(graphdata[,2])~graphdata[,1])
>graphmodelp<-exp(predict(graphmodeld))
>plot(graphdata[,2]~graphdata[,1])
>lines(graphdata[,1],graphmodelp)
>
>Please what is the function and syntax to obtain gradient values for
>the model curve at various requested values, e.g.:
>
>when graphdata[,1] at values = 100, 250, 350 ?
>...
2018 Apr 06
0
Obtain gradient at multiple values for exponetial decay model
...From: "Jeff Newmiller" <jdnewmil at 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.32...
2018 Apr 06
0
Obtain gradient at multiple values for exponetial decay model
...m: "Jeff Newmiller" <jdnewmil at 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
Should have been:
coef(graphmodelp)
>
> 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.2446...
2018 Apr 06
2
Obtain gradient at multiple values for exponential decay model
> Sent: Friday, April 06, 2018 at 4:53 AM
> From: "Jeff Newmiller" <jdnewmil at dcn.davis.ca.us>
> To: "g l" <gnulinux at gmx.com>
> coef( graphmodeld )
>
coef(graphmodelp)
Error: $ operator is invalid for atomic vectors
A quick search engine query revealed primarily references to the dollar sign ($) operator which does not seem relevant to this question.
2018 Apr 06
0
Obtain gradient at multiple values for exponential decay model
> On Apr 6, 2018, at 3:43 AM, g l <gnulinux at gmx.com> wrote:
>
>> Sent: Friday, April 06, 2018 at 5:55 AM
>> From: "David Winsemius" <dwinsemius at comcast.net>
>>
>>
>> Not correct. You already have `predict`. It is capale of using the `newdata` values to do interpolation with the values of the coefficients in the model. See:
2018 Apr 06
2
Obtain gradient at multiple values for exponential decay model
> Sent: Friday, April 06, 2018 at 5:55 AM
> From: "David Winsemius" <dwinsemius at comcast.net>
>
>
> Not correct. You already have `predict`. It is capale of using the `newdata` values to do interpolation with the values of the coefficients in the model. See:
>
> ?predict
>
The ? details did not mention interpolation explicity; thanks.
> The
2018 Apr 06
0
Obtain gradient at multiple values for exponential decay model
...6, 2018 3:30:10 AM PDT, g l <gnulinux at gmx.com> wrote:
>> Sent: Friday, April 06, 2018 at 4:53 AM
>> From: "Jeff Newmiller" <jdnewmil at dcn.davis.ca.us>
>> To: "g l" <gnulinux at gmx.com>
>> coef( graphmodeld )
>>
>
>coef(graphmodelp)
>Error: $ operator is invalid for atomic vectors
>
>A quick search engine query revealed primarily references to the dollar
>sign ($) operator which does not seem relevant to this question.