almost logistic data evaluation

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

almost logistic data evaluation

PIKAL Petr
Dear all

I have several files with data like those.

> dput(temp)
temp <- structure(list(V1 = c(0L, 15L, 30L, 45L, 60L, 75L, 90L, 105L,
120L, 135L, 150L, 165L, 180L, 195L, 210L, 225L, 240L, 255L, 270L,
285L, 300L, 315L, 330L, 345L, 360L), V2 = c(98.68666667, 100.8,
103.28, 107.44, 110.06, 114.26, 117.6, 121.04, 123.8533333, 126.66,
129.98, 134.1866667, 139.04, 144.6, 152.08, 161.3, 169.8733333,
176.6133333, 181.92, 186.0266667, 188.7533333, 190.7066667, 192.0533333,
192.9933333, 193.3533333)), class = "data.frame", row.names = c(NA,
-25L))

plot(temp)

They resemble logistics curve but they do not start as flat curve but
growing curve. Can you please give me some hints how to deal with such data?
I know that it is not strictly speaking R question but maybe somebody could
give me directions how to model such data and find model parameters.

I considered stepwise regression but it is not completely satisfactory.

Thanks beforehand
Petr Pikal

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: almost logistic data evaluation

PIKAL Petr
Hallo Patrick

 

Thanks. Actually „y“ is growing temperature, which, at some point, rise more rapidly due to exothermic reaction. This reaction starts and ends and proceed with some speed (hopefully different in each material). I hope to get starting point and speed of temperature rise by evaluating shape of curves.

 

I do not think left censoring could help. As seen from data plot at first „y“ is linearly growing but logistics curve needs to start from flat (left asymptote) and end as flat (right asymptote, AFAIK). With linear growth on left site simple logistics fail to model data correctly.

 

One option could be to estimate linear part and deduct it from the data and fit simple logistics model on deducted data. If this is the only way, I will do it but I, as always, first try to ask helpful and ingenious people on this list.

 

Cheers

Petr

 

From: Patrick (Malone Quantitative) <[hidden email]>
Sent: Tuesday, June 9, 2020 2:05 PM
To: PIKAL Petr <[hidden email]>
Subject: Re: [R] almost logistic data evaluation

 

Off-list because off-topic.

 

I didn't plot your data, but took your word that "They resemble logistics curve but they do not start as flat curve but
growing curve."

 

You also didn't say what your research question is. But if you're trying to model the growth, could it be *part* of a logistic curve, with a censoring point on the left? Maybe that helps with some avenues.

 

On Tue, Jun 9, 2020 at 7:21 AM PIKAL Petr <[hidden email] <mailto:[hidden email]> > wrote:

Dear all

I have several files with data like those.

> dput(temp)
temp <- structure(list(V1 = c(0L, 15L, 30L, 45L, 60L, 75L, 90L, 105L,
120L, 135L, 150L, 165L, 180L, 195L, 210L, 225L, 240L, 255L, 270L,
285L, 300L, 315L, 330L, 345L, 360L), V2 = c(98.68666667, 100.8,
103.28, 107.44, 110.06, 114.26, 117.6, 121.04, 123.8533333, 126.66,
129.98, 134.1866667, 139.04, 144.6, 152.08, 161.3, 169.8733333,
176.6133333, 181.92, 186.0266667, 188.7533333, 190.7066667, 192.0533333,
192.9933333, 193.3533333)), class = "data.frame", row.names = c(NA,
-25L))

plot(temp)

They resemble logistics curve but they do not start as flat curve but
growing curve. Can you please give me some hints how to deal with such data?
I know that it is not strictly speaking R question but maybe somebody could
give me directions how to model such data and find model parameters.

I considered stepwise regression but it is not completely satisfactory.

Thanks beforehand
Petr Pikal
______________________________________________
[hidden email] <mailto:[hidden email]>  mailing list -- To UNSUBSCRIBE and more, see
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.



--

Patrick S. Malone, Ph.D., Malone Quantitative
NEW Service Models: http://malonequantitative.com

He/Him/His


______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: almost logistic data evaluation

Stephen Ellison
> Actually „y“ is growing temperature, which, at some point, rise more rapidly due to exothermic reaction.
> This reaction starts and ends and proceed with some speed (hopefully different in each material).

Are you applying external heating or is it solely due to reaction kinetics?


Steve E

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

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: almost logistic data evaluation

PIKAL Petr
Hi

External heating. Normally I would use TA instrumentation but for technical
reasons it is impossible. And other complicating factor is that temperature
rise is from beginning almost parabolic (it's derivation is straight line).

Therefore I started with double exponential fit, which is sometimes
satisfactory but sometimes gives nonsense result. After help from R
community I got in almost all cases reasonable fit.

However I want to concentrate on just the reaction part and to find some
more simple way how to get slope for temperature rise and maybe other
parameters related to changes in experiments.

I was advised to look at "growth curve analysis" which I will try to, but I
wonder if due to twisted data is appropriate.

Thanks.
Petr

> -----Original Message-----
> From: R-help <[hidden email]> On Behalf Of Stephen Ellison
> Sent: Tuesday, June 9, 2020 7:11 PM
> To: [hidden email]
> Subject: Re: [R] almost logistic data evaluation
>
> > Actually "y" is growing temperature, which, at some point, rise more
rapidly
> due to exothermic reaction.
> > This reaction starts and ends and proceed with some speed (hopefully
> different in each material).
>
> Are you applying external heating or is it solely due to reaction
kinetics?

>
>
> Steve E
>
> *****************************************************************
> **
> This email and any attachments are confidential. Any use...{{dropped:8}}
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: almost logistic data evaluation

Stephen Ellison

I'm not sure this is really a statistical problem, in the sense of looking for a convenient but arbitrary statistical function; to do it well is more of a physicochemical modelling problem.
I can't give you an answer but maybe a direction I'd consider if I wanted to take it seriously ...

You have a steady heat input (which is initially a straight line but becomes asymptotic as cooling rate approaches heating rate),  plus an exothermic reaction whose rate will almost certainly depend on temperature (I guess close to the usual 'double every 10K' rule of thumb for chemistry, but of course there are plenty of exceptions and diffusion control doesn't follow Arrhenius rate dependence. ). On a bad day it may self-catalyse as well, but it's already self-accelerating in the sense that the rate will go up with the temperature and the temperature will go up faster at higher rates.

To model that you would ideally set up a kinetic model for the chemistry, with coefficients for (probably) an activation energy rather than a simple rate constant, enthalpy of reaction, heat input and at least one arbitrary heat capacity so that you have something that relates heat input and enthalpy to temperature. There'll be another term (probably based on newton's law of cooling) to model external heating and cooling, again with that system heat capacity to convert energy to temperature.
 
That'll be a moderately awkward differential equation.  For the common exponential relation of temperature and rate (assuming an Arrhenius relationship for the rate constant), with temperature not constant, it will almost certainly need numerical solution with something like the deSolve package. That can give you an integrated change at different times. After that 'all' you need to do is wrap that in a function to return a residual sum of squares and then plug that into something like optim() or perhaps nls() to fit the curve.

You may want to set I say 'all you need ...'; obviously, that's a fair bit of work...

________________________________________
From: PIKAL Petr [[hidden email]]
Sent: 10 June 2020 07:59
To: Stephen Ellison; [hidden email]
Subject: RE: [R] almost logistic data evaluation

Hi

External heating. Normally I would use TA instrumentation but for technical
reasons it is impossible. And other complicating factor is that temperature
rise is from beginning almost parabolic (it's derivation is straight line).

Therefore I started with double exponential fit, which is sometimes
satisfactory but sometimes gives nonsense result. After help from R
community I got in almost all cases reasonable fit.

However I want to concentrate on just the reaction part and to find some
more simple way how to get slope for temperature rise and maybe other
parameters related to changes in experiments.

I was advised to look at "growth curve analysis" which I will try to, but I
wonder if due to twisted data is appropriate.

Thanks.
Petr

> -----Original Message-----
> From: R-help <[hidden email]> On Behalf Of Stephen Ellison
> Sent: Tuesday, June 9, 2020 7:11 PM
> To: [hidden email]
> Subject: Re: [R] almost logistic data evaluation
>
> > Actually "y" is growing temperature, which, at some point, rise more
rapidly
> due to exothermic reaction.
> > This reaction starts and ends and proceed with some speed (hopefully
> different in each material).
>
> Are you applying external heating or is it solely due to reaction
kinetics?
>
>
> Steve E
>
> *****************************************************************
> **
> This email and any attachments are confidential. Any u...{{dropped:19}}

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.