Ejemplo práctico de regresión no lineal: modelo logístico de 4 parámetros
Datos
En este ejemplo ajustaremos un modelo logístico de 4 parámetros a los siguientes datos:

La ecuación para el modelo logístico de 4 parámetros es la siguiente:
que se puede escribir como:
F(x) = d + (a − d) / (1 + (x/c)^b)
dónde
- a = Asíntota mínima. En un bioensayo con curva estándar, esta puede considerarse como el valor de respuesta a una concentración estándar de 0.
- b = Pendiente de Hill. La pendiente de Hill se refiere a la inclinación de la curva (puede ser positiva o negativa).
- c = Punto de inflexión. El punto de inflexión se define como el punto de la curva donde la curvatura cambia de dirección o signo. C es la dosis donde y = (da)/2.
- d = Asíntota máxima. En un bioensayo con curva estándar, esta puede considerarse el valor de respuesta para una concentración estándar infinita.
Advertencia: getimagesize(/volume2/Documents/web.hsrv.synology.me/manual/png/4plmodel.png): Error al abrir la secuencia: No existe el archivo o directorio en /volume2/Documents/web.hsrv.synology.me/inc/func_functions.php en la línea 33

Diagrama de dispersión
Primero, observamos el diagrama de dispersión con la respuesta como variable dependiente Y y la dosis como variable independiente X. En el diagrama de dispersión, queremos trazar una línea de tendencia LOESS suavizada. Completamos el cuadro de diálogo de la siguiente manera:

Esto da como resultado el siguiente diagrama de dispersión:

A partir de este gráfico podremos estimar valores iniciales para los parámetros del modelo logístico de 4 parámetros (ver a continuación).
Regresión no lineal
Primero ingresamos la ecuación de regresión d+(ad)/(1+(x/c)^b) (no necesitamos ingresar la parte 'y=') y seleccionamos Respuesta como variable dependiente Y y Dosis como variable independiente X:

Mantenemos los valores predeterminados de Tolerancia de convergencia y Número máximo de iteraciones sin cambios. Seleccionamos las opciones para mostrar un diagrama de dispersión con la línea ajustada y el gráfico de residuos.
Parámetros iniciales
Hacemos clic y MedCalc extrae los nombres de los parámetros de la ecuación: d, a, c y b:

Ahora necesitamos introducir valores iniciales o estimaciones aproximadas para los diferentes parámetros. El diagrama de dispersión anterior es útil para obtener las siguientes estimaciones:
- d es la asíntota superior y la suponemos con el valor máximo de la variable Respuesta, que es alrededor de 25.
- a is the lower asymptote and we guess it with the minimum value of the Response variable, which is about 0.
- c is the inflection point (the dose where you have half of the max response) and we estimate its value to be 18 which is approximately the dose whose response is nearest to the mid response.
- b is the Hill's slope and we guess it with the slope of the line between first and last point. The slope is given by Δy/Δx or (24.2-0.1)/(52.2-0) which is approximately 0.5.
We can enter these numbers in the corresponding input fields:

Some helpful functions
MedCalc provides some useful functions which can provide a general solution for establishing initial parameter values:
- for d we take the maximum value of the Response variable, so we can use the formula VMAX(&Y). VMAX(variable) returns the maximum value of a variable. MedCalc will substitute the symbol &Y with the dependent Y-variable we have selected in the dialog box which is Response. So VMAX(&Y) will return the maximum value of the Response variable. See VMAX function.
- for a we take the minimum value of the Response variable, so we can use the formula VMIN(&Y). See VMIN function.
- c is approximately the dose whose response is nearest to the mid response. We can approximate this with the average of the Response variable, so we can use the formula VAVERAGE(&X). MedCalc will substitute the symbol &X with the independent X-variable we have selected in the dialog box which is Dose. So VAVERAGE(&X) will return the average value of the Dose variable. See VAVERAGE function.
- b is the slope and we can estimate it with the function VSLOPE(&X,&Y). See VSLOPE function.
We can enter these formulae in the corresponding input fields:

We are now ready to proceed and click OK.
Results
To find the model's parameters, MedCalc uses the Levenberg-Marquardt iterative procedure (Press et al., 2007), which yields the following results:

The result tables show that the procedures stopped after 72 iterations because the Convergence criterion was met, i.e. the software could not obtain a further reduction of the Residual standard deviation.
Next the initial parameters are listed: the formulae VMAX(&Y), VMIN(&Y), VAVERAGE(&X) and VSLOPE(&X,&Y) yielded the values 24.2, 0.1, 15.6778 and 0.5116 for d, a, c and b respectively, quite close to our own estimates based on the inspection of the scatter diagram, which were 25, 0, 18,and 0.5.
El programa informa el tamaño de la muestra y la desviación estándar residual, seguido de la ecuación de regresión y los valores calculados de los parámetros de regresión.
El punto de inflexión c, por ejemplo, se estima en 19,3494 con un error estándar de 0,5107 y un intervalo de confianza del 95 % de 18,0365 a 20,6623.
La prueba F que sigue a la tabla de análisis de varianza muestra un valor P inferior a 0,0001. Esta prueba es una prueba aproximada del ajuste general de la ecuación de regresión (Glantz y Slinker, 2001). Un valor P bajo indica un buen ajuste.
Diagrama de dispersión y línea ajustada
Este gráfico muestra un diagrama de dispersión y la línea de regresión no lineal ajustada, que muestra que la línea ajustada se corresponde bien con los datos observados:

Gráfico de residuos
Nuestro gráfico de residuos no muestra valores atípicos en los datos ni un patrón definido. Por lo tanto, no indica un problema con nuestro modelo.

Literatura
- Glantz SA, Slinker BK (2001) Primer of applied regression & analysis of variance. 2nd ed. McGraw-Hill.
- Press WH, Teukolsky SA, Vetterling WT, Flannery BP (2007) Numerical Recipes. The Art of Scientific Computing. Third Edition. New York: Cambridge University Press.