## 95% confidence bounds from logistic curve (curve fitter) give different results to plotting via equation in script

I fit the logisitc model a/(1+exp(-b*(x-c))) to my data using curve fitter and it gave me the following graph – the logisitic curve with coefficients, plus the coefficients for the 95% confidence bounds

a = 84.15 (81.76, 86.54)

b = 0.1853 (0.169, 0.2017)

c = 11.8 (11.26, 12.34)

I have now been trying to plot these lines using matlab script into a new plot with the original data on it – and while the lines plot, the 95% coefficent lines do not match those drawn out by curve fitter (instead they show a much narrower range and the upper and lower bounds actually cross over each other). I’ve included the script for the curves below. Can anybody see why the plotted curves might not match those from curve fitter?

%calculate the logistic curve

l = 84.15./(1+exp(-0.1853*(x-11.8)));

%plot the logistic curve

plot(x,l)

%calculate the 95% confidence bounds lower

s = 81.76./(1+exp(-0.169*(x-11.26)));

%calculate the 95% confidence bounds upper

d = 86.54./(1+exp(-0.2017*(x-12.34)));

% plot confidence bounds

plot(x,s,’-‘,’Linewidth’,1,’color’,’#C8C8C8′);

plot(x,d,’-‘,’Linewidth’,1,’color’,’#C8C8C8′);

Below is the curve fitter graph – where the 95% confidence bounds appear to be correct:I fit the logisitc model a/(1+exp(-b*(x-c))) to my data using curve fitter and it gave me the following graph – the logisitic curve with coefficients, plus the coefficients for the 95% confidence bounds

a = 84.15 (81.76, 86.54)

b = 0.1853 (0.169, 0.2017)

c = 11.8 (11.26, 12.34)

I have now been trying to plot these lines using matlab script into a new plot with the original data on it – and while the lines plot, the 95% coefficent lines do not match those drawn out by curve fitter (instead they show a much narrower range and the upper and lower bounds actually cross over each other). I’ve included the script for the curves below. Can anybody see why the plotted curves might not match those from curve fitter?

%calculate the logistic curve

l = 84.15./(1+exp(-0.1853*(x-11.8)));

%plot the logistic curve

plot(x,l)

%calculate the 95% confidence bounds lower

s = 81.76./(1+exp(-0.169*(x-11.26)));

%calculate the 95% confidence bounds upper

d = 86.54./(1+exp(-0.2017*(x-12.34)));

% plot confidence bounds

plot(x,s,’-‘,’Linewidth’,1,’color’,’#C8C8C8′);

plot(x,d,’-‘,’Linewidth’,1,’color’,’#C8C8C8′);

Below is the curve fitter graph – where the 95% confidence bounds appear to be correct: I fit the logisitc model a/(1+exp(-b*(x-c))) to my data using curve fitter and it gave me the following graph – the logisitic curve with coefficients, plus the coefficients for the 95% confidence bounds

a = 84.15 (81.76, 86.54)

b = 0.1853 (0.169, 0.2017)

c = 11.8 (11.26, 12.34)

I have now been trying to plot these lines using matlab script into a new plot with the original data on it – and while the lines plot, the 95% coefficent lines do not match those drawn out by curve fitter (instead they show a much narrower range and the upper and lower bounds actually cross over each other). I’ve included the script for the curves below. Can anybody see why the plotted curves might not match those from curve fitter?

%calculate the logistic curve

l = 84.15./(1+exp(-0.1853*(x-11.8)));

%plot the logistic curve

plot(x,l)

%calculate the 95% confidence bounds lower

s = 81.76./(1+exp(-0.169*(x-11.26)));

%calculate the 95% confidence bounds upper

d = 86.54./(1+exp(-0.2017*(x-12.34)));

% plot confidence bounds

plot(x,s,’-‘,’Linewidth’,1,’color’,’#C8C8C8′);

plot(x,d,’-‘,’Linewidth’,1,’color’,’#C8C8C8′);

Below is the curve fitter graph – where the 95% confidence bounds appear to be correct: curve fitter, logistic, curve plotting, sigmodial MATLAB Answers — New Questions