0

I have a dataset, which I want to adjust to the following model and get the values of parameters a and b

$$ dan $$

x <- c(31.56750292, 26.91965284, 23.40296193, 15.63530835, 0)
y <- c(1.132561597, 1.340922478, 1.284691753, 1.610823279, 0)

DF <- data.frame(x, y)

my_model <- lm(y ~ (a * b * x)/(1 + (b * x)))

summary(my_model)

How can I do this?

Daniel Valencia C.
  • 2,159
  • 2
  • 19
  • 38
  • 3
    I think you're looking for `stats::nls`? – Ian Campbell May 06 '21 at 17:26
  • Possible duplicate: https://stackoverflow.com/questions/14190883/fitting-a-curve-to-specific-data/15050715#15050715 – Ian Campbell May 06 '21 at 17:31
  • 1
    I think you will need more data for `nls`. I can't get a fit with only 5 observations and 2 parameters. Adding another point, e.g. x=8, y= 1.1 gives a fit for `DF.nls <- nls(y ~ (a * b * x)/(1 + (b * x)), data=DF, start=list(a=1, b=1))`. – dcarlson May 07 '21 at 04:09

0 Answers0