TITLE: Simultaneous fitting of sigmoid curves in Excel (Excel Solver Add-in)
AUTHORS: Kenji Ohgane

[DESCRIPTION]
<div class = "text-blocks"><div class = "text-block"><span>Sometimes it is desirable to fit sigmoid curves with shared parameters against several data sets. Such simultaneous fitting procedure is available in most of the specialized statistical softwares (R, Prism etc.), but also possible with Excel. Here, this protocol explains how to perform simultaneous fitting using Excel Solver plug-in against a pair of data set. For more basic protocol to fit sigmoid curve, see Kenji Ohgane (2019) Sigmoid fitting in Excel (Excel Solver Add-In). </span><span style = "font-weight:bold;">protocols.io </span><a href="https://dx.doi.org/10.17504/protocols.io.78ihrue" style = "text-decoration:underline;color:blue;cursor:pointer;"><span style = ":;">dx.doi.org/10.17504/protocols.io.78ihrue</span></a><span>. See Gerdi Kemmer & Sandro Keller (2010) </span><span style = "font-weight:bold;">Nat. Protocols</span><span> 5: 267–281 for  more detail on the use of Excel Solver in nonlinear least square fitting.</span></div></div>

[STEPS]
?. Download the following excel file.The file contains a sheet set up for simultaneous sigmoidal fitting with two set of example data, for which you can test the fitting procedure.
?. Open the excel file, and enter your data set in the two set of "x" and "y" columns. Delete unnecessary data.
The data in the "x" column should be in decreasing or increasing order. Otherwise, the plot will not be correctly displayed.
?. Guess initial parameters for the sigmoids (minimum, max, n, and ec_50), which can be easily guessed from the plot, and enter the estimated initial values into the cells (B2, B3, B4, and B5 for the first data set, and K2, K3, K4, and K5 for the second data set).
Note that these cells for parameters are "named cells". So you can reference these cells from within equations by using "=min" (first data set) or "=min_" (second data set), where an underbar denotes parameters for the second data set. If you want to modify the equation for the curves, please modify equations within the cells in the "ycalc" columns.
?. Start the Excel Solver add-in from Tool > Solver on the menu bar.
?. Set "Objective / Target cells" to "$B$8", which contains the sum of SSR (Sum of Squared Residuals) calculated for the two data sets.
?. Set "equall to" section to "Value of 0".
This results in a warning saying "unable to find solution", but you can ignore it.
?. Set "Changing variable cells" to the cells that contains initial values for the two sigmoid curves ("$B$2:$B$5, $K$2:$K$5").
?. Add constraints.(1) We recommend to add "ec_50 >= 0.000001" etc., to avoid EC50 becoming negative values or zero.(2) In this example, we fit two sigmoid curves that share minimum and maximum values against the pair of data set. So add two constraints as shown in the figure ("min = min_" and "max=max_").
?. Confirm that "Assume non-negative" is unchecked, and click "Solve" to run the Solver.Close the Solver window when the calculation finished. Then you can get fitted parameters and a curve overlaid over the raw data points. Check if the sigmoid curve is reasonably fitted over the data.
?. Then you can get fitted parameters and curves overlaid over the raw data points. Check if the sigmoid curve is reasonably fitted over the data.