Curve Fitting Igor Pro compared with pro Fit

Save this PDF as:
 WORD  PNG  TXT  JPG

Size: px
Start display at page:

Download "Curve Fitting Igor Pro compared with pro Fit"

Transcription

1 Χ 2 = ( y obs y ) 2 theory Curve Fitting Igor Pro compared with pro Fit 0.8 Signal 0.4 Kd = 0.81 ± 0.37 µm Au = ± Ab = 0.97 ± [Ligand]tot Fit Algorithm: Levenberg-Marquardt Iterations: Chi squared = e-2 Fitted parameters: Standard deviations: Kd = Kd = Au = e-2 Au = e-2 Ab = Ab = e-2

2 Χ 2 = ( y obs y ) 2 theory Curve Fitting Igor Pro compared with pro Fit Signal Kd = 0.81 ± 0.37 µm Au = ± 0.08 Ab = 0.97 ± [Ligand]tot Igor Pro Curve Fit Results Wed, Apr 22, :25:52 PM Fit Type: least squares fit Function: BinaryBinding Coefficient values ± 67% Confidence Interval Kd = ± Au = ± Ab = ± Fit Algorithm: Levenberg-Marquardt Iterations: Chi squared = e-2 Fitted parameters: Standard deviations: Kd = Kd = Au = e-2 Au = e-2 Ab = Ab = e-2 Kd = 0.81 ± 0.39 µm Au = ± 0.08 Ab = 0.97 ± 0.07

3 Χ 2 = ( y obs y ) 2 theory Curve Fitting Igor Pro compared with pro Fit Signal Kd = 0.81 ± 0.37 µm Au = ± 0.08 Ab = 0.97 ± [Ligand]tot Igor Pro Curve Fit Results Wed, Apr 22, :25:52 PM Fit Type: least squares fit Function: BinaryBinding Coefficient values ± 67% Confidence Interval Kd = ± Au = ± Ab = ± Fit Algorithm: Levenberg-Marquardt Iterations: Chi squared = e-2 Fitted parameters: Standard deviations: Kd = Kd = Au = e-2 Au = e-2 Ab = Ab = e-2 Kd = 0.81 ± 0.39 µm Au = ± 0.08 Ab = 0.97 ± 0.07

4 pro Fit function Binding; inputs a[1]:=10,active,'kd',0,inf; a[2]:=1,inactive,'pt',0,inf; a[3]:=0,active,'au',-inf,inf; a[4]:=1,active,'ab',-inf,inf; Programming the function Igor #pragma rtglobals=1 // Use modern global access method. #include <AllStatsProcedures> #include <Function Grapher> Function BinaryBinding(w,Lt) : FitFunc Wave w Variable Lt variable tmp variable pl variable Pt0 {Variable declarations } var tmp,pl: extended; begin tmp := a[1] + a[2] + x; pl:= 0.5* (tmp - sqrt(sqr(tmp)-4*a[2]*x)) / a[2]; y := a[3] + ((a[4]-a[3])*pl); end; //CurveFitDialog/ These comments were created by the Curve Fitting dialog. Altering them will //CurveFitDialog/ make the function less convenient to work with in the Curve Fitting dialog. //CurveFitDialog/ Independent Variables 1 //CurveFitDialog/ Lt //CurveFitDialog/ Coefficients 3 //CurveFitDialog/ w[0] = Kd //CurveFitDialog/ w[1] = Au //CurveFitDialog/ w[2] = Ab Pt0 = 1 tmp = Pt0 + Lt + w[0] pl = 0.5*(tmp-sqrt((tmp*tmp)-4*Pt0*Lt)) / Pt0 return w[1] + ( (w[2]-w[1]) * pl ) End ( f ( L t ) = A u + ( A b A u ) P T + K d ) ( P T + K d ) 2 4P T L T 2L T

5 pro Fit function Binding; inputs a[1]:=10,active,'kd',0,inf; a[2]:=1,inactive,'pt',0,inf; a[3]:=0,active,'au',-inf,inf; a[4]:=1,active,'ab',-inf,inf; Programming the function Igor #pragma rtglobals=1 // Use modern global access method. #include <AllStatsProcedures> #include <Function Grapher> Function BinaryBinding(w,Lt) : FitFunc Wave w Variable Lt variable tmp variable pl variable Pt0 {Variable declarations } var tmp,pl: extended; begin tmp := a[1] + a[2] + x; pl:= 0.5* (tmp - sqrt(sqr(tmp)-4*a[2]*x)) / a[2]; y := a[3] + ((a[4]-a[3])*pl); end; //CurveFitDialog/ These comments were created by the Curve Fitting dialog. Altering them will //CurveFitDialog/ make the function less convenient to work with in the Curve Fitting dialog. //CurveFitDialog/ Independent Variables 1 //CurveFitDialog/ Lt //CurveFitDialog/ Coefficients 3 //CurveFitDialog/ w[0] = Kd //CurveFitDialog/ w[1] = Au //CurveFitDialog/ w[2] = Ab Pt0 = 1 tmp = Pt0 + Lt + w[0] pl = 0.5*(tmp-sqrt((tmp*tmp)-4*Pt0*Lt)) / Pt0 return w[1] + ( (w[2]-w[1]) * pl ) End ( f ( L t ) = A u + ( A b A u ) P T + K d ) ( P T + K d ) 2 4P T L T 2L T

6 Programming the function function Binding; function Binding; inputs a[1]:=10,active,'kd',0,inf; a[2]:=1,inactive,'pt',0,inf; a[3]:=0,active,'au',-inf,inf; a[4]:=1,active,'ab',-inf,inf; {Variable declarations } var tmp,pl: extended; begin tmp := a[1] + a[2] + x; pl:= 0.5* (tmp - sqrt(sqr(tmp)-4*a[2]*x)) / a[2]; y := a[3] + ((a[4]-a[3])*pl); end; f L t #pragma rtglobals=1 // Use modern global access method. #include <AllStatsProcedures> 2L T #include <Function Grapher> Function BinaryBinding(w,Lt) : FitFunc Wave w Variable Lt variable tmp variable pl variable Pt0 tmp := a[1] + a[2] + x; pl:= 0.5* (tmp - sqrt(sqr(tmp)-4*a[2]*x)) / a[2]; y := a[3] + ((a[4]-a[3])*pl); //CurveFitDialog/ These comments were created by the Curve Fitting dialog. Altering them will //CurveFitDialog/ make the function less convenient to work with in the Curve Fitting dialog. //CurveFitDialog/ Independent Variables 1 //CurveFitDialog/ Lt //CurveFitDialog/ Coefficients 3 //CurveFitDialog/ w[0] = Kd //CurveFitDialog/ w[1] = Au //CurveFitDialog/ w[2] = Ab Function BinaryBinding(w,Lt) : FitFunc Pt0 = 1 tmp = Pt0 + Lt + w[0] ( ( ) = A u + ( A b A u ) P + L + K T T d ) ( P T + K d ) 2 4P T L T Pt0 = 1 tmp = Pt0 + Lt + w[0] pl = 0.5*(tmp-sqrt((tmp*tmp)-4*Pt0*Lt)) / Pt0 return w[1] + ( (w[2]-w[1]) * pl ) End pl = 0.5*(tmp-sqrt((tmp*tmp)-4*Pt0*Lt)) / Pt0 return w[1] + ( (w[2]-w[1]) * pl ) pro Fit Igor

7 pro Fit function Binding; inputs a[1]:=10,active,'kd',0,inf; a[2]:=1,inactive,'pt',0,inf; a[3]:=0,active,'au',-inf,inf; a[4]:=1,active,'ab',-inf,inf; Programming the function Igor #pragma rtglobals=1 // Use modern global access method. #include <AllStatsProcedures> #include <Function Grapher> Function BinaryBinding(w,Lt) : FitFunc Wave w Variable Lt variable tmp variable pl variable Pt0 {Variable declarations } var tmp,pl: extended; begin tmp := a[1] + a[2] + x; pl:= 0.5* (tmp - sqrt(sqr(tmp)-4*a[2]*x)) / a[2]; y := a[3] + ((a[4]-a[3])*pl); end; //CurveFitDialog/ These comments were created by the Curve Fitting dialog. Altering them will //CurveFitDialog/ make the function less convenient to work with in the Curve Fitting dialog. //CurveFitDialog/ Independent Variables 1 //CurveFitDialog/ Lt //CurveFitDialog/ Coefficients 3 //CurveFitDialog/ w[0] = Kd //CurveFitDialog/ w[1] = Au //CurveFitDialog/ w[2] = Ab Pt0 = 1 tmp = Pt0 + Lt + w[0] pl = 0.5*(tmp-sqrt((tmp*tmp)-4*Pt0*Lt)) / Pt0 return w[1] + ( (w[2]-w[1]) * pl ) End ( f ( L t ) = A u + ( A b A u ) P T + K d ) ( P T + K d ) 2 4P T L T 2L T

8 pro Fit function Binding; inputs a[1]:=10,active,'kd',0,inf; a[2]:=1,inactive,'pt',0,inf; a[3]:=0,active,'au',-inf,inf; a[4]:=1,active,'ab',-inf,inf; Programming the function Igor #pragma rtglobals=1 // Use modern global access method. #include <AllStatsProcedures> #include <Function Grapher> Function BinaryBinding(w,Lt) : FitFunc Wave w Variable Lt variable tmp variable pl variable Pt0 {Variable declarations } var tmp,pl: extended; begin tmp := a[1] + a[2] + x; pl:= 0.5* (tmp - sqrt(sqr(tmp)-4*a[2]*x)) / a[2]; y := a[3] + ((a[4]-a[3])*pl); end; //CurveFitDialog/ These comments were created by the Curve Fitting dialog. Altering them will //CurveFitDialog/ make the function less convenient to work with in the Curve Fitting dialog. //CurveFitDialog/ Independent Variables 1 //CurveFitDialog/ Lt //CurveFitDialog/ Coefficients 3 //CurveFitDialog/ w[0] = Kd //CurveFitDialog/ w[1] = Au //CurveFitDialog/ w[2] = Ab Pt0 = 1 tmp = Pt0 + Lt + w[0] pl = 0.5*(tmp-sqrt((tmp*tmp)-4*Pt0*Lt)) / Pt0 return w[1] + ( (w[2]-w[1]) * pl ) End ( f ( L t ) = A u + ( A b A u ) P T + K d ) ( P T + K d ) 2 4P T L T 2L T

9 pro Fit function Binding; inputs a[1]:=10,active,'kd',0,inf; a[2]:=1,inactive,'pt',0,inf; a[3]:=0,active,'au',-inf,inf; a[4]:=1,active,'ab',-inf,inf; {Variable declarations } var tmp,pl: extended; begin tmp := a[1] + a[2] + x; pl:= 0.5* (tmp - sqrt(sqr(tmp)-4*a[2]*x)) / a[2]; y := a[3] + ((a[4]-a[3])*pl); end; Programming the function Function BinaryBinding(w,Lt) : FitFunc //CurveFitDialog/ Independent Variables 1 //CurveFitDialog/ Lt //CurveFitDialog/ Coefficients 3 //CurveFitDialog/ w[0] = Kd //CurveFitDialog/ w[1] = Au //CurveFitDialog/ w[2] = Ab #pragma rtglobals=1 // Use modern global access method. #include <AllStatsProcedures> #include <Function Grapher> Function BinaryBinding(w,Lt) : FitFunc Wave w Variable Lt variable tmp variable pl variable Pt0 //CurveFitDialog/ These comments were created by the Curve Fitting dialog. Altering them will //CurveFitDialog/ make the function less convenient to work with in the Curve Fitting dialog. //CurveFitDialog/ Independent Variables 1 //CurveFitDialog/ Lt //CurveFitDialog/ Coefficients 3 Igor //CurveFitDialog/ w[0] = Kd //CurveFitDialog/ w[1] = Au //CurveFitDialog/ w[2] = Ab function Binding; inputs a[1]:=10,active,'kd',0,inf; a[2]:=1,inactive,'pt',0,inf; a[3]:=0,active,'au',-inf,inf; a[4]:=1,active,'ab',-inf,inf; ( f ( L t ) = A u + ( A b A u ) P T + K d ) P T + K d Pt0 = 1 tmp = Pt0 + Lt + w[0] pl = 0.5*(tmp-sqrt((tmp*tmp)-4*Pt0*Lt)) / Pt0 return w[1] + ( (w[2]-w[1]) * pl ) End ( ) 2 4P T L T 2L T pro Fit

10 Igor - Setting up a Fit 6

11 Igor - Setting up a Fit 6

12 Igor - Setting up a Fit Enter your function Data columns (waves) to be Fit 7

13 Igor - Setting up a Fit Parameters to be Fit X value Enter function to be Fit 8

14 Igor - Setting up a Fit Starting guesses Test your guesses function to be Fit 9

15 Igor - Setting up a Fit 10

16 Igor - readily generates confidence bands and residual plots Residuals IMPORTANT - helps decide if you are using the correct function (for example, should I be using a single or double exponential?) Prediction Band Reflects the probability that a future measurement will fall within a certain range Confidence Band Reflects the probability that a future set of measurements will result in fit parameters that fall within a certain range.