Displaying 6 results from an estimated 6 matches for "extendint".
Did you mean:
extending
2023 Feb 18
1
uniroot violates bounds?
...nirootR for Martin M and he revised and put in
Rmpfr.
The following extends Ben's example, but adds the unirootR with trace
output.
c1 <- 4469.822
c2 <- 572.3413
f <- function(x) { c1/x - c2/(1-x) }; uniroot(f, c(1e-6, 1))
uniroot(f, c(1e-6, 1))
library(Rmpfr)
unirootR(f, c(1e-6, 1), extendInt="no", trace=1)
This gives more detail on the iterations, and it looks like the Inf is the
issue. But certainly we could do more to avoid "gotchas" like this. If
someone is interested in some back and forth, I'd be happy to give it a
try, but I think progress would be better...
2023 Feb 20
1
uniroot violates bounds?
...mpfr.
>
> The following extends Ben's example, but adds the unirootR with trace
> output.
>
> c1 <- 4469.822
> c2 <- 572.3413
> f <- function(x) { c1/x - c2/(1-x) }; uniroot(f, c(1e-6, 1))
> uniroot(f, c(1e-6, 1))
> library(Rmpfr)
> unirootR(f, c(1e-6, 1), extendInt="no", trace=1)
>
> This gives more detail on the iterations, and it looks like the Inf is
> the
> issue. But certainly we could do more to avoid "gotchas" like this. If
> someone is interested in some back and forth, I'd be happy to give it a
> try, but I...
2018 Jul 30
2
trace in uniroot() ?
...oot(ff, c(0, 10), trace=TRUE)
shows that the trace parameter, as described in the Rd file, does not seem to
be functional except in limited situations (and it suggests an
integer, then uses a logical for the example, e.g.,
## numerically, f(-|M|) becomes zero :
u3 <- uniroot(exp, c(0,2), extendInt="yes", trace=TRUE)
)
When extendInt is set, then there is some information output, but trace alone
produces nothing.
I looked at the source code -- it is in R-3.5.1/src/library/stats/R/nlm.R and
calls zeroin2 code from R-3.5.1/src/library/stats/src/optimize.c as far as I
can determing....
2018 Aug 13
1
trace in uniroot() ?
...s that the trace parameter, as described in the Rd file, does not seem to
> be functional except in limited situations (and it suggests an
> integer, then uses a logical for the example, e.g.,
> ?## numerically, f(-|M|) becomes zero :
> ? ? ?u3 <- uniroot(exp, c(0,2), extendInt="yes", trace=TRUE)
> )
>
> When extendInt is set, then there is some information output, but trace alone
> produces nothing.
>
> I looked at the source code -- it is in R-3.5.1/src/library/stats/R/nlm.R and
> calls zeroin2 code from R-3.5.1/src/l...
2023 Feb 18
0
uniroot violates bounds?
c1 <- 4469.822
c2 <- 572.3413
f <- function(x) { c1/x - c2/(1-x) }; uniroot(f, c(1e-6, 1))
uniroot(f, c(1e-6, 1))
provides a root at -6.00e-05, which is outside of the specified
bounds. The default value of the "extendInt" argument to uniroot() is
"no", as far as I can see ...
$root
[1] -6.003516e-05
$f.root
[1] -74453981
$iter
[1] 1
$init.it
[1] NA
$estim.prec
[1] 6.103516e-05
I suspect this fails because f(1) (value at the upper bound) is
infinite, although setting interval to c(0.01, 1)...
2018 Aug 13
0
trace in uniroot() ?
...;
> shows that the trace parameter, as described in the Rd file, does not seem
> to
> be functional except in limited situations (and it suggests an
> integer, then uses a logical for the example, e.g.,
> ## numerically, f(-|M|) becomes zero :
> u3 <- uniroot(exp, c(0,2), extendInt="yes", trace=TRUE)
> )
>
> When extendInt is set, then there is some information output, but trace
> alone
> produces nothing.
>
> I looked at the source code -- it is in R-3.5.1/src/library/stats/R/nlm.R
> and
> calls zeroin2 code from R-3.5.1/src/library/stats...