nls() singular gradient matrix at initial parameter estimates error I am trying to run a nls() to interpolate height growth of a tree given a series of samples, where each sample has a value of age, and height. I am using the Richards (1959) method:
$$
\textrm{Height}=x\left(1-e^{-y\cdot\textrm{Age}}\right)^z
$$
my age and height values:
> age
[1]  0  3  6 17 29 47 57 63 72
> height
[1]   37   70  199  464  736 1008 1280 1462 1643
> 

the script I am using to calculate parameters x, y, and z, is:
e<-2.71828
growCurve<-nls(
  formula=height~x*(1-e^(-1*y*age))^z,
  start=c(x=0,y=0,z=0)
)
b <- environment(growCurve[["m"]][["incr"]])[["internalPars"]][1]
y <- environment(growCurve[["m"]][["incr"]])[["internalPars"]][2]
z <- environment(growCurve[["m"]][["incr"]])[["internalPars"]][3]

b
y
z

when I run this however, I get the error

singular gradient matrix at initial parameter estimates

I tried using another fix from this post, but I still get identical results so I am not really sure on how to proceed.

Minor point: Don't try to recreate the exponential function  in your code
The excellent answer by whuber shows how you can use the data to choose better starting values for your iteration and how you can constrain the search space appropriately.  This is something you should usually do when fitting nonlinear models using an iterative method.  One other minor thing I notice in your code is that you define your own constant e and then take powers of this in later steps to yield your own exponential function.  That is unecessary and it introduces additional rounding error.  Instead of trying to create the exponential function yourself, use the exp function built into the program.  (You will see that whuber has done this in his own code.)
