To use the application, click on the button TRY LOGLETLAB 3.0 in the tab bar above.

This will open a new browser window or tab.
The program uses a monte-carlo method for non-linear
constrained regression, so it is computationally expensive.
The fastest javascript browser is Google
Chrome. This application runs best in Chrome.
Apple Safari 4.0 and Mozilla Firefox 3.5 (not 3.0) are also good. I
have not tried this app using IE 8, but it should work.

Example Data Sets
For an example of how the program works,
click the three buttons labeled “step 1″, “step 2″, and “step 3″ in that order.
You will see a single logistic curve, fitting the dataset of the growth of a sunflower.
It should take only a second or so in Chrome.
The first button, “step 1″, loads the data specified in the drop list.
The second button, “step 2″, load the constraints.
The third button, “step 3″, starts the constrained non-linear regression algorithm.
If you are not using the chrome browser, you might see a warning pop
up that a script is running too long. Just click “keep running”. This is normal,
in the sense that until chrome, javascript code was mainly for web page apps
with minimal computation.
You can change the constraints, and click “step 3″ again to preform another fit.
You can also choose between least-squares regression (L2 norm)
or robust regression (L1 norm).
The default monte-carlo parameters should be sufficient for most data sets
however, if the fit is not good, increase the number of monte carlo
iterations from 5e3 (5000) to 10e3 (10000). You can enter numbers in either
scientific notation or regular integers, but don’t use commas.

User Data
To use your own data, choose the option “user data” from the drop list (it is the
last item). Then you can either type in your data.
Use comma’s to separate the two column “x,y” time-series data. Here is an example

After you input the data and click the button “step 1″, you should see this:

The, click the button “step 2 - load or resent constraints”, you should see this:

Now you can either input your own constraints, or click the
“guess constraints” button, which will
use a simple heuristic to choose reasonable constraints.
It will most likely fail badly for curves
consisting of two logistic pulses or three logistic pulses.

After clicking the button “step 3 - fit model”, you should see this

Spreadsheet Data
You can also copy data in a spreadsheet (Excel, Google Spreedsheet, etc) and paste it into the text area. For example, select the two column data in your spreadsheet and choose “copy”

and then “paste” the data into the text area:

Note you still have to click the button “step 1 - create data table”
to load the data into the program.

You can edit the data in the data table, and click “step 3 - fit model” to
perform a new fit (as long as the constraints have been sent).

Mathematical Description

This program fits time-series data to “logistics” (sum of s-shaped logistic curves).
Here is a single logistic function:

\displaystyle p(t) = \frac{\kappa}{ 1 + \exp\left( \frac{\ln(81)}{-\alpha} (t - \beta) \right)} 

The beta version of this application fits a single logistic,
or the sum of two logistic functions (”bi-logistic“),
or three logistic functions (”loglets“).

\displaystyle p(t) = \sum_i^{\{1,2,3\}} \frac{\kappa_i}{ 1 + \exp\left( \frac{\ln(81)}{-\alpha_1} (t - \beta_1) \right)} 

Note that since web browsers don’t always have greek fonts,
I use often use the letters ‘k’,'a’,'b’ to stand for

\kappa, \alpha, \beta

Our paramaterization of the logistic function is not standard,
but it is useful for time-series data sets.
‘k’ is the “carrying capacity” of the model (the saturation value of the s-shaped logistic).
‘a’ is the “growth rate”. The ln(81) factor means that parameter ‘a’ is related to the time for the
logistic curve to rise from 10% of k to 90% of ‘k’.
For time series data sets, this is convenient, since
‘a’ is nicely scaled in time. It is especially useful for
constrained non-linear regression, since it is required that you
visually “pick” reasonable starting upper and lower bounds for the
values of ‘a’ (as well as ‘k’ and ‘b’), and this is easier if the parameters are
scaled intuitively.
“b” is the midpoint of the logistic curve (the time when p(t) reaches 50% of ‘k’.
For historical reasons, these parameters are often given different names

 \kappa \equiv \Delta t, \quad \beta \equiv t_m

When plotting, we often do a simple transformation that renders the s-shaped logistic
as a straight line. Again, for historical reasons, this is called the “Fisher-Pry” transform
(since they were the authors of an important 1970 paper that used this transformation).
This is explained in the “loglets” paper, as well as this clarification.