0

i was trying to generate parameter estimate for a nonlinear equation using r. i guess the starting points but i got the following error message: "error in exp^-((Ht - h5/(b1))) : non-numeric argument to binary operator" Ht and h5 are variables in the dataset and b1, b2, b3 are parameter to be estimated using nls.



g<- formula(D5^2 ~ Dbh^2* ((Ht- h5 - b1+ (b1*exp^-((Ht- h5/(b1))))
        + b2 *(Ht-h5)*(exp^(-h5/b3)))/
        (Ht-1.3 - b1 + b1*(exp^-(Ht-1.3)/b1) + b2* (Ht- 1.3)*(exp^(-1.3/b3)))))

h<- nls(g, data= odat,
        start = list(b1= 6.3, b2= 0.6, b3 = 1.4))

T.awesome
  • 1
  • 2

0 Answers0