I'm not sure if this is duplicate question. But I really hope to get help from here.
I want to plot a graph like in the attachment below, fitting a 2-parameters Weibull curve. The x-axis is days
and y-axis is biomaker level
, with a cut off is 0.5.
2. dweibull
nls(y ~ 46 * dweibull(x, shape, scale), start = c(shape = 3, scale = 20))
Nonlinear regression model
model: y ~ 46 * dweibull(x, shape, scale)
data: parent.frame()
shape scale
2.375 23.378
residual sum-of-squares: 27.93
Number of iterations to convergence: 9
Achieved convergence tolerance: 4.33e-06
plot(y ~ x)
curve(46 * dweibull(x, 2.375, 23.378), add = TRUE)