<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />How can I fit a second order exponential decay to my data?
Here is what I use to fit a Stretched Exponential, make a plot to look for anomolies and fit using the Non-Linear platform.
Fade=Current Data Table():
Fade << New Column( "Stretched Exponential",
Numeric,
Continuous,
Formula( Parameter( {a = 1, b = -0.01, c = 0.2}, a * Exp( b * :Hours ^ c ) ) )
);
biv=Fade << Bivariate(
Y( :Std Output1 ),
X( :Hours ),
SendToReport(
Dispatch(
{},
"2",
ScaleBox,
{Min( 0.65 ), Max( 1.05 ), Inc( 0.05 ), Minor Ticks( 1 ),
Label Row Nesting( 1 ), Label Row( Show Major Grid( 1 ) )}
),
Dispatch(
{},
"Bivar Plot",
FrameBox,
{Frame Size( 375, 279 ), Row Legend(
Exp No,
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
)
);
biv<
f=Fade<
Y( :Name("Std Output1") ),
X( :Name( "Stretched Exponential" ) ),
Iteration Limit( 100000 ),
Unthreaded( 1 ),
Newton,
Finish,
By( :Device ID ),
Custom Inverse Prediction( Response( 0.7 ),
Term Value( Hours( . ) ) )
);
f_rep = f <
rep=Report( f[1] )[Outline Box (6)][Table Box(1)] << Make Combined Data Table;
rep<<
rep=Current Data Table();
rep<
Hope this helps. Please let me know if you need anything further.
Dave