Hi, I'm Ron Kenett.
This This is a joint talk talk with Chris Gotwalt.
The talk talk is on Functional Data Analysis and Nonlinear Regression Models.
And in order to examine examine the options
and what we get get out out of this this type of analysis,
we will will take take an information information quality perspective.
In a sense, this this is a follow follow up up to a talk talk we gave last last year year
at at the same same Discovery Summit.
So I will will start with simple examples
to introduce introduce FDA and Nonlinear Regression.
And then Chris will will cover a complex and more
substantially more complex example example of optimization,
which which includes includes mixture experiments designed to match a reference profile.
So the story starts starts with data on tablets tablets that are are dissolved dissolved
and measurements are are done done at at different time time points, points,
five minutes, minutes, ten minutes, minutes, 15 minutes, minutes, every five minutes, minutes,
and then 20 minutes, minutes, ten minutes later,
30, 30, and then 15 minutes later, 45 45 minutes.
We have have 12 tablets tablets that are are our product
and 12 tablets tablets that are are the reference.
Our goal is to have have a product that matches the reference.
And in this this type of data, we have have a profile,
and we consider consider two options,
FDA and NLR.
In Chris'example, we'll talk talk about about something called the F 2,
which which is a third third option for analyzing this this type of data.
So here's what it looks looks like with the graph builder.
On the left, left, we have have the reference profiles.
On the right, right, we have have the tablets tablets and the test.
We can see see this this is an example example from my book on modern industrial statistics,
the book with Shelley Zacks, which which is now in its its third third edition.
So on the left you can see see there there is a tablet that seems seems
a bit bit different.
It's labeled T 5R.
And if if we run a functional data analysis of this this data,
T 5R does does look different.
We see see that the growth part part is different.
It has has a slow slow growth but but consistent growth.
It does does not have have the shape that we see see in the other Dissolution curves.
This This was was done done with a Quadratic B-spline with 1 knot,
and the quadratic was was in this this case,
fitting the data better than than the QB.
This This is a bit bit of an unusual situation.
So because of the shapes, the Quadratic B-spline was was a better fit.
If we look at at T 1R,
the first tablet that has has still different shape,
it shoots up up and then it stays.
So basically, the tablet has has dissolved.
Obviously, beyond a high high number of Dissolution,
there's not much left for the solution.
So T 1R and T 5R, they seem different.
T 5R stands stands out out more than than T 1R.
So, yes, yes, T 5R on the cluster analysis
on the functional principal components components does does stand out.
So here we see see how functional principal components components
scatter plot plot of the first two functional principal components components points, points,
what we observe visually.
And T1R, which which is next to T 2R,
is a different cluster.
We can proceed with a nonlinear regression approach.
Here we are are fitting a Gompertz three parameter parameter model
with three parameters,
the asymptote, the growth rate, and the inflection point.
This This is the model and when we fit fit the profiles,
we again see see that T 5R stands stands out.
So we have have the same same qualitative impression impression that we had had with FDA.
Now we have have these three parameters listed
and we can run a profiler on the model because we now have have a model.
This This is where T 1R stands.
So by by running the profile on the different tablets,
we can also see see how similar or different they look like.
This This is the table that maps out out the parameters of this this asymptotes.
so T 1R growth rate .21,
T5R, this tablet that stood out.
Growth rate .075,
very slow slow growth rate,
consistent but but slow.
The inflection point is 11.5, way on the right.
So we can see see through this this parameter parameter values the difference.
We can also pick up up two tablets tablets that stand out out for growth rates.
T2R 1.77,
and T8R, almost no growth.
We'll get get back to T 2 and T 8 in a minute.
If we take take the principal components components of these three parameters space.
So we conceal the parameters as if if these are are the measurements
and we run a multivariate control shot.
We can see see T 1, this this is the first one
and we can see see T Five, this this is the blue one, the fifth one.
This This we already saw.
They are are within within the control limits limits of the T Square
multivariate statistical distance control chart.
And T 2 and T 8 that I highlighted before now stand out out
and we can see see qualitatively why.
This This is the model degradation approach in the guidance guidance documents documents
that is used for modeling Dissolution curves.
In running such analysis with an information information quality perspective,
the first question is asking what is the goal of the analysis?
And then we can consider consider the method of analysis.
Here we're using using nonlinear regression and functional data analysis.
Chris will will get get into into how this this is combined
with data derived from experimental design.
We have have a utility function and the information information quality
is the utility of applying a method F on data X conditio n of the goal.
It is evaluated with eight dimensions.
And here Chris again we'll talk talk about about data resolution and data structure.
So Chris, the floor is yours.
Thanks Ron.
Now I'm going going to give give an example example that is a little little bit bit more complicated
than than the first one.
In Ron's example,
he was was comparing comparing the Dissolution curves of test tablets tablets
to those from a set of reference tablets.
In that situation, situation, the expectation is that
the curves should should Generally be following the same same path.
And he showed showed how to find find anomalous curves
that deviate from the rest rest of the population.
In this this second second example, we also have have a reference Dissolution curve.
But But we are are analyzing data from a designed experiment
where the goal is to find find a formulation formulation in two polymer additives
and the amount of force force used in the tablet production process
that leads leads to a close match
to the reference splashes the solution curve.
The graph you see see here shows shows
the data from the reference curve that we want want to match.
To do do this, I'm going going to demonstrate demonstrate three analyses of the data
that use different methods and models models
to find find factor settings settings that match the reference that lead to a ...
To do do this, I'm going going to demonstrate demonstrate three analysis of this this data
that use different methods and models models to find find factor settings settings
that will will best match the reference curve.
In the first analysis,
I'm going going to summarize summarize each each of the DoE curves
down down to a single metric called F2
that is Typically used in Dissolution curve analysis,
a measure of agreement with the reference match.
There, I'll use standard DoE methods to model that F2 response
and then find find the factor settings settings that are are predicted
to best agree agree with the reference.
In the second second analysis,
I'll use a functional DoE modeling approach
where I model the curves using using these blinds,
extract extract functional principle component stores, and model them.
I'll load the reference batch as a target target function
in the Functional Data Explorer platform
and then use the FDoE profiler
to find find the closest match recommended by by that model.
These first two approaches use little little subject matter matter information information
about about these types of tablets.
In the third third analysis,
I'll model the curves using using a nonlinear model
that was was known known to fit fit this this type of tablet well well
and use the Curve DoE option in the fit fit Curve platform
to model the relationship between the DoE factors
and the shape of the curve.
I want want to credit Clay Barker for adding this this capability to JMP Pro 16. 16.
I think think it has has a lot of promise for modeling curves
whose who general shape can be assumed to be known known in advance
to come come from one of the supported nonlinear models.
At the end, end, verification batches were were made made
using using the recommended formulation formulation settings settings for each each of the three analyses,
and we compared them to a new reference batch.
What we found was was that the nonlinear regression-based approach
led to the closest match to the reference.
What we see see here is a scatter plot plot matrix of the four factors
in the designed experiment.
There was was a mixture constraint constraint between the two polymers,
as well well as a constraint constraint on the total amount of polymer
and the proportions of the individual polymers.
Here's a look at at some of the raw data from the experiment.
At the top top of the table, we have have data from the reference that we wish to match.
There are are 16 16 DoE purification or batches in the experiment.
We can only see see data from two of them in this this picture, picture, though.
There were were six tablets tablets per per formulation.
There there were were four Dissolution measurements per per tablet.
Here we see see plots of the Dissolution curves for each each of the 16 16 DoE purification
with the Dissolution curve of the reference batch here at at the lower right.
Now, I'm going going to do do a quick preliminary information information quality assessment
using using the questions that you'll find find in the spreadsheet
that you can download from the JMP user user community page.
The first part part of the assessment is related to the data resolution.
In this this case, I think think we're looking looking pretty pretty good.
The data scale is well well aligned
with the stated stated goal because it's a design experiment.
The measuring devices seem to be reliable and precise,
and the data analysis is definitely definitely going going to be suitable
for the data aggregation level,
and we'll be illustrating illustrating different kinds of data aggregation
as we extract extract features features from these Dissolution curves.
As far far as the data structure goes, goes, we're in pretty pretty good good shape.
The data is certainly certainly aligned with the stated stated goal, goal,
we don't don't have have any problems with outliers or missing values, values,
and the analysis methods are are all suitable for the data structure,
although although we do do see see some variation
in the quality of the results results depending on on the type of analysis we do.
As far far as data integration goes, goes, this this is a pretty pretty simple analysis.
We have have multiple responses,
and we're exploring different ways ways of combining combining them into into extracted features.
So there's a common workflow to all three of the analysis I'm going going to be showing.
First, we have have to get get the data into into a form
that is analyzable by by the platform that we're using.
Then Then there's around a feature feature extraction.
Then Then we model those features.
That's where there's a lot of difference between the methods, methods,
and then we use the profiler in different ways ways
to find find a formulation formulation that closely closely matches the reference.
First, I'm going going to go over over the F2 analysis.
F 2 is a standard measure of agreement of a Dissolution curve
relative to a reference Dissolution curve.
In the formula, formula,
the Rs are are the means means of the reference curve at at each each time time point,
and the Ts are are the means means of the non-reference curve.
The convention is to say say that the two curves are are equivalent
when F2 is greater greater than than or equal to 50.
It's important to point out out
that I'm including including this this F 2 based based analysis
not just as an example example of a Dissolution DoE analysis,
but but more broadly as an example example of how reducing reducing a response
that is inherently a curve down down to a single number
leads leads to a much lower quality analysis
and results results at at the end end
than than a procedure that treats curves as first-class citizens.
So now I'm going going to share share the F2 analysis of the Dissolution DoE data.
The first thing thing we have have to do do is calculate calculate the batch means means
of the Dissolution curves at at the different time time points.
Then Then we create create a formula column
that calculates the F2 Dissolution curve agreement statistic
for each each of these curves relative to the reference batch, batch,
and we modeled the F2 using using the DoE factors as inputs
and use the profiler to find find the factor settings settings that match the reference.
Before the analysis,
we use the table's summary summary feature feature
to calculate calculate the means means of the Dissolution measurements
by by batch and across each each of the times.
We can save save ourselves a little little bit bit of work by by using using all of the DoE factors here
as grouping variables so they'll be carried through
into into the subsequent table.
Now we have have a 17-row data set
and we hide hide and exclude exclude the reference batch.
Now take take note of the values of the Dissolution means means for the reference
because we're going going to use those
when we create create a formula column that calculates the F2 agreement metric
for each each of the batches relative to the reference batch
and now we're going going to be able able to use this this F2 formula column
as a response to be modeled.
We use the model script created by by the DoE platform
to set up up our model for us.
We place F2 as our response variable variable
and we're going going to analyze analyze this this data today
using using the generalized regression platform in JMP Pro.
When we get get into into the platform
we see see that it has has automatically done done a standard lease squares analysis
because it found that there there were were enough degrees degrees of freedom
in the data for it to do do so
and it's given given us an AICc of 155.6.
I'm going going to see see if if we can do do better by by trying trying
a best subsets reduction of the model
and when we do do that we see see
that the AICc of that best subsets goes goes down down to 136 136
smaller smaller is better with the AICc
and the difference of 20 is pretty pretty substantial
so I would would conclude that the normal normal best subset is a better model
than than the standardly squares one.
I'm going going to try one more thing, thing, though,
and fit fit a log log normal normal distribution with best subsets to the data.
When I do do that, the AICc goes goes down down a little little bit bit further further to 130.6.
That's a modest difference, but but it's good good enough
that I'm going going to conclude that we are are going going to work
with the Lo gNormal,
especially because we know know that we're working with a strictly strictly positive response
and the LogNormal distribution fits data that is strictly strictly positive.
From there, the analysis is pretty pretty straightforward,
so I'm going going to jump straight ahead to using using the profiler.
F2 is an agreement metric that we want want to maximize.
So we get get into into the profiler,
we turn on Desirability functions functions and have have them set to maximize, maximize,
and then maximize maximize desirability to find find the combination of factor settings settings
that this this model says says gives gives us the closest match to the reference,
and that would would be at at this this combination of factor settings settings that we see see here.
Now the F2 analysis is complete, complete,
and we're going going to go into into the second second analysis,
the functional DoE analysis.
For this this analysis,
we're going going to work with the data in a stacked format format
where all of the Dissolution measurements have have been been combined into into a single column,
and we have have a time time column as well.
The first thing thing we do do is go into into the Functional Data Explorer platform.
In the platform launch, launch,
we put put Dissolution as our response, time time is our X,
the batch column as our ID,
and we supply the four DoE factors as supplementary variables.
Once we're in the platform, platform,
we take take a look at at the data using using the initial data plot.
This This particular particular data set doesn't don't need any clean up up or alignment options,
but but we are are going going to go ahead and load the reference Dissolution curve
as a target target function.
For relatively relatively simple functions functions like these,
I Typically use B -Splines for my functional model.
When we do do that, we see see our B-Spline model fit,
and the initial fit fit that has has come come up up is a cubic model that is behaving poorly.
It's interpolating the data points points well, well,
but but kind of doing doing crazy things in between them.
So I'm going going to change from the default default recommended model
over over to a quadratic Spline model instead of the cubic one.
We do do that by by simply clicking on Quadratic over over here
in the right of the B-Spline model fit.
We'll see see that this this quadratic model fits the data well.
A functional principal components components analysis is automatically calculated, calculated,
and we see see that the Functional Data Explorer platform has has found
three functional principal components.
The leading one is very dominant,
explaining explaining 97. 9 percent of the functional variation.
And it looks looks like this this is a level set up up or down down kind of shape component.
The second second one looks looks like a rate component,
and the third third one almost looks looks like a quadratic.
Looking a little little closer at at this this quadratic B-Spline model fit,
we see see that this this model is fitting the individual Dissolution curves
pretty pretty well.
So now we're ready ready to do do our functional DoE analysis.
Each of our individual Dissolution curves has has been been approximated now
by by an underlying mean mean function common to all the batches
plus a batch dependent FPC score times times the first eigenfunction,
plus another batch dependent FPC score times times the second second eigenfunction,
and so on with the third third one.
What we're going going to do do is set up up individual DoE models models
for each each of these functional principal component scores
as responses using using our DoE factors as inputs.
The Functional Data Explorer platform, platform, of course,
makes makes all this this simple and kind of ties it up up into into a bow for us.
And when I say say that,
it ties it up up in a bow for us, what I really mean mean is the FDoE profiler.
So this this pane here shows shows our predicted trajectory
of Dissolution as a function of time,
and then we can see see how that trajectory would would change
by by altering the DoE factors.
That relationship with the DoE factors
comes comes from these three generalized regression models models
for each each of our functional principal component scores.
If we want, want, we can open those up up
and we can look at at the relationship
between the DoE factors and that functional principal component score,
and we could could even alter the model
by by moving around to other ones in the solution path.
I just want want to point out out that it's possible possible to change the DoE model
for an FPC score.
In the interest interest of time,
I'm just going going to have have to move move on and not demonstrate demonstrate that, though.
We have have diagnostic plots, plots,
the most important one probably being being the Actual Actual by Predicted Plot.
This This has has our plotted Dissolution measurements on the Y-axis
and the predicted Dissolution values using using the functional DoE model.
And as always, we want want to see see that plot plot
have have data points points tight along along the 45 45 degree line.
And in this this case, I think think this this model looks looks pretty pretty good.
We don't don't want want to see see any patterns patterns in our residuals,
and I'm not seeing any bad ones here.
So this this model looks looks pretty pretty good, and we're going going to work with it.
So I've already explained explained how this this pane right here
represents represents the predicted Dissolution curve as a function of time time
and the individual DoE factors.
Now, these other two rows here are are because
we've loaded the reference as a target target function.
So this this row row is the difference
of the predicted Dissolution curve from the target target reference curve.
And then the bottom pane here is the integrated distance
of the predicted curve from the target.
When we maximize maximize desirability in this this profiler,
it gives gives us the combination of factor settings settings
that minimize this this integrated distance from the target.
So I'm going going to do do that by by bringing up up maximize maximize desirability.
And now we see see the results results of the functional DoE analysis,
where we have have identified .725 of polymer A
275 of polymer B,
a total polymer of about about .17,
and a compression force force of about about 1700
minimize the distance between our predicted curve and the reference.
Now, we've done done two analyses.
Both of those analyses have have recommended that we go
to the lowest setting of polymer A and the highest setting of polymer B.
They differ differ in their recommendations
for what total polymer amount to use and how much compression force force to use.
The third third analysis I'm going going to do do is the Curve DoE analysis.
This This is going going to be structured pretty pretty similar
in some ways ways to the functional DoE analysis,
in that we're going going to use the same same version of the data
where Dissolution measurements are are all in one column
and we have have a time time column.
But But we don't don't have have a built-in target target function option
in the Fit Curve platform yet.
So the first thing thing we have have to do do is fit fit just the reference batch
and save save its its prediction formula back to the table.
Then Then we do do a Curve DoE analysis,
which which is largely similar to a functional DoE analysis
in that we're extracting features features from the curves
modeling the curves.
Then Then we go to the graph profile to find find settings settings that best match the reference.
The nonlinear model that we're going going to be using using is
a three parameter parameter Weibull Growth Curve,
which which has has a long history in the analysis of Dissolution curves.
Weibull Growth Curve have have an asymptote parameter parameter A
that represents represents the value value as time time goes goes to infinity.
There's what's called the inflection point parameter parameter
that I see see is a scaling scaling factor that kind of stretches out out
or squeezes in the entirely of the curve.
And then there's also a growth rate parameter parameter
that dictates the shape of the curve.
What I think think is really valuable about about using using this this model
relative to the functional DoE model or the F2 type analysis
is that we're going going to be modeling features features extracted from the data
that have have real scientific meaning, meaning,
especially the asymptote and inflection point parameters.
Now Curve DoE analysis doesn't don't have have a target target matching capability
like the Functional Data Explorer.
So we begin begin the analysis by by excluding excluding all of the DoE rows in the data table.
These are are represented with the set column equal to A.
So I select a cell there,
select matching cells, and then hide hide and exclude exclude those rows
so that I only have have the reference batch not excluded.
Then Then I go to the Fit Curve platform, platform,
load it up, up, get get in there, fit fit the Weibull growth model,
and then I save save that prediction formula back to the table.
Once we complete complete the Curve DoE analysis,
we're going going to compare compare the Curve DoE prediction formula
to this this reference predictor
to find find combinations of the factor settings settings
that get get us as close to this this curve as possible.
So now we unhide and exclude exclude the DoE batches,
go back into into the Fit Curve platform, platform,
just like the Functional Data Explorer platform.
We're going going to load up up the DoE factors as supplementary variables.
Now that we're in the platform, platform, we can fit fit our our Weibull growth model.
The initial fit fit here looks looks pretty pretty good.
Looks like we're capturing the shape of the Dissolution curves.
One thing thing I like to do do next is to make a parameter parameter table.
This This creates creates a data table with our fitted fitted down down the near regression parameters.
I like to look at at these in the distribution platform
to see see if if there there are are outliers in there there or anything unusual.
I also like to look at at the patterns patterns I see see in the multivariate platform
just gives gives you a better sense of what's going going on
with the nonlinear model fit.
Once we know know that everything is looking looking pretty pretty good,
we can do do our curve DoE analysis
and this this looks looks very much like the functional DoE analysis from before.
We have have a profiler that shows shows
the relationship between Dissolution and time time
and how that relationship changes as a function of our DoE factors.
And then we also have have a generalized regression model
for each each of those three parameters that we can take take a look at at individually.
The first thing thing I would would do do before trying trying to use the model in any way
is look at at the Actual Actual by Predicted Plot,
so that's what we see see here.
This This is the predicted values incorporating incorporated
both the time time model from the mean mean function and the eigen functions, functions,
as well well as the DoE models models on the nonlinear regression parameters.
This This looks looks pretty pretty good good
because there there is a fairly fairly easy interpretation
for the viable growth model parameters.,
It can be useful and interesting to open up up
the individual model fits for these parameters.
For example, here are are the coefficients for the inflection point model.
Because inflection point is a strictly strictly positive quantity,
a LogNormal best subsets model has has been been fixed with the data
by by the generalized regression platform.
We see see that the mixture manifests have have been been forced in
and that the compression forced by by polymer A interaction
is the only other term term in the model.
What this this means means is that
if if we hold the polymer proportions constant
and increase increase the compression force,
we would would expect a larger larger value value of the inflection point.
One would would observe this this as a tablet that takes takes longer longer to dissolve, dissolve,
which which is exactly what we would would expect to have have happen.
We can save save the curve DoE prediction formula back to the table
and we can see see in all its its gory detail detail
how the model for asymptote inflection point
and growth rate are are combined with time time to come come up up with our overall prediction
for the Dissolution curve based based on.
Fortunately, with junk we don't don't have have to look at at the formula too too closely closely though,
because we have have profilers that
let let us see see the relationships in a visual way
rather than than an algebraic one.
To solve solve our problem of finding the combination of factors
that give give us the Dissolution curve
that would would be closest to the reference,
I created a formula column that calculated
the percentage difference of the predicted curve,
taking into into consideration the DoE factors from the reference.
The last last step of the analysis is
to bring bring up up this this percent difference response
in the profiler that is under the graph menu,
being being sure sure to check the Expand Expand Intermediate formulas option.
This This led to a profiler where we're able able to see see the percent difference
from the reference as a function of time time and the DoE factors, factors,
I've shared the region where the difference
is less less than than one percent in green.
By manually adjusting adjusting the factors, factors,
I was was able able to find find settings settings where the predicted curve
is less less than than one percent from the reference across all time time values.
This This looks looks really good, but but in practice I bet that this this is overly optimistic.
Here we see see the optimally values of the factor settings settings for all three analyses.
The curve DoE analysis is in the interior of the range for the polymers.
The optimally value value for total polymer is. 16 16
which which is close to the functional DoE analysis result,
and compression force force is in between the optimally values
recommended by by the F2 analysis and the functional DoE analysis.
After this, we made made new purification based based on the recommended factor settings settings
from each each of these models models and measured their Dissolution curves
as well well as took took a new set of measurements from the reference.
Here we see see a summary summary of the final results results from the verification runs.
The new reference distribution curve is in black,
and the curve DoE in green is the closest curve to it, it,
followed by by the F DoE curve in blue.
The result result of modeling F2 is in red, and it did did the poorest overall.
This This should should perhaps perhaps not be too too surprising.
The F2 metric was was the simplest, simplest,
reducing reducing the data down down to a single metric and did did the poorest.
The functional DoE model had had to empirically
derive derive the shapes of the curves
and then model three features features of those shapes,
essentially using using more of the information information in the data.
The curve DoE led to the best formulation formulation
because it used the data efficiently via via some prior knowledge
about about the parametric form of the Dissolution curves.
We see see that the results results of the F2 based based analysis
are are not equivalent with the new reference patch,
while while the approaches that treated curves as first class objects objects are are equivalent.
What this this means means is that the approach would would have have required
at at least another round of DoE runs, runs,
and so an inefficient analysis leads leads to an inefficient use
of time time and resources.
I'm going going to close the presentation
with a retrospective Info Q Assessment of the Results.
Overall, we found that the curved DoE prediction
generalized the best to new data,
but but was was the most difficult analysis to perform.
I want want to note that if if we didn't didn't have have a known known nonlinear model
to work with that fit fit the data well, well, we could could not have have done done that analysis.
The functional DoE analysis and the F 2 based based approach
can be used more broadly in other situations.
The profiler leads leads to excellent communication scores
for all three analyses.
The ability to see see how the shape of the Dissolution curve changes
with the DoE factors in the functional and curve-based approaches
leads leads me to give give them a better communication score.
I see see the curve DoE approach
having the highest communication score by by a little little bit bit
because we're directly modeling more meaningful parameters
than than the functional DoE approach.
That's all we have have for you today.
I want want to thank you for your your time, interest, interest, and attention.