Getting sigmoidal curve line

I've been trying to get a sigmoidal curve line that goes through/near my data points, so that i can use the sigmoidal fit to find the values of Km and Vmax. Im not sure how to do this. what i have of my code so far is:

s <- c (5, 10, 15, 50, 75, 100)
v <- c (0.0372, 0.0431, 0.0788, 0.122, 0.131, 0.105)
sigmoid <- nls( v ~ Vmax * s^h / ( Km + s^h ) , start = list ( Vmax =0.2, Km =50, h=1))
summary (sigmoid)
# draw a basic sigmoidal plot
plot ( v ∼ s,
       main = "" ,
ylab = " v (umol/min/mg protein) " ,
xlab = " [Ninhydrin Hydrate] (uM)"
)

could i get some help please? thank you!

My code is:

s <- c (5, 10, 15, 50, 75, 100)
v <- c (0.0372, 0.0431, 0.0788, 0.122, 0.131, 0.105)
sigmoid <- nls( v ~ Vmax * s^h / ( Km + s^h ) , start = list ( Vmax =0.2, Km =50, h=1))
summary (sigmoid)
# draw a basic sigmoidal plot
plot ( v ∼ s,
       main = "" ,
ylab = " v (umol/min/mg protein) " ,
xlab = " [Ninhydrin Hydrate] (uM)"
)

and it produces this graph without a line.However, on the graph i would like a sigmoidal fitting line for the points that would make it look like this roughly (the red line):

does anyone know what code to use to achieve this?

i dont understand what you mean/ how to do that

Nir's comment means that you have to explicitly add a line for the fitted values in order for it to appear in the plot. For example:

# draw a basic sigmoidal plot
plot(s, v, ylim=range(c(v, predict(sigmoid))))
# Add lines and points for fitted values
lines(s, predict(sigmoid), type="b", pch=16, col="red")

Rplot02

# Add smooth line for fitted values
sp = seq(min(s), max(s), length=100)
vp = predict(sigmoid, newdata=data.frame(s=sp))

plot(s, v, ylim=range(c(v, predict(sigmoid))))
lines(sp, vp, type="l", pch=16, col="red")

Rplot03

1 Like

You plot v and s , (what you fit your sigmoid to) l, but you don't plot the sigmoid.