The R Project SVN R

Rev

Rev 72616 | Rev 87992 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 72616 Rev 74062
Line 88... Line 88...
88
## ------- and still is less accurate here than the gradient-only version
88
## ------- and still is less accurate here than the gradient-only version
89
 
89
 
90
## all converge here, too,  fgh now being best
90
## all converge here, too,  fgh now being best
91
utils::str(l3.10 <- nlm3(x0 = c(-10, 10), ndigit = 14, gradtol = 1e-8))
91
utils::str(l3.10 <- nlm3(x0 = c(-10, 10), ndigit = 14, gradtol = 1e-8))
92
 
92
 
-
 
93
## These tolerances were plucked from thin air: reduced for 32-bit Linux
93
chkNlm(l3.10, estimate = c(1,1), # lower tolerances now, notably for fgh:
94
chkNlm(l3.10, estimate = c(1,1), # lower tolerances now, notably for fgh:
94
       ##                  nl.f   nl.fg  nl.fgh
95
       ##                  nl.f   nl.fg  nl.fgh
95
       tols = list(min = c(1e-14, 1e-20, 1e-28),
96
       tols = list(min = c(1e-9, 1e-20, 1e-16),
96
                   est = c(5e-7,  1e-10, 1e-14),
97
                   est = c(2e-5,  1e-10, 1e-14),
97
                   grad= c(1e-6,  6e-9 , 1e-12)),
98
                   grad= c(1e-3,  6e-9 , 1e-12)),
98
       codes.wanted = if(Lb64) 1:2 else 1:3)
99
       codes.wanted = if(Lb64) 1:2 else 1:3)
99
 
100
 
100
## all 3 fail to converge here
101
## all 3 fail to converge here
101
utils::str(l3.1c <- nlm3(x0 = c(-100, 100), iterlim = 1000))
102
utils::str(l3.1c <- nlm3(x0 = c(-100, 100), iterlim = 1000))
102
## i.e., all convergence codes > 1:
103
## i.e., all convergence codes > 1: