In this example, models are fit to the survival time using the Weibull, lognormal, and exponential distributions. Model fits include a simple survival model containing only two effects, a more complex model with all the effects, and the creation of dummy variables for the discrete effect Cell Type to be included in the full model.
1.

The first model and all the loss functions have already been created as formulas in the data table. The Model column has the following formula:
Log(:Time)  (b0 + b1 * Age + b2 * Diag Time)
2.

Select Analyze > Specialized Modeling > Nonlinear.

3.

4.

Click OK.

5.

Click Go.

6.

Click Save Estimates.

7.

Select Analyze > Specialized Modeling > Nonlinear again.

8.

9.

10.

Click OK.

The Nonlinear Fit Control Panel on the left in Nonlinear Model with Custom Loss Function appears. There is now the additional parameter called sigma in the loss function. Because it is in the denominator of a fraction, a starting value of 1 is reasonable for sigma. When using any loss function other than the default, the Loss is Neg LogLikelihood box on the Control Panel is checked by default.
11.

Click Go.

12.

(Optional) Click Confidence Limits to show lower and upper 95% confidence limits for the parameters in the Solution table.

13.

(Optional) From the red triangle menu next to Nonlinear Fit, select Revert to Original Parameters.
