Select variable for case identification
Probit regression (Dose-Response analysis)
Mann-Whitney test (independent samples)
Repeated measures analysis of variance
Cox proportional-hazards regression
Bland-Altman plot with multiple measurements per subject
Coefficient of variation from duplicate measurements
Concordance correlation coefficient
Clustered multiple comparison graphs
Clustered multiple variables graphs
Fishers exact test for a 2×2 table
Comparison of standard deviations (F-test)
Comparison of correlation coefficients
Comparison of areas under independent ROC curves
Sample size calculation: Introduction
Confidence Interval estimation & Precision
Mean difference between paired samples
Difference between paired proportions
Coefficient of Variation from duplicate measurements
Relative and absolute cell addresses
Gamma function and related functions
Values of the Chi-squared distribution
Multiples and submultiples of SI units
How to export your results to Microsoft Word
Data point identification in graphs
Save and recall graphs and statistics
Controlling the movement of the cellpointer
Locking the cellpointer in a selected area
How to reorder a categorical variable
Nonlinear regression worked example: 4-parameter logistic model
In this example we will fit a 4-parameter logistic model to the following data:
The equation for the 4-parameter logistic model is as follows:
wherea = Minimum asymptote. In a bioassay where you have a standard curve, this can be thought of as the response value at 0 standard concentration.b = Hills slope. The Hills slope refers to the steepness of the curve (can be positive or negative).c = Inflection point. The inflection point is defined as the point on the curve where the curvature changes direction or signs. C is the dose where y=(d-a)/2.d = Maximum asymptote. In a bioassay where you have a standard curve, this can be thought of as the response value for infinite standard concentration.
First we look at thescatter diagramwithResponseas dependent variable Y andDoseas independent variable X. In the scatter diagram, we want to plot a LOESS smoothed trendline. We complete the dialog box as follows:
This results in the following scatter diagram:
From this graph we will be able to estimate initial values for the parameters of the 4-parameter logistic model (see below).Nonlinear regression
First we enter the regression equationd+(a-d)/(1+(x/c)^b)(we dont need to enter the y= part) and selectResponseas dependent variable Y andDoseas independent variable X:
We leave the default values forConvergence toleranceand forMaximum number of iterationsunchanged. We select the options to display a scatter diagram with fitted line and the residuals plot.
We click the buttonGet parameters from equationand MedCalc will extract the parameter names from the equation:d,a,candb:
We now need to enter initial values or best guesses for the different parameters. The scatter diagram above is useful for finding the following estimates:
is the upper asymptote and we guess it with the maximum value of the
is the lower asymptote and we guess it with the minimum value of the
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.
is the Hills 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:
MedCalc provides some useful functions which can provide a general solution for establishing initial parameter values:
variable, so we can use the formula VMAX(&Y). VMAX(variable) returns the maximum value of a variable. MedCalc will substitute the symbol
with the dependent Y-variable we have selected in the dialog box which is
. So VMAX(&Y) will return the maximum value of the
variable, so we can use the formula VMIN(&Y). SeeVMIN function.
is approximately the dose whose response is nearest to the mid response. We can approximate this with the average of the
variable, so we can use the formula VAVERAGE(&X). MedCalc will substitute the symbol
with the independent X-variable we have selected in the dialog box which is
. So VAVERAGE(&X) will return the average value of the
is the slope and we can estimate it with the function VSLOPE(&X,&Y). SeeVSLOPE function.
We can enter these formulae in the corresponding input fields:
We are now ready to proceed and click the OK button.
To find the models 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 theConvergence criterionwas 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 ford,a,candbrespectively, quite close to our own estimates based on the inspection of the scatter diagram, which were 25, 0, 18,and 0.5.
The program reports the sample size and the Residual standard deviation, followed with the regression equation and the calculated values of the regression parameters.
The inflection pointc, for example, is estimated to be 19.3494 with Standard Error 0.5107 and 95% Confidence Interval 18.0365 to 20.6623.
The F-test that follows the Analysis of variance table shows a P-value of less than 0.0001. The F-test is an approximate test for the overall fit of the regression equation (Glantz & Slinker, 2001). A low P-value is an indication of a good fit.
This graph displays a scatter diagram and the fitted nonlinear regression line, which shows that the fitted line corresponds well with the observed data:
Our residuals plot does not show any outliers in the data and do not show a certain pattern. The residual plot therefore does not indicate a problem with our model.
Glantz SA, Slinker BK (2001) Primer of applied regression & analysis of variance. 2
Press WH, Teukolsky SA, Vetterling WT, Flannery BP (2007) Numerical Recipes. The Art of Scientific Computing. Third Edition. New York: Cambridge University Press.
List of otherStatistical spreadsheet functions on variables
LevenbergMarquardt algorithmon Wikipedia.
Local regression(LOESS smoothing) on Wikipedia.