## Thursday, December 03, 2015

### Dose Response Modeling: calculating EC50, ED50 by Fitting Emax Model using SAS Proc NLIN

Dose response data can come from the laboratory test, pre-clinical, and clinical. The responses can be the assay results, fluorescence output, cell counts, hormone concentrations, efficacy measures.
This type of dose response data can be analyzed using model-based approach - assuming a functional relationship between the response and the dose following a pre-specified parametric model. There are many different models used to characterize a dose-response: linear, quadratic, orthogonal polynomials, exponential, linear in log-dose, Emax. If the response is discreet or dichotomous (success/failure, survival/death,...), it is called quantal response. The different set of models will need to be used such as probit, logit, ordinal logistic, and extreme value (or gompit) regression models that can be easily fit using SAS Proc Probit

For continuous response data, one of the most common parametric model is Emax model. There is a 3-parameter Emax model by fitting the dose response function g(D)
where E0 is the response Y at baseline (absence of dose), Emax is the asymptotic maximum dose effect (maximum effect attributable to the drug) and ED50 is the dose which produces 50% of the maximal effect. A generalization is the 4-parameter Emax model for

where
is the 4th parameter which is sometimes called the Hill parameter or Hill factor, or slope factor. The Hill parameter affects the shape of the curve and is in some cases very difficult to estimate.

The Emax model may be referred as three-parameter logistic model and four-parameter logistic model, or simply three-parameter model and four-parameter model.

SAS Proc NLIN can be used to fit the Emax model (three-parameter or four-parameter). We can use the data in an online paper "How can I generate a dose response curve in SAS?". The concentration-response is similar to the dose-response from the modeling purpose. In the data below, for some concentration level, there are two duplicates.

 Concentration Response 0.1 21.125 0.1 20.575 0.25 40.525 0.5 26.15 0.75 26.35 0.75 44.275 1 49.725 1 63.6 10 49.35 10 68.875 100 58.025 100 58.075 1000 68.025 1000 52.3
We can read the data into SAS data set as following:

data dr;
input concentration response;
datalines;
.1 21.125
.1 20.575
.25 40.525
.5 26.15
.75 26.35
.75 44.275
1 49.725
1 63.6
10 49.35
10 68.875
100 58.025
100 58.075
1000 68.025
1000 52.3
;

In order to fit the four parameter Emax model above, we will need to provide the initial values for all four parameters. The initial values provided do not need to be precise. Usually, the same results can be obtained with different initial values. However, we want to provide the initial values close to the data. For example, from the data set above, we can choose the min as the E0 (minimum response),  max as Emax (maximum response), a median dose as ED50 (dose corresponding to 50% of Emax). For the fourth parameter (Hill slope), we can run a simple linear regression to obtain an initial slope. It is not critical if the concentration response really follows the linear relationship. The purpose here is just to obtain an initial Hill slope value for the non linear model.

If we run the following simple regression, we will get a slope of 0.01831 and we can use this value as the initial value for the fourth parameter.

proc reg data=dr;
model response=concentration;
run;

From the data set, we now have the initial values for all four parameters: E0 = 20.575, Emax = 68.875, ED50 = 1, and slope factor = 0.01831. Again, these initial values do not have to be very accurate.

We can then run the following SAS program to fit the non linear (four parameter Emax) model described above:

proc nlin data = dr method=marquardt;
parms E0 = 20.575 Emax = 68.875 ED50 = 1 hill = 0.01831;
model response = Emax + (E0 * concentration**hill) / (ED50**hill + concentration**hill);
run;

From the outputs, we will get an estimate of ED50 = 0.8171.

Notice that in online paper "How can I generate a dose response curve in SAS?", a different four parameter model was presented. However, if we fit the nonlinear model, we will get the same estimate of ED50. The four-parameter model was written as:
The SAS program can be written as:

proc nlin data = dr method=marquardt;
parms E0 = 20.575 Emax = 68.875 ED50 = 1 hill = 0.01831;
model response = E0 + (Emax - E0) / (1 + (concentration / ED50)**hill);
run;

Sanket Sinojia said...

Hi,

Nice post. I have one query is there any way to find ED50 using Population model (subject id) in SAS. I have often heard about SAS MIXLIN Macro ? Do you know from where I can get this macro..

Thanks,
Sanket Sinojia

Anonymous said...

Not sure about MIXLIN macro. However, if you are trying to fit the nonlinear mixed model, you may try the SAS procedures NLMIXED or GLIMMIX.

http://www.ats.ucla.edu/stat/sas/library/nlmixedsugi.pdf

mzh said...

Interesting post.. If you want to play around and learn about these parameters, feel free to check out my simulator here: https://mzhku.shinyapps.io/trialsim/
It applies exactly these parameters to a (true) simulation of patient data.