[R] multiroot() anyone?
pgilbert at bank-banque-canada.ca
Wed Mar 20 16:27:51 CET 2002
Mai Zhou wrote:
> Dear list, Did anybody have something like multiroot(),
> similar to uniroot() only for several varibles/function?
> I know the difficulty several varibles bring. But for
> nice functions, it can be useful.
> We are thinking of writing one....I thought to ask first.
> Mai Zhou
If you can think of your function as a matrix polynomial then you can
find roots using polyroot() on the determinant of the polynomial matrix.
There are utilities in dse1 in the dse bundle on CRAN to do this. They
are oriented toward time series models but can pretty easily be trick to
work on a polynomial matrix. (I've sometimes considered organizing them
into a separate, more general package, but never had the time.) Please
note that this is not a very good way to do the calculation if there are
many roots, because of numerical conditioning problems in the polynomial
determinant representation. The default method in dse uses a different
calculation which is much more accurate for large problems.
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
More information about the R-help