Skip to contents

Function performs stochastic root solving for the provided f(x) using the Robbins-Monro (1951) algorithm. Differs from deterministic cousins such as uniroot in that f may contain stochastic error components, where the root is obtained through the running average method provided by noise filter (see also PBA). Assumes that E[f(x)] is non-decreasing in x.

Usage

RobbinsMonro(
  f,
  p,
  ...,
  Polyak_Juditsky = FALSE,
  maxiter = 500L,
  miniter = 100L,
  k = 3L,
  tol = 1e-05,
  verbose = TRUE,
  fn.a = function(iter, a = 1, b = 1/2, c = 0, ...) a/(iter + c)^b
)

# S3 method for class 'RM'
print(x, ...)

# S3 method for class 'RM'
plot(x, par = 1, main = NULL, Polyak_Juditsky = FALSE, ...)

Arguments

f

noisy function for which the root is sought

p

vector of starting values to be passed as f(p, ...)

...

additional named arguments to be passed to f

Polyak_Juditsky

logical; apply the Polyak and Juditsky (1992) running-average method? Returns the final running average estimate using the Robbins-Monro updates (also applies to plot). Note that this should only be used when the step-sizes are sufficiently large so that the Robbins-Monro have the ability to stochastically explore around the root (not just approach it from one side, which occurs when using small steps)

maxiter

the maximum number of iterations (default 500)

miniter

minimum number of iterations (default 100)

k

number of consecutive tol criteria required before terminating

tol

tolerance criteria for convergence on the changes in the updated p elements. Must be achieved on k (default 3) successive occasions

verbose

logical; should the iterations and estimate be printed to the console?

fn.a

function to create the a coefficient in the Robbins-Monro noise filter. Requires the first argument is the current iteration (iter), provide one or more arguments, and (optionally) the .... Sequence function is of the form recommended by Spall (2000).

Note that if a different function is provided it must satisfy the property that \(\sum^\infty_{i=1} a_i = \infty\) and \(\sum^\infty_{i=1} a_i^2 < \infty\)

x

an object of class RM

par

which parameter in the original vector p to include in the plot

main

plot title

References

Polyak, B. T. and Juditsky, A. B. (1992). Acceleration of Stochastic Approximation by Averaging. SIAM Journal on Control and Optimization, 30(4):838.

Robbins, H. and Monro, S. (1951). A stochastic approximation method. Ann.Math.Statistics, 22:400-407.

Spall, J.C. (2000). Adaptive stochastic approximation by the simultaneous perturbation method. IEEE Trans. Autom. Control 45, 1839-1853.

See also

Examples


# find x that solves f(x) - b = 0 for the following
f.root <- function(x, b = .6) 1 / (1 + exp(-x)) - b
f.root(.3)
#> [1] -0.02555748

xs <- seq(-3,3, length.out=1000)
plot(xs, f.root(xs), type = 'l', ylab = "f(x)", xlab='x')
abline(h=0, col='red')

retuni <- uniroot(f.root, c(0,1))
retuni
#> $root
#> [1] 0.4054644
#> 
#> $f.root
#> [1] -1.772764e-07
#> 
#> $iter
#> [1] 4
#> 
#> $init.it
#> [1] NA
#> 
#> $estim.prec
#> [1] 6.103516e-05
#> 
abline(v=retuni$root, col='blue', lty=2)


# Robbins-Monro without noisy root, start with p=.9
retrm <- RobbinsMonro(f.root, .9)
#> 
Iter: 1; Max change in p = 0.111
Iter: 2; Max change in p = 0.062
Iter: 3; Max change in p = 0.043
Iter: 4; Max change in p = 0.032
Iter: 5; Max change in p = 0.026
Iter: 6; Max change in p = 0.021
Iter: 7; Max change in p = 0.018
Iter: 8; Max change in p = 0.015
Iter: 9; Max change in p = 0.013
Iter: 10; Max change in p = 0.011
Iter: 11; Max change in p = 0.010
Iter: 12; Max change in p = 0.009
Iter: 13; Max change in p = 0.008
Iter: 14; Max change in p = 0.007
Iter: 15; Max change in p = 0.007
Iter: 16; Max change in p = 0.006
Iter: 17; Max change in p = 0.005
Iter: 18; Max change in p = 0.005
Iter: 19; Max change in p = 0.005
Iter: 20; Max change in p = 0.004
Iter: 21; Max change in p = 0.004
Iter: 22; Max change in p = 0.004
Iter: 23; Max change in p = 0.003
Iter: 24; Max change in p = 0.003
Iter: 25; Max change in p = 0.003
Iter: 26; Max change in p = 0.003
Iter: 27; Max change in p = 0.003
Iter: 28; Max change in p = 0.002
Iter: 29; Max change in p = 0.002
Iter: 30; Max change in p = 0.002
Iter: 31; Max change in p = 0.002
Iter: 32; Max change in p = 0.002
Iter: 33; Max change in p = 0.002
Iter: 34; Max change in p = 0.002
Iter: 35; Max change in p = 0.002
Iter: 36; Max change in p = 0.002
Iter: 37; Max change in p = 0.001
Iter: 38; Max change in p = 0.001
Iter: 39; Max change in p = 0.001
Iter: 40; Max change in p = 0.001
Iter: 41; Max change in p = 0.001
Iter: 42; Max change in p = 0.001
Iter: 43; Max change in p = 0.001
Iter: 44; Max change in p = 0.001
Iter: 45; Max change in p = 0.001
Iter: 46; Max change in p = 0.001
Iter: 47; Max change in p = 0.001
Iter: 48; Max change in p = 0.001
Iter: 49; Max change in p = 0.001
Iter: 50; Max change in p = 0.001
Iter: 51; Max change in p = 0.001
Iter: 52; Max change in p = 0.001
Iter: 53; Max change in p = 0.001
Iter: 54; Max change in p = 0.001
Iter: 55; Max change in p = 0.001
Iter: 56; Max change in p = 0.001
Iter: 57; Max change in p = 0.001
Iter: 58; Max change in p = 0.001
Iter: 59; Max change in p = 0.001
Iter: 60; Max change in p = 0.000
Iter: 61; Max change in p = 0.000
Iter: 62; Max change in p = 0.000
Iter: 63; Max change in p = 0.000
Iter: 64; Max change in p = 0.000
Iter: 65; Max change in p = 0.000
Iter: 66; Max change in p = 0.000
Iter: 67; Max change in p = 0.000
Iter: 68; Max change in p = 0.000
Iter: 69; Max change in p = 0.000
Iter: 70; Max change in p = 0.000
Iter: 71; Max change in p = 0.000
Iter: 72; Max change in p = 0.000
Iter: 73; Max change in p = 0.000
Iter: 74; Max change in p = 0.000
Iter: 75; Max change in p = 0.000
Iter: 76; Max change in p = 0.000
Iter: 77; Max change in p = 0.000
Iter: 78; Max change in p = 0.000
Iter: 79; Max change in p = 0.000
Iter: 80; Max change in p = 0.000
Iter: 81; Max change in p = 0.000
Iter: 82; Max change in p = 0.000
Iter: 83; Max change in p = 0.000
Iter: 84; Max change in p = 0.000
Iter: 85; Max change in p = 0.000
Iter: 86; Max change in p = 0.000
Iter: 87; Max change in p = 0.000
Iter: 88; Max change in p = 0.000
Iter: 89; Max change in p = 0.000
Iter: 90; Max change in p = 0.000
Iter: 91; Max change in p = 0.000
Iter: 92; Max change in p = 0.000
Iter: 93; Max change in p = 0.000
Iter: 94; Max change in p = 0.000
Iter: 95; Max change in p = 0.000
Iter: 96; Max change in p = 0.000
Iter: 97; Max change in p = 0.000
Iter: 98; Max change in p = 0.000
Iter: 99; Max change in p = 0.000
Iter: 100; Max change in p = 0.000
Iter: 101; Max change in p = 0.000
Iter: 102; Max change in p = 0.000
Iter: 103; Max change in p = 0.000
Iter: 104; Max change in p = 0.000
Iter: 105; Max change in p = 0.000
Iter: 106; Max change in p = 0.000
Iter: 107; Max change in p = 0.000
Iter: 108; Max change in p = 0.000
Iter: 109; Max change in p = 0.000
Iter: 110; Max change in p = 0.000
Iter: 111; Max change in p = 0.000
Iter: 112; Max change in p = 0.000
Iter: 113; Max change in p = 0.000
Iter: 114; Max change in p = 0.000
Iter: 115; Max change in p = 0.000
Iter: 116; Max change in p = 0.000
Iter: 117; Max change in p = 0.000
Iter: 118; Max change in p = 0.000
Iter: 119; Max change in p = 0.000
Iter: 120; Max change in p = 0.000
Iter: 121; Max change in p = 0.000
Iter: 122; Max change in p = 0.000
Iter: 123; Max change in p = 0.000
Iter: 124; Max change in p = 0.000
Iter: 125; Max change in p = 0.000
Iter: 126; Max change in p = 0.000
Iter: 127; Max change in p = 0.000
Iter: 128; Max change in p = 0.000
Iter: 129; Max change in p = 0.000
Iter: 130; Max change in p = 0.000
Iter: 131; Max change in p = 0.000
Iter: 132; Max change in p = 0.000
Iter: 133; Max change in p = 0.000
Iter: 134; Max change in p = 0.000
Iter: 135; Max change in p = 0.000
Iter: 136; Max change in p = 0.000
Iter: 137; Max change in p = 0.000
Iter: 138; Max change in p = 0.000
Iter: 139; Max change in p = 0.000
Iter: 140; Max change in p = 0.000
Iter: 141; Max change in p = 0.000
Iter: 142; Max change in p = 0.000
Iter: 143; Max change in p = 0.000
Iter: 144; Max change in p = 0.000
Iter: 145; Max change in p = 0.000
Iter: 146; Max change in p = 0.000
Iter: 147; Max change in p = 0.000
Iter: 148; Max change in p = 0.000
Iter: 149; Max change in p = 0.000
Iter: 150; Max change in p = 0.000
Iter: 151; Max change in p = 0.000
Iter: 152; Max change in p = 0.000
Iter: 153; Max change in p = 0.000
Iter: 154; Max change in p = 0.000
Iter: 155; Max change in p = 0.000
Iter: 156; Max change in p = 0.000
Iter: 157; Max change in p = 0.000
Iter: 158; Max change in p = 0.000
Iter: 159; Max change in p = 0.000
Iter: 160; Max change in p = 0.000
Iter: 161; Max change in p = 0.000
Iter: 162; Max change in p = 0.000
Iter: 163; Max change in p = 0.000
Iter: 164; Max change in p = 0.000
Iter: 165; Max change in p = 0.000
Iter: 166; Max change in p = 0.000
Iter: 167; Max change in p = 0.000
Iter: 168; Max change in p = 0.000
Iter: 169; Max change in p = 0.000
Iter: 170; Max change in p = 0.000
Iter: 171; Max change in p = 0.000
Iter: 172; Max change in p = 0.000
Iter: 173; Max change in p = 0.000
Iter: 174; Max change in p = 0.000
Iter: 175; Max change in p = 0.000
Iter: 176; Max change in p = 0.000
Iter: 177; Max change in p = 0.000
Iter: 178; Max change in p = 0.000
Iter: 179; Max change in p = 0.000
Iter: 180; Max change in p = 0.000
Iter: 181; Max change in p = 0.000
Iter: 182; Max change in p = 0.000
Iter: 183; Max change in p = 0.000
Iter: 184; Max change in p = 0.000
Iter: 185; Max change in p = 0.000
Iter: 186; Max change in p = 0.000
Iter: 187; Max change in p = 0.000
Iter: 188; Max change in p = 0.000
Iter: 189; Max change in p = 0.000
Iter: 190; Max change in p = 0.000
Iter: 191; Max change in p = 0.000
Iter: 192; Max change in p = 0.000
Iter: 193; Max change in p = 0.000
Iter: 194; Max change in p = 0.000
Iter: 195; Max change in p = 0.000
Iter: 196; Max change in p = 0.000
Iter: 197; Max change in p = 0.000
Iter: 198; Max change in p = 0.000
Iter: 199; Max change in p = 0.000
Iter: 200; Max change in p = 0.000
Iter: 201; Max change in p = 0.000
Iter: 202; Max change in p = 0.000
Iter: 203; Max change in p = 0.000
Iter: 204; Max change in p = 0.000
Iter: 205; Max change in p = 0.000
Iter: 206; Max change in p = 0.000
Iter: 207; Max change in p = 0.000
Iter: 208; Max change in p = 0.000
Iter: 209; Max change in p = 0.000
Iter: 210; Max change in p = 0.000
Iter: 211; Max change in p = 0.000
Iter: 212; Max change in p = 0.000
retrm
#> [1] 0.4060382
plot(retrm)


# Same problem, however root function is now noisy. Hence, need to solve
#  fhat(x) - b + e = 0, where E(e) = 0
f.root_noisy <- function(x) 1 / (1 + exp(-x)) - .6 + rnorm(1, sd=.02)
sapply(rep(.3, 10), f.root_noisy)
#>  [1] -0.054412751 -0.036751696 -0.025966561 -0.014003517  0.004254432
#>  [6] -0.035781165 -0.045079269 -0.059757656 -0.035333325 -0.043135155

# uniroot "converges" unreliably
set.seed(123)
uniroot(f.root_noisy, c(0,1))$root
#> [1] 0.3748233
uniroot(f.root_noisy, c(0,1))$root
#> [1] 0.3785736
uniroot(f.root_noisy, c(0,1))$root
#> [1] 0.4954932

# Robbins-Monro provides better convergence
retrm.noise <- RobbinsMonro(f.root_noisy, .9)
#> 
Iter: 1; Max change in p = 0.129
Iter: 2; Max change in p = 0.072
Iter: 3; Max change in p = 0.049
Iter: 4; Max change in p = 0.035
Iter: 5; Max change in p = 0.027
Iter: 6; Max change in p = 0.017
Iter: 7; Max change in p = 0.012
Iter: 8; Max change in p = 0.010
Iter: 9; Max change in p = 0.007
Iter: 10; Max change in p = 0.009
Iter: 11; Max change in p = 0.001
Iter: 12; Max change in p = 0.021
Iter: 13; Max change in p = 0.014
Iter: 14; Max change in p = 0.000
Iter: 15; Max change in p = 0.004
Iter: 16; Max change in p = 0.003
Iter: 17; Max change in p = 0.009
Iter: 18; Max change in p = 0.004
Iter: 19; Max change in p = 0.005
Iter: 20; Max change in p = 0.003
Iter: 21; Max change in p = 0.003
Iter: 22; Max change in p = 0.009
Iter: 23; Max change in p = 0.002
Iter: 24; Max change in p = 0.009
Iter: 25; Max change in p = 0.004
Iter: 26; Max change in p = 0.004
Iter: 27; Max change in p = 0.002
Iter: 28; Max change in p = 0.003
Iter: 29; Max change in p = 0.003
Iter: 30; Max change in p = 0.000
Iter: 31; Max change in p = 0.000
Iter: 32; Max change in p = 0.002
Iter: 33; Max change in p = 0.002
Iter: 34; Max change in p = 0.003
Iter: 35; Max change in p = 0.003
Iter: 36; Max change in p = 0.001
Iter: 37; Max change in p = 0.004
Iter: 38; Max change in p = 0.008
Iter: 39; Max change in p = 0.001
Iter: 40; Max change in p = 0.007
Iter: 41; Max change in p = 0.004
Iter: 42; Max change in p = 0.001
Iter: 43; Max change in p = 0.001
Iter: 44; Max change in p = 0.004
Iter: 45; Max change in p = 0.000
Iter: 46; Max change in p = 0.003
Iter: 47; Max change in p = 0.001
Iter: 48; Max change in p = 0.000
Iter: 49; Max change in p = 0.001
Iter: 50; Max change in p = 0.002
Iter: 51; Max change in p = 0.000
Iter: 52; Max change in p = 0.002
Iter: 53; Max change in p = 0.000
Iter: 54; Max change in p = 0.001
Iter: 55; Max change in p = 0.003
Iter: 56; Max change in p = 0.002
Iter: 57; Max change in p = 0.001
Iter: 58; Max change in p = 0.003
Iter: 59; Max change in p = 0.003
Iter: 60; Max change in p = 0.002
Iter: 61; Max change in p = 0.001
Iter: 62; Max change in p = 0.002
Iter: 63; Max change in p = 0.004
Iter: 64; Max change in p = 0.001
Iter: 65; Max change in p = 0.005
Iter: 66; Max change in p = 0.004
Iter: 67; Max change in p = 0.001
Iter: 68; Max change in p = 0.003
Iter: 69; Max change in p = 0.002
Iter: 70; Max change in p = 0.001
Iter: 71; Max change in p = 0.001
Iter: 72; Max change in p = 0.001
Iter: 73; Max change in p = 0.002
Iter: 74; Max change in p = 0.000
Iter: 75; Max change in p = 0.002
Iter: 76; Max change in p = 0.004
Iter: 77; Max change in p = 0.001
Iter: 78; Max change in p = 0.002
Iter: 79; Max change in p = 0.001
Iter: 80; Max change in p = 0.002
Iter: 81; Max change in p = 0.003
Iter: 82; Max change in p = 0.000
Iter: 83; Max change in p = 0.001
Iter: 84; Max change in p = 0.001
Iter: 85; Max change in p = 0.000
Iter: 86; Max change in p = 0.001
Iter: 87; Max change in p = 0.002
Iter: 88; Max change in p = 0.002
Iter: 89; Max change in p = 0.001
Iter: 90; Max change in p = 0.002
Iter: 91; Max change in p = 0.001
Iter: 92; Max change in p = 0.000
Iter: 93; Max change in p = 0.004
Iter: 94; Max change in p = 0.001
Iter: 95; Max change in p = 0.001
Iter: 96; Max change in p = 0.000
Iter: 97; Max change in p = 0.002
Iter: 98; Max change in p = 0.000
Iter: 99; Max change in p = 0.003
Iter: 100; Max change in p = 0.001
Iter: 101; Max change in p = 0.000
Iter: 102; Max change in p = 0.001
Iter: 103; Max change in p = 0.004
Iter: 104; Max change in p = 0.002
Iter: 105; Max change in p = 0.003
Iter: 106; Max change in p = 0.002
Iter: 107; Max change in p = 0.004
Iter: 108; Max change in p = 0.003
Iter: 109; Max change in p = 0.002
Iter: 110; Max change in p = 0.000
Iter: 111; Max change in p = 0.003
Iter: 112; Max change in p = 0.003
Iter: 113; Max change in p = 0.003
Iter: 114; Max change in p = 0.001
Iter: 115; Max change in p = 0.002
Iter: 116; Max change in p = 0.002
Iter: 117; Max change in p = 0.004
Iter: 118; Max change in p = 0.002
Iter: 119; Max change in p = 0.002
Iter: 120; Max change in p = 0.002
Iter: 121; Max change in p = 0.001
Iter: 122; Max change in p = 0.002
Iter: 123; Max change in p = 0.000
Iter: 124; Max change in p = 0.000
Iter: 125; Max change in p = 0.001
Iter: 126; Max change in p = 0.000
Iter: 127; Max change in p = 0.002
Iter: 128; Max change in p = 0.000
Iter: 129; Max change in p = 0.002
Iter: 130; Max change in p = 0.002
Iter: 131; Max change in p = 0.002
Iter: 132; Max change in p = 0.006
Iter: 133; Max change in p = 0.001
Iter: 134; Max change in p = 0.001
Iter: 135; Max change in p = 0.001
Iter: 136; Max change in p = 0.001
Iter: 137; Max change in p = 0.001
Iter: 138; Max change in p = 0.001
Iter: 139; Max change in p = 0.000
Iter: 140; Max change in p = 0.000
Iter: 141; Max change in p = 0.000
Iter: 142; Max change in p = 0.004
Iter: 143; Max change in p = 0.001
Iter: 144; Max change in p = 0.002
Iter: 145; Max change in p = 0.000
Iter: 146; Max change in p = 0.001
Iter: 147; Max change in p = 0.001
Iter: 148; Max change in p = 0.001
Iter: 149; Max change in p = 0.002
Iter: 150; Max change in p = 0.002
Iter: 151; Max change in p = 0.001
Iter: 152; Max change in p = 0.001
Iter: 153; Max change in p = 0.000
Iter: 154; Max change in p = 0.000
Iter: 155; Max change in p = 0.002
Iter: 156; Max change in p = 0.000
Iter: 157; Max change in p = 0.001
Iter: 158; Max change in p = 0.001
Iter: 159; Max change in p = 0.000
Iter: 160; Max change in p = 0.000
Iter: 161; Max change in p = 0.000
Iter: 162; Max change in p = 0.001
Iter: 163; Max change in p = 0.002
Iter: 164; Max change in p = 0.003
Iter: 165; Max change in p = 0.001
Iter: 166; Max change in p = 0.002
Iter: 167; Max change in p = 0.001
Iter: 168; Max change in p = 0.002
Iter: 169; Max change in p = 0.003
Iter: 170; Max change in p = 0.002
Iter: 171; Max change in p = 0.000
Iter: 172; Max change in p = 0.001
Iter: 173; Max change in p = 0.001
Iter: 174; Max change in p = 0.001
Iter: 175; Max change in p = 0.001
Iter: 176; Max change in p = 0.001
Iter: 177; Max change in p = 0.003
Iter: 178; Max change in p = 0.000
Iter: 179; Max change in p = 0.000
Iter: 180; Max change in p = 0.000
Iter: 181; Max change in p = 0.002
Iter: 182; Max change in p = 0.001
Iter: 183; Max change in p = 0.001
Iter: 184; Max change in p = 0.002
Iter: 185; Max change in p = 0.001
Iter: 186; Max change in p = 0.001
Iter: 187; Max change in p = 0.002
Iter: 188; Max change in p = 0.002
Iter: 189; Max change in p = 0.001
Iter: 190; Max change in p = 0.001
Iter: 191; Max change in p = 0.002
Iter: 192; Max change in p = 0.001
Iter: 193; Max change in p = 0.001
Iter: 194; Max change in p = 0.000
Iter: 195; Max change in p = 0.001
Iter: 196; Max change in p = 0.001
Iter: 197; Max change in p = 0.001
Iter: 198; Max change in p = 0.001
Iter: 199; Max change in p = 0.003
Iter: 200; Max change in p = 0.000
Iter: 201; Max change in p = 0.000
Iter: 202; Max change in p = 0.001
Iter: 203; Max change in p = 0.001
Iter: 204; Max change in p = 0.002
Iter: 205; Max change in p = 0.000
Iter: 206; Max change in p = 0.001
Iter: 207; Max change in p = 0.000
Iter: 208; Max change in p = 0.001
Iter: 209; Max change in p = 0.001
Iter: 210; Max change in p = 0.001
Iter: 211; Max change in p = 0.002
Iter: 212; Max change in p = 0.002
Iter: 213; Max change in p = 0.000
Iter: 214; Max change in p = 0.003
Iter: 215; Max change in p = 0.000
Iter: 216; Max change in p = 0.002
Iter: 217; Max change in p = 0.001
Iter: 218; Max change in p = 0.001
Iter: 219; Max change in p = 0.000
Iter: 220; Max change in p = 0.001
Iter: 221; Max change in p = 0.000
Iter: 222; Max change in p = 0.000
Iter: 223; Max change in p = 0.002
Iter: 224; Max change in p = 0.000
Iter: 225; Max change in p = 0.001
Iter: 226; Max change in p = 0.001
Iter: 227; Max change in p = 0.000
Iter: 228; Max change in p = 0.002
Iter: 229; Max change in p = 0.001
Iter: 230; Max change in p = 0.001
Iter: 231; Max change in p = 0.000
Iter: 232; Max change in p = 0.002
Iter: 233; Max change in p = 0.003
Iter: 234; Max change in p = 0.002
Iter: 235; Max change in p = 0.000
Iter: 236; Max change in p = 0.002
Iter: 237; Max change in p = 0.001
Iter: 238; Max change in p = 0.000
Iter: 239; Max change in p = 0.001
Iter: 240; Max change in p = 0.001
Iter: 241; Max change in p = 0.001
Iter: 242; Max change in p = 0.002
Iter: 243; Max change in p = 0.001
Iter: 244; Max change in p = 0.001
Iter: 245; Max change in p = 0.000
Iter: 246; Max change in p = 0.000
Iter: 247; Max change in p = 0.001
Iter: 248; Max change in p = 0.000
Iter: 249; Max change in p = 0.002
Iter: 250; Max change in p = 0.001
Iter: 251; Max change in p = 0.000
Iter: 252; Max change in p = 0.000
Iter: 253; Max change in p = 0.000
Iter: 254; Max change in p = 0.000
Iter: 255; Max change in p = 0.000
Iter: 256; Max change in p = 0.002
Iter: 257; Max change in p = 0.000
Iter: 258; Max change in p = 0.000
Iter: 259; Max change in p = 0.001
Iter: 260; Max change in p = 0.001
Iter: 261; Max change in p = 0.001
Iter: 262; Max change in p = 0.001
Iter: 263; Max change in p = 0.002
Iter: 264; Max change in p = 0.000
Iter: 265; Max change in p = 0.002
Iter: 266; Max change in p = 0.002
Iter: 267; Max change in p = 0.000
Iter: 268; Max change in p = 0.001
Iter: 269; Max change in p = 0.001
Iter: 270; Max change in p = 0.001
Iter: 271; Max change in p = 0.001
Iter: 272; Max change in p = 0.001
Iter: 273; Max change in p = 0.001
Iter: 274; Max change in p = 0.000
Iter: 275; Max change in p = 0.003
Iter: 276; Max change in p = 0.000
Iter: 277; Max change in p = 0.001
Iter: 278; Max change in p = 0.002
Iter: 279; Max change in p = 0.001
Iter: 280; Max change in p = 0.001
Iter: 281; Max change in p = 0.002
Iter: 282; Max change in p = 0.001
Iter: 283; Max change in p = 0.001
Iter: 284; Max change in p = 0.001
Iter: 285; Max change in p = 0.000
Iter: 286; Max change in p = 0.002
Iter: 287; Max change in p = 0.002
Iter: 288; Max change in p = 0.001
Iter: 289; Max change in p = 0.000
Iter: 290; Max change in p = 0.001
Iter: 291; Max change in p = 0.002
Iter: 292; Max change in p = 0.001
Iter: 293; Max change in p = 0.001
Iter: 294; Max change in p = 0.001
Iter: 295; Max change in p = 0.000
Iter: 296; Max change in p = 0.001
Iter: 297; Max change in p = 0.001
Iter: 298; Max change in p = 0.000
Iter: 299; Max change in p = 0.001
Iter: 300; Max change in p = 0.002
Iter: 301; Max change in p = 0.001
Iter: 302; Max change in p = 0.002
Iter: 303; Max change in p = 0.000
Iter: 304; Max change in p = 0.002
Iter: 305; Max change in p = 0.002
Iter: 306; Max change in p = 0.000
Iter: 307; Max change in p = 0.001
Iter: 308; Max change in p = 0.000
Iter: 309; Max change in p = 0.001
Iter: 310; Max change in p = 0.001
Iter: 311; Max change in p = 0.002
Iter: 312; Max change in p = 0.000
Iter: 313; Max change in p = 0.000
Iter: 314; Max change in p = 0.002
Iter: 315; Max change in p = 0.000
Iter: 316; Max change in p = 0.001
Iter: 317; Max change in p = 0.001
Iter: 318; Max change in p = 0.000
Iter: 319; Max change in p = 0.001
Iter: 320; Max change in p = 0.002
Iter: 321; Max change in p = 0.001
Iter: 322; Max change in p = 0.000
Iter: 323; Max change in p = 0.001
Iter: 324; Max change in p = 0.000
Iter: 325; Max change in p = 0.000
Iter: 326; Max change in p = 0.000
Iter: 327; Max change in p = 0.003
Iter: 328; Max change in p = 0.003
Iter: 329; Max change in p = 0.000
Iter: 330; Max change in p = 0.001
Iter: 331; Max change in p = 0.000
Iter: 332; Max change in p = 0.001
Iter: 333; Max change in p = 0.001
Iter: 334; Max change in p = 0.000
Iter: 335; Max change in p = 0.000
Iter: 336; Max change in p = 0.001
Iter: 337; Max change in p = 0.001
Iter: 338; Max change in p = 0.001
Iter: 339; Max change in p = 0.003
Iter: 340; Max change in p = 0.002
Iter: 341; Max change in p = 0.001
Iter: 342; Max change in p = 0.001
Iter: 343; Max change in p = 0.000
Iter: 344; Max change in p = 0.001
Iter: 345; Max change in p = 0.001
Iter: 346; Max change in p = 0.000
Iter: 347; Max change in p = 0.000
Iter: 348; Max change in p = 0.002
Iter: 349; Max change in p = 0.000
Iter: 350; Max change in p = 0.000
Iter: 351; Max change in p = 0.000
Iter: 352; Max change in p = 0.001
Iter: 353; Max change in p = 0.000
Iter: 354; Max change in p = 0.001
Iter: 355; Max change in p = 0.000
Iter: 356; Max change in p = 0.001
Iter: 357; Max change in p = 0.000
Iter: 358; Max change in p = 0.000
Iter: 359; Max change in p = 0.001
Iter: 360; Max change in p = 0.002
Iter: 361; Max change in p = 0.001
Iter: 362; Max change in p = 0.001
Iter: 363; Max change in p = 0.001
Iter: 364; Max change in p = 0.002
Iter: 365; Max change in p = 0.001
Iter: 366; Max change in p = 0.001
Iter: 367; Max change in p = 0.001
Iter: 368; Max change in p = 0.000
Iter: 369; Max change in p = 0.000
Iter: 370; Max change in p = 0.001
Iter: 371; Max change in p = 0.001
Iter: 372; Max change in p = 0.000
Iter: 373; Max change in p = 0.001
Iter: 374; Max change in p = 0.002
Iter: 375; Max change in p = 0.000
Iter: 376; Max change in p = 0.001
Iter: 377; Max change in p = 0.001
Iter: 378; Max change in p = 0.000
Iter: 379; Max change in p = 0.001
Iter: 380; Max change in p = 0.000
Iter: 381; Max change in p = 0.001
Iter: 382; Max change in p = 0.000
Iter: 383; Max change in p = 0.000
Iter: 384; Max change in p = 0.003
Iter: 385; Max change in p = 0.000
Iter: 386; Max change in p = 0.000
Iter: 387; Max change in p = 0.001
Iter: 388; Max change in p = 0.001
Iter: 389; Max change in p = 0.002
Iter: 390; Max change in p = 0.000
Iter: 391; Max change in p = 0.000
Iter: 392; Max change in p = 0.001
Iter: 393; Max change in p = 0.001
Iter: 394; Max change in p = 0.000
Iter: 395; Max change in p = 0.002
Iter: 396; Max change in p = 0.000
Iter: 397; Max change in p = 0.002
Iter: 398; Max change in p = 0.001
Iter: 399; Max change in p = 0.000
Iter: 400; Max change in p = 0.000
Iter: 401; Max change in p = 0.000
Iter: 402; Max change in p = 0.001
Iter: 403; Max change in p = 0.000
Iter: 404; Max change in p = 0.001
Iter: 405; Max change in p = 0.001
Iter: 406; Max change in p = 0.001
Iter: 407; Max change in p = 0.002
Iter: 408; Max change in p = 0.001
Iter: 409; Max change in p = 0.001
Iter: 410; Max change in p = 0.000
Iter: 411; Max change in p = 0.001
Iter: 412; Max change in p = 0.000
Iter: 413; Max change in p = 0.001
Iter: 414; Max change in p = 0.000
Iter: 415; Max change in p = 0.000
Iter: 416; Max change in p = 0.001
Iter: 417; Max change in p = 0.002
Iter: 418; Max change in p = 0.002
Iter: 419; Max change in p = 0.001
Iter: 420; Max change in p = 0.001
Iter: 421; Max change in p = 0.000
Iter: 422; Max change in p = 0.001
Iter: 423; Max change in p = 0.001
Iter: 424; Max change in p = 0.003
Iter: 425; Max change in p = 0.001
Iter: 426; Max change in p = 0.000
Iter: 427; Max change in p = 0.000
Iter: 428; Max change in p = 0.000
Iter: 429; Max change in p = 0.001
Iter: 430; Max change in p = 0.000
Iter: 431; Max change in p = 0.001
Iter: 432; Max change in p = 0.000
Iter: 433; Max change in p = 0.001
Iter: 434; Max change in p = 0.001
Iter: 435; Max change in p = 0.001
Iter: 436; Max change in p = 0.002
Iter: 437; Max change in p = 0.000
Iter: 438; Max change in p = 0.001
Iter: 439; Max change in p = 0.002
Iter: 440; Max change in p = 0.000
Iter: 441; Max change in p = 0.001
Iter: 442; Max change in p = 0.000
Iter: 443; Max change in p = 0.000
Iter: 444; Max change in p = 0.000
Iter: 445; Max change in p = 0.002
Iter: 446; Max change in p = 0.000
Iter: 447; Max change in p = 0.000
Iter: 448; Max change in p = 0.000
Iter: 449; Max change in p = 0.000
Iter: 450; Max change in p = 0.000
Iter: 451; Max change in p = 0.001
Iter: 452; Max change in p = 0.000
Iter: 453; Max change in p = 0.001
Iter: 454; Max change in p = 0.001
Iter: 455; Max change in p = 0.001
Iter: 456; Max change in p = 0.001
Iter: 457; Max change in p = 0.001
Iter: 458; Max change in p = 0.000
Iter: 459; Max change in p = 0.000
Iter: 460; Max change in p = 0.001
Iter: 461; Max change in p = 0.001
Iter: 462; Max change in p = 0.001
Iter: 463; Max change in p = 0.001
Iter: 464; Max change in p = 0.001
Iter: 465; Max change in p = 0.000
Iter: 466; Max change in p = 0.000
Iter: 467; Max change in p = 0.000
Iter: 468; Max change in p = 0.000
Iter: 469; Max change in p = 0.001
Iter: 470; Max change in p = 0.001
Iter: 471; Max change in p = 0.001
Iter: 472; Max change in p = 0.001
Iter: 473; Max change in p = 0.001
Iter: 474; Max change in p = 0.000
Iter: 475; Max change in p = 0.001
Iter: 476; Max change in p = 0.002
Iter: 477; Max change in p = 0.000
Iter: 478; Max change in p = 0.000
Iter: 479; Max change in p = 0.000
Iter: 480; Max change in p = 0.000
Iter: 481; Max change in p = 0.001
Iter: 482; Max change in p = 0.000
Iter: 483; Max change in p = 0.001
Iter: 484; Max change in p = 0.001
Iter: 485; Max change in p = 0.000
Iter: 486; Max change in p = 0.000
Iter: 487; Max change in p = 0.001
Iter: 488; Max change in p = 0.000
Iter: 489; Max change in p = 0.001
Iter: 490; Max change in p = 0.000
Iter: 491; Max change in p = 0.001
Iter: 492; Max change in p = 0.000
Iter: 493; Max change in p = 0.001
Iter: 494; Max change in p = 0.000
Iter: 495; Max change in p = 0.001
Iter: 496; Max change in p = 0.000
Iter: 497; Max change in p = 0.000
Iter: 498; Max change in p = 0.001
Iter: 499; Max change in p = 0.000
Iter: 500; Max change in p = 0.001
retrm.noise
#> [1] 0.401403
plot(retrm.noise)


# different power (b) for fn.a()
retrm.b2 <- RobbinsMonro(f.root_noisy, .9, b = .01)
#> 
Iter: 1; Max change in p = 0.083
Iter: 2; Max change in p = 0.096
Iter: 3; Max change in p = 0.111
Iter: 4; Max change in p = 0.063
Iter: 5; Max change in p = 0.056
Iter: 6; Max change in p = 0.027
Iter: 7; Max change in p = 0.002
Iter: 8; Max change in p = 0.009
Iter: 9; Max change in p = 0.006
Iter: 10; Max change in p = 0.001
Iter: 11; Max change in p = 0.023
Iter: 12; Max change in p = 0.019
Iter: 13; Max change in p = 0.026
Iter: 14; Max change in p = 0.020
Iter: 15; Max change in p = 0.025
Iter: 16; Max change in p = 0.016
Iter: 17; Max change in p = 0.047
Iter: 18; Max change in p = 0.022
Iter: 19; Max change in p = 0.011
Iter: 20; Max change in p = 0.023
Iter: 21; Max change in p = 0.019
Iter: 22; Max change in p = 0.002
Iter: 23; Max change in p = 0.025
Iter: 24; Max change in p = 0.041
Iter: 25; Max change in p = 0.004
Iter: 26; Max change in p = 0.012
Iter: 27; Max change in p = 0.003
Iter: 28; Max change in p = 0.011
Iter: 29; Max change in p = 0.012
Iter: 30; Max change in p = 0.018
Iter: 31; Max change in p = 0.018
Iter: 32; Max change in p = 0.036
Iter: 33; Max change in p = 0.024
Iter: 34; Max change in p = 0.006
Iter: 35; Max change in p = 0.013
Iter: 36; Max change in p = 0.011
Iter: 37; Max change in p = 0.009
Iter: 38; Max change in p = 0.001
Iter: 39; Max change in p = 0.018
Iter: 40; Max change in p = 0.033
Iter: 41; Max change in p = 0.012
Iter: 42; Max change in p = 0.012
Iter: 43; Max change in p = 0.006
Iter: 44; Max change in p = 0.031
Iter: 45; Max change in p = 0.010
Iter: 46; Max change in p = 0.004
Iter: 47; Max change in p = 0.033
Iter: 48; Max change in p = 0.004
Iter: 49; Max change in p = 0.004
Iter: 50; Max change in p = 0.001
Iter: 51; Max change in p = 0.020
Iter: 52; Max change in p = 0.017
Iter: 53; Max change in p = 0.016
Iter: 54; Max change in p = 0.003
Iter: 55; Max change in p = 0.014
Iter: 56; Max change in p = 0.012
Iter: 57; Max change in p = 0.017
Iter: 58; Max change in p = 0.023
Iter: 59; Max change in p = 0.047
Iter: 60; Max change in p = 0.027
Iter: 61; Max change in p = 0.028
Iter: 62; Max change in p = 0.000
Iter: 63; Max change in p = 0.015
Iter: 64; Max change in p = 0.020
Iter: 65; Max change in p = 0.004
Iter: 66; Max change in p = 0.032
Iter: 67; Max change in p = 0.036
Iter: 68; Max change in p = 0.040
Iter: 69; Max change in p = 0.016
Iter: 70; Max change in p = 0.009
Iter: 71; Max change in p = 0.007
Iter: 72; Max change in p = 0.034
Iter: 73; Max change in p = 0.018
Iter: 74; Max change in p = 0.005
Iter: 75; Max change in p = 0.012
Iter: 76; Max change in p = 0.024
Iter: 77; Max change in p = 0.003
Iter: 78; Max change in p = 0.008
Iter: 79; Max change in p = 0.002
Iter: 80; Max change in p = 0.014
Iter: 81; Max change in p = 0.045
Iter: 82; Max change in p = 0.002
Iter: 83; Max change in p = 0.022
Iter: 84; Max change in p = 0.053
Iter: 85; Max change in p = 0.000
Iter: 86; Max change in p = 0.004
Iter: 87; Max change in p = 0.014
Iter: 88; Max change in p = 0.042
Iter: 89; Max change in p = 0.024
Iter: 90; Max change in p = 0.015
Iter: 91; Max change in p = 0.021
Iter: 92; Max change in p = 0.004
Iter: 93; Max change in p = 0.017
Iter: 94; Max change in p = 0.021
Iter: 95; Max change in p = 0.002
Iter: 96; Max change in p = 0.022
Iter: 97; Max change in p = 0.023
Iter: 98; Max change in p = 0.048
Iter: 99; Max change in p = 0.015
Iter: 100; Max change in p = 0.034
Iter: 101; Max change in p = 0.019
Iter: 102; Max change in p = 0.010
Iter: 103; Max change in p = 0.024
Iter: 104; Max change in p = 0.030
Iter: 105; Max change in p = 0.012
Iter: 106; Max change in p = 0.033
Iter: 107; Max change in p = 0.016
Iter: 108; Max change in p = 0.009
Iter: 109; Max change in p = 0.014
Iter: 110; Max change in p = 0.011
Iter: 111; Max change in p = 0.006
Iter: 112; Max change in p = 0.014
Iter: 113; Max change in p = 0.009
Iter: 114; Max change in p = 0.018
Iter: 115; Max change in p = 0.019
Iter: 116; Max change in p = 0.005
Iter: 117; Max change in p = 0.016
Iter: 118; Max change in p = 0.017
Iter: 119; Max change in p = 0.042
Iter: 120; Max change in p = 0.006
Iter: 121; Max change in p = 0.014
Iter: 122; Max change in p = 0.028
Iter: 123; Max change in p = 0.015
Iter: 124; Max change in p = 0.013
Iter: 125; Max change in p = 0.025
Iter: 126; Max change in p = 0.010
Iter: 127; Max change in p = 0.012
Iter: 128; Max change in p = 0.003
Iter: 129; Max change in p = 0.012
Iter: 130; Max change in p = 0.019
Iter: 131; Max change in p = 0.026
Iter: 132; Max change in p = 0.018
Iter: 133; Max change in p = 0.056
Iter: 134; Max change in p = 0.000
Iter: 135; Max change in p = 0.003
Iter: 136; Max change in p = 0.004
Iter: 137; Max change in p = 0.010
Iter: 138; Max change in p = 0.017
Iter: 139; Max change in p = 0.016
Iter: 140; Max change in p = 0.008
Iter: 141; Max change in p = 0.007
Iter: 142; Max change in p = 0.013
Iter: 143; Max change in p = 0.002
Iter: 144; Max change in p = 0.037
Iter: 145; Max change in p = 0.013
Iter: 146; Max change in p = 0.014
Iter: 147; Max change in p = 0.002
Iter: 148; Max change in p = 0.002
Iter: 149; Max change in p = 0.022
Iter: 150; Max change in p = 0.028
Iter: 151; Max change in p = 0.011
Iter: 152; Max change in p = 0.013
Iter: 153; Max change in p = 0.011
Iter: 154; Max change in p = 0.003
Iter: 155; Max change in p = 0.006
Iter: 156; Max change in p = 0.018
Iter: 157; Max change in p = 0.001
Iter: 158; Max change in p = 0.034
Iter: 159; Max change in p = 0.011
Iter: 160; Max change in p = 0.033
Iter: 161; Max change in p = 0.026
Iter: 162; Max change in p = 0.018
Iter: 163; Max change in p = 0.028
Iter: 164; Max change in p = 0.054
Iter: 165; Max change in p = 0.008
Iter: 166; Max change in p = 0.005
Iter: 167; Max change in p = 0.006
Iter: 168; Max change in p = 0.034
Iter: 169; Max change in p = 0.009
Iter: 170; Max change in p = 0.023
Iter: 171; Max change in p = 0.001
Iter: 172; Max change in p = 0.014
Iter: 173; Max change in p = 0.017
Iter: 174; Max change in p = 0.024
Iter: 175; Max change in p = 0.013
Iter: 176; Max change in p = 0.013
Iter: 177; Max change in p = 0.012
Iter: 178; Max change in p = 0.019
Iter: 179; Max change in p = 0.021
Iter: 180; Max change in p = 0.008
Iter: 181; Max change in p = 0.004
Iter: 182; Max change in p = 0.003
Iter: 183; Max change in p = 0.027
Iter: 184; Max change in p = 0.015
Iter: 185; Max change in p = 0.006
Iter: 186; Max change in p = 0.017
Iter: 187; Max change in p = 0.000
Iter: 188; Max change in p = 0.000
Iter: 189; Max change in p = 0.027
Iter: 190; Max change in p = 0.034
Iter: 191; Max change in p = 0.019
Iter: 192; Max change in p = 0.027
Iter: 193; Max change in p = 0.008
Iter: 194; Max change in p = 0.011
Iter: 195; Max change in p = 0.015
Iter: 196; Max change in p = 0.004
Iter: 197; Max change in p = 0.014
Iter: 198; Max change in p = 0.022
Iter: 199; Max change in p = 0.031
Iter: 200; Max change in p = 0.008
Iter: 201; Max change in p = 0.048
Iter: 202; Max change in p = 0.027
Iter: 203; Max change in p = 0.007
Iter: 204; Max change in p = 0.006
Iter: 205; Max change in p = 0.006
Iter: 206; Max change in p = 0.009
Iter: 207; Max change in p = 0.006
Iter: 208; Max change in p = 0.016
Iter: 209; Max change in p = 0.006
Iter: 210; Max change in p = 0.010
Iter: 211; Max change in p = 0.034
Iter: 212; Max change in p = 0.006
Iter: 213; Max change in p = 0.013
Iter: 214; Max change in p = 0.056
Iter: 215; Max change in p = 0.050
Iter: 216; Max change in p = 0.022
Iter: 217; Max change in p = 0.037
Iter: 218; Max change in p = 0.009
Iter: 219; Max change in p = 0.015
Iter: 220; Max change in p = 0.020
Iter: 221; Max change in p = 0.003
Iter: 222; Max change in p = 0.008
Iter: 223; Max change in p = 0.014
Iter: 224; Max change in p = 0.010
Iter: 225; Max change in p = 0.014
Iter: 226; Max change in p = 0.012
Iter: 227; Max change in p = 0.044
Iter: 228; Max change in p = 0.001
Iter: 229; Max change in p = 0.015
Iter: 230; Max change in p = 0.013
Iter: 231; Max change in p = 0.010
Iter: 232; Max change in p = 0.036
Iter: 233; Max change in p = 0.011
Iter: 234; Max change in p = 0.020
Iter: 235; Max change in p = 0.021
Iter: 236; Max change in p = 0.012
Iter: 237; Max change in p = 0.011
Iter: 238; Max change in p = 0.026
Iter: 239; Max change in p = 0.040
Iter: 240; Max change in p = 0.008
Iter: 241; Max change in p = 0.011
Iter: 242; Max change in p = 0.031
Iter: 243; Max change in p = 0.012
Iter: 244; Max change in p = 0.040
Iter: 245; Max change in p = 0.005
Iter: 246; Max change in p = 0.009
Iter: 247; Max change in p = 0.007
Iter: 248; Max change in p = 0.009
Iter: 249; Max change in p = 0.014
Iter: 250; Max change in p = 0.013
Iter: 251; Max change in p = 0.007
Iter: 252; Max change in p = 0.028
Iter: 253; Max change in p = 0.024
Iter: 254; Max change in p = 0.005
Iter: 255; Max change in p = 0.022
Iter: 256; Max change in p = 0.035
Iter: 257; Max change in p = 0.026
Iter: 258; Max change in p = 0.003
Iter: 259; Max change in p = 0.023
Iter: 260; Max change in p = 0.007
Iter: 261; Max change in p = 0.028
Iter: 262; Max change in p = 0.012
Iter: 263; Max change in p = 0.001
Iter: 264; Max change in p = 0.018
Iter: 265; Max change in p = 0.006
Iter: 266; Max change in p = 0.011
Iter: 267; Max change in p = 0.004
Iter: 268; Max change in p = 0.011
Iter: 269; Max change in p = 0.003
Iter: 270; Max change in p = 0.017
Iter: 271; Max change in p = 0.016
Iter: 272; Max change in p = 0.018
Iter: 273; Max change in p = 0.003
Iter: 274; Max change in p = 0.005
Iter: 275; Max change in p = 0.008
Iter: 276; Max change in p = 0.036
Iter: 277; Max change in p = 0.008
Iter: 278; Max change in p = 0.014
Iter: 279; Max change in p = 0.055
Iter: 280; Max change in p = 0.025
Iter: 281; Max change in p = 0.009
Iter: 282; Max change in p = 0.012
Iter: 283; Max change in p = 0.011
Iter: 284; Max change in p = 0.019
Iter: 285; Max change in p = 0.005
Iter: 286; Max change in p = 0.023
Iter: 287; Max change in p = 0.023
Iter: 288; Max change in p = 0.023
Iter: 289; Max change in p = 0.018
Iter: 290; Max change in p = 0.023
Iter: 291; Max change in p = 0.002
Iter: 292; Max change in p = 0.018
Iter: 293; Max change in p = 0.006
Iter: 294; Max change in p = 0.011
Iter: 295; Max change in p = 0.004
Iter: 296; Max change in p = 0.031
Iter: 297; Max change in p = 0.011
Iter: 298; Max change in p = 0.014
Iter: 299; Max change in p = 0.036
Iter: 300; Max change in p = 0.003
Iter: 301; Max change in p = 0.024
Iter: 302; Max change in p = 0.032
Iter: 303; Max change in p = 0.007
Iter: 304; Max change in p = 0.003
Iter: 305; Max change in p = 0.036
Iter: 306; Max change in p = 0.010
Iter: 307; Max change in p = 0.009
Iter: 308; Max change in p = 0.011
Iter: 309; Max change in p = 0.011
Iter: 310; Max change in p = 0.056
Iter: 311; Max change in p = 0.016
Iter: 312; Max change in p = 0.002
Iter: 313; Max change in p = 0.009
Iter: 314; Max change in p = 0.006
Iter: 315; Max change in p = 0.016
Iter: 316; Max change in p = 0.020
Iter: 317; Max change in p = 0.026
Iter: 318; Max change in p = 0.011
Iter: 319; Max change in p = 0.003
Iter: 320; Max change in p = 0.010
Iter: 321; Max change in p = 0.013
Iter: 322; Max change in p = 0.031
Iter: 323; Max change in p = 0.042
Iter: 324; Max change in p = 0.023
Iter: 325; Max change in p = 0.034
Iter: 326; Max change in p = 0.005
Iter: 327; Max change in p = 0.005
Iter: 328; Max change in p = 0.032
Iter: 329; Max change in p = 0.011
Iter: 330; Max change in p = 0.006
Iter: 331; Max change in p = 0.033
Iter: 332; Max change in p = 0.016
Iter: 333; Max change in p = 0.001
Iter: 334; Max change in p = 0.052
Iter: 335; Max change in p = 0.043
Iter: 336; Max change in p = 0.023
Iter: 337; Max change in p = 0.013
Iter: 338; Max change in p = 0.031
Iter: 339; Max change in p = 0.029
Iter: 340; Max change in p = 0.002
Iter: 341; Max change in p = 0.022
Iter: 342; Max change in p = 0.021
Iter: 343; Max change in p = 0.027
Iter: 344; Max change in p = 0.030
Iter: 345; Max change in p = 0.001
Iter: 346; Max change in p = 0.021
Iter: 347; Max change in p = 0.005
Iter: 348; Max change in p = 0.022
Iter: 349; Max change in p = 0.006
Iter: 350; Max change in p = 0.032
Iter: 351; Max change in p = 0.010
Iter: 352; Max change in p = 0.019
Iter: 353; Max change in p = 0.002
Iter: 354; Max change in p = 0.000
Iter: 355; Max change in p = 0.028
Iter: 356; Max change in p = 0.014
Iter: 357; Max change in p = 0.014
Iter: 358; Max change in p = 0.011
Iter: 359; Max change in p = 0.017
Iter: 360; Max change in p = 0.016
Iter: 361; Max change in p = 0.019
Iter: 362; Max change in p = 0.041
Iter: 363; Max change in p = 0.006
Iter: 364; Max change in p = 0.018
Iter: 365; Max change in p = 0.004
Iter: 366; Max change in p = 0.008
Iter: 367; Max change in p = 0.007
Iter: 368; Max change in p = 0.003
Iter: 369; Max change in p = 0.021
Iter: 370; Max change in p = 0.012
Iter: 371; Max change in p = 0.011
Iter: 372; Max change in p = 0.034
Iter: 373; Max change in p = 0.016
Iter: 374; Max change in p = 0.020
Iter: 375; Max change in p = 0.012
Iter: 376; Max change in p = 0.007
Iter: 377; Max change in p = 0.001
Iter: 378; Max change in p = 0.000
Iter: 379; Max change in p = 0.044
Iter: 380; Max change in p = 0.037
Iter: 381; Max change in p = 0.004
Iter: 382; Max change in p = 0.039
Iter: 383; Max change in p = 0.015
Iter: 384; Max change in p = 0.021
Iter: 385; Max change in p = 0.023
Iter: 386; Max change in p = 0.046
Iter: 387; Max change in p = 0.008
Iter: 388; Max change in p = 0.029
Iter: 389; Max change in p = 0.016
Iter: 390; Max change in p = 0.008
Iter: 391; Max change in p = 0.003
Iter: 392; Max change in p = 0.005
Iter: 393; Max change in p = 0.010
Iter: 394; Max change in p = 0.020
Iter: 395; Max change in p = 0.011
Iter: 396; Max change in p = 0.003
Iter: 397; Max change in p = 0.041
Iter: 398; Max change in p = 0.007
Iter: 399; Max change in p = 0.010
Iter: 400; Max change in p = 0.037
Iter: 401; Max change in p = 0.003
Iter: 402; Max change in p = 0.007
Iter: 403; Max change in p = 0.001
Iter: 404; Max change in p = 0.012
Iter: 405; Max change in p = 0.011
Iter: 406; Max change in p = 0.009
Iter: 407; Max change in p = 0.002
Iter: 408; Max change in p = 0.032
Iter: 409; Max change in p = 0.019
Iter: 410; Max change in p = 0.012
Iter: 411; Max change in p = 0.034
Iter: 412; Max change in p = 0.011
Iter: 413; Max change in p = 0.001
Iter: 414; Max change in p = 0.010
Iter: 415; Max change in p = 0.007
Iter: 416; Max change in p = 0.045
Iter: 417; Max change in p = 0.008
Iter: 418; Max change in p = 0.024
Iter: 419; Max change in p = 0.002
Iter: 420; Max change in p = 0.015
Iter: 421; Max change in p = 0.010
Iter: 422; Max change in p = 0.009
Iter: 423; Max change in p = 0.010
Iter: 424; Max change in p = 0.030
Iter: 425; Max change in p = 0.012
Iter: 426; Max change in p = 0.011
Iter: 427; Max change in p = 0.024
Iter: 428; Max change in p = 0.026
Iter: 429; Max change in p = 0.017
Iter: 430; Max change in p = 0.042
Iter: 431; Max change in p = 0.008
Iter: 432; Max change in p = 0.008
Iter: 433; Max change in p = 0.006
Iter: 434; Max change in p = 0.005
Iter: 435; Max change in p = 0.040
Iter: 436; Max change in p = 0.027
Iter: 437; Max change in p = 0.009
Iter: 438; Max change in p = 0.003
Iter: 439; Max change in p = 0.010
Iter: 440; Max change in p = 0.033
Iter: 441; Max change in p = 0.014
Iter: 442; Max change in p = 0.004
Iter: 443; Max change in p = 0.037
Iter: 444; Max change in p = 0.011
Iter: 445; Max change in p = 0.003
Iter: 446; Max change in p = 0.014
Iter: 447; Max change in p = 0.004
Iter: 448; Max change in p = 0.012
Iter: 449; Max change in p = 0.050
Iter: 450; Max change in p = 0.026
Iter: 451; Max change in p = 0.005
Iter: 452; Max change in p = 0.008
Iter: 453; Max change in p = 0.032
Iter: 454; Max change in p = 0.018
Iter: 455; Max change in p = 0.001
Iter: 456; Max change in p = 0.016
Iter: 457; Max change in p = 0.023
Iter: 458; Max change in p = 0.034
Iter: 459; Max change in p = 0.008
Iter: 460; Max change in p = 0.027
Iter: 461; Max change in p = 0.008
Iter: 462; Max change in p = 0.007
Iter: 463; Max change in p = 0.005
Iter: 464; Max change in p = 0.004
Iter: 465; Max change in p = 0.019
Iter: 466; Max change in p = 0.031
Iter: 467; Max change in p = 0.008
Iter: 468; Max change in p = 0.001
Iter: 469; Max change in p = 0.015
Iter: 470; Max change in p = 0.013
Iter: 471; Max change in p = 0.009
Iter: 472; Max change in p = 0.005
Iter: 473; Max change in p = 0.041
Iter: 474; Max change in p = 0.035
Iter: 475; Max change in p = 0.013
Iter: 476; Max change in p = 0.051
Iter: 477; Max change in p = 0.007
Iter: 478; Max change in p = 0.016
Iter: 479; Max change in p = 0.048
Iter: 480; Max change in p = 0.038
Iter: 481; Max change in p = 0.047
Iter: 482; Max change in p = 0.004
Iter: 483; Max change in p = 0.016
Iter: 484; Max change in p = 0.005
Iter: 485; Max change in p = 0.003
Iter: 486; Max change in p = 0.030
Iter: 487; Max change in p = 0.006
Iter: 488; Max change in p = 0.032
Iter: 489; Max change in p = 0.011
Iter: 490; Max change in p = 0.009
Iter: 491; Max change in p = 0.023
Iter: 492; Max change in p = 0.008
Iter: 493; Max change in p = 0.042
Iter: 494; Max change in p = 0.003
Iter: 495; Max change in p = 0.029
Iter: 496; Max change in p = 0.018
Iter: 497; Max change in p = 0.005
Iter: 498; Max change in p = 0.002
Iter: 499; Max change in p = 0.035
Iter: 500; Max change in p = 0.001
retrm.b2
#> [1] 0.385524
plot(retrm.b2)


# use Polyak-Juditsky averaging (b should be closer to 0 to work well)
retrm.PJ <- RobbinsMonro(f.root_noisy, .9, b = .01,
                         Polyak_Juditsky = TRUE)
#> 
Iter: 1; Max change in E(p) = 0.450
Iter: 2; Max change in E(p) = 0.119
Iter: 3; Max change in E(p) = 0.039
Iter: 4; Max change in E(p) = 0.005
Iter: 5; Max change in E(p) = 0.002
Iter: 6; Max change in E(p) = 0.008
Iter: 7; Max change in E(p) = 0.012
Iter: 8; Max change in E(p) = 0.012
Iter: 9; Max change in E(p) = 0.015
Iter: 10; Max change in E(p) = 0.011
Iter: 11; Max change in E(p) = 0.011
Iter: 12; Max change in E(p) = 0.009
Iter: 13; Max change in E(p) = 0.008
Iter: 14; Max change in E(p) = 0.008
Iter: 15; Max change in E(p) = 0.006
Iter: 16; Max change in E(p) = 0.004
Iter: 17; Max change in E(p) = 0.003
Iter: 18; Max change in E(p) = 0.005
Iter: 19; Max change in E(p) = 0.005
Iter: 20; Max change in E(p) = 0.005
Iter: 21; Max change in E(p) = 0.004
Iter: 22; Max change in E(p) = 0.004
Iter: 23; Max change in E(p) = 0.003
Iter: 24; Max change in E(p) = 0.004
Iter: 25; Max change in E(p) = 0.004
Iter: 26; Max change in E(p) = 0.003
Iter: 27; Max change in E(p) = 0.002
Iter: 28; Max change in E(p) = 0.003
Iter: 29; Max change in E(p) = 0.003
Iter: 30; Max change in E(p) = 0.003
Iter: 31; Max change in E(p) = 0.002
Iter: 32; Max change in E(p) = 0.003
Iter: 33; Max change in E(p) = 0.003
Iter: 34; Max change in E(p) = 0.002
Iter: 35; Max change in E(p) = 0.001
Iter: 36; Max change in E(p) = 0.001
Iter: 37; Max change in E(p) = 0.001
Iter: 38; Max change in E(p) = 0.001
Iter: 39; Max change in E(p) = 0.002
Iter: 40; Max change in E(p) = 0.002
Iter: 41; Max change in E(p) = 0.001
Iter: 42; Max change in E(p) = 0.001
Iter: 43; Max change in E(p) = 0.000
Iter: 44; Max change in E(p) = 0.001
Iter: 45; Max change in E(p) = 0.000
Iter: 46; Max change in E(p) = 0.001
Iter: 47; Max change in E(p) = 0.001
Iter: 48; Max change in E(p) = 0.000
Iter: 49; Max change in E(p) = 0.000
Iter: 50; Max change in E(p) = 0.001
Iter: 51; Max change in E(p) = 0.001
Iter: 52; Max change in E(p) = 0.001
Iter: 53; Max change in E(p) = 0.000
Iter: 54; Max change in E(p) = 0.001
Iter: 55; Max change in E(p) = 0.000
Iter: 56; Max change in E(p) = 0.000
Iter: 57; Max change in E(p) = 0.000
Iter: 58; Max change in E(p) = 0.000
Iter: 59; Max change in E(p) = 0.000
Iter: 60; Max change in E(p) = 0.000
Iter: 61; Max change in E(p) = 0.000
Iter: 62; Max change in E(p) = 0.000
Iter: 63; Max change in E(p) = 0.000
Iter: 64; Max change in E(p) = 0.000
Iter: 65; Max change in E(p) = 0.000
Iter: 66; Max change in E(p) = 0.000
Iter: 67; Max change in E(p) = 0.001
Iter: 68; Max change in E(p) = 0.001
Iter: 69; Max change in E(p) = 0.001
Iter: 70; Max change in E(p) = 0.001
Iter: 71; Max change in E(p) = 0.001
Iter: 72; Max change in E(p) = 0.000
Iter: 73; Max change in E(p) = 0.000
Iter: 74; Max change in E(p) = 0.000
Iter: 75; Max change in E(p) = 0.000
Iter: 76; Max change in E(p) = 0.000
Iter: 77; Max change in E(p) = 0.000
Iter: 78; Max change in E(p) = 0.000
Iter: 79; Max change in E(p) = 0.000
Iter: 80; Max change in E(p) = 0.000
Iter: 81; Max change in E(p) = 0.000
Iter: 82; Max change in E(p) = 0.001
Iter: 83; Max change in E(p) = 0.000
Iter: 84; Max change in E(p) = 0.001
Iter: 85; Max change in E(p) = 0.001
Iter: 86; Max change in E(p) = 0.001
Iter: 87; Max change in E(p) = 0.000
Iter: 88; Max change in E(p) = 0.001
Iter: 89; Max change in E(p) = 0.000
Iter: 90; Max change in E(p) = 0.000
Iter: 91; Max change in E(p) = 0.000
Iter: 92; Max change in E(p) = 0.000
Iter: 93; Max change in E(p) = 0.000
Iter: 94; Max change in E(p) = 0.000
Iter: 95; Max change in E(p) = 0.001
Iter: 96; Max change in E(p) = 0.001
Iter: 97; Max change in E(p) = 0.000
Iter: 98; Max change in E(p) = 0.000
Iter: 99; Max change in E(p) = 0.000
Iter: 100; Max change in E(p) = 0.000
Iter: 101; Max change in E(p) = 0.000
Iter: 102; Max change in E(p) = 0.000
Iter: 103; Max change in E(p) = 0.000
Iter: 104; Max change in E(p) = 0.000
Iter: 105; Max change in E(p) = 0.000
Iter: 106; Max change in E(p) = 0.000
Iter: 107; Max change in E(p) = 0.000
Iter: 108; Max change in E(p) = 0.000
Iter: 109; Max change in E(p) = 0.000
Iter: 110; Max change in E(p) = 0.000
Iter: 111; Max change in E(p) = 0.000
Iter: 112; Max change in E(p) = 0.000
Iter: 113; Max change in E(p) = 0.000
Iter: 114; Max change in E(p) = 0.000
Iter: 115; Max change in E(p) = 0.000
Iter: 116; Max change in E(p) = 0.000
Iter: 117; Max change in E(p) = 0.000
Iter: 118; Max change in E(p) = 0.000
Iter: 119; Max change in E(p) = 0.000
Iter: 120; Max change in E(p) = 0.000
Iter: 121; Max change in E(p) = 0.000
Iter: 122; Max change in E(p) = 0.000
Iter: 123; Max change in E(p) = 0.000
Iter: 124; Max change in E(p) = 0.000
Iter: 125; Max change in E(p) = 0.000
Iter: 126; Max change in E(p) = 0.000
Iter: 127; Max change in E(p) = 0.000
Iter: 128; Max change in E(p) = 0.000
Iter: 129; Max change in E(p) = 0.000
Iter: 130; Max change in E(p) = 0.000
Iter: 131; Max change in E(p) = 0.000
Iter: 132; Max change in E(p) = 0.000
Iter: 133; Max change in E(p) = 0.000
Iter: 134; Max change in E(p) = 0.000
Iter: 135; Max change in E(p) = 0.000
Iter: 136; Max change in E(p) = 0.000
Iter: 137; Max change in E(p) = 0.000
Iter: 138; Max change in E(p) = 0.000
Iter: 139; Max change in E(p) = 0.000
Iter: 140; Max change in E(p) = 0.000
Iter: 141; Max change in E(p) = 0.000
Iter: 142; Max change in E(p) = 0.000
Iter: 143; Max change in E(p) = 0.000
Iter: 144; Max change in E(p) = 0.000
Iter: 145; Max change in E(p) = 0.000
Iter: 146; Max change in E(p) = 0.000
Iter: 147; Max change in E(p) = 0.000
Iter: 148; Max change in E(p) = 0.000
Iter: 149; Max change in E(p) = 0.000
Iter: 150; Max change in E(p) = 0.000
Iter: 151; Max change in E(p) = 0.000
Iter: 152; Max change in E(p) = 0.000
Iter: 153; Max change in E(p) = 0.000
Iter: 154; Max change in E(p) = 0.000
Iter: 155; Max change in E(p) = 0.000
Iter: 156; Max change in E(p) = 0.000
Iter: 157; Max change in E(p) = 0.000
Iter: 158; Max change in E(p) = 0.000
Iter: 159; Max change in E(p) = 0.000
Iter: 160; Max change in E(p) = 0.000
Iter: 161; Max change in E(p) = 0.000
Iter: 162; Max change in E(p) = 0.000
Iter: 163; Max change in E(p) = 0.000
Iter: 164; Max change in E(p) = 0.000
Iter: 165; Max change in E(p) = 0.000
Iter: 166; Max change in E(p) = 0.000
Iter: 167; Max change in E(p) = 0.000
Iter: 168; Max change in E(p) = 0.000
Iter: 169; Max change in E(p) = 0.000
Iter: 170; Max change in E(p) = 0.000
Iter: 171; Max change in E(p) = 0.000
Iter: 172; Max change in E(p) = 0.000
Iter: 173; Max change in E(p) = 0.000
Iter: 174; Max change in E(p) = 0.000
Iter: 175; Max change in E(p) = 0.000
Iter: 176; Max change in E(p) = 0.000
Iter: 177; Max change in E(p) = 0.000
Iter: 178; Max change in E(p) = 0.000
Iter: 179; Max change in E(p) = 0.000
Iter: 180; Max change in E(p) = 0.000
Iter: 181; Max change in E(p) = 0.000
Iter: 182; Max change in E(p) = 0.000
Iter: 183; Max change in E(p) = 0.000
Iter: 184; Max change in E(p) = 0.000
Iter: 185; Max change in E(p) = 0.000
Iter: 186; Max change in E(p) = 0.000
Iter: 187; Max change in E(p) = 0.000
Iter: 188; Max change in E(p) = 0.000
Iter: 189; Max change in E(p) = 0.000
Iter: 190; Max change in E(p) = 0.000
Iter: 191; Max change in E(p) = 0.000
Iter: 192; Max change in E(p) = 0.000
Iter: 193; Max change in E(p) = 0.000
Iter: 194; Max change in E(p) = 0.000
Iter: 195; Max change in E(p) = 0.000
Iter: 196; Max change in E(p) = 0.000
Iter: 197; Max change in E(p) = 0.000
Iter: 198; Max change in E(p) = 0.000
Iter: 199; Max change in E(p) = 0.000
Iter: 200; Max change in E(p) = 0.000
Iter: 201; Max change in E(p) = 0.000
Iter: 202; Max change in E(p) = 0.000
Iter: 203; Max change in E(p) = 0.000
Iter: 204; Max change in E(p) = 0.000
Iter: 205; Max change in E(p) = 0.000
Iter: 206; Max change in E(p) = 0.000
Iter: 207; Max change in E(p) = 0.000
Iter: 208; Max change in E(p) = 0.000
Iter: 209; Max change in E(p) = 0.000
Iter: 210; Max change in E(p) = 0.000
Iter: 211; Max change in E(p) = 0.000
Iter: 212; Max change in E(p) = 0.000
Iter: 213; Max change in E(p) = 0.000
Iter: 214; Max change in E(p) = 0.000
Iter: 215; Max change in E(p) = 0.000
Iter: 216; Max change in E(p) = 0.000
Iter: 217; Max change in E(p) = 0.000
Iter: 218; Max change in E(p) = 0.000
Iter: 219; Max change in E(p) = 0.000
Iter: 220; Max change in E(p) = 0.000
Iter: 221; Max change in E(p) = 0.000
Iter: 222; Max change in E(p) = 0.000
Iter: 223; Max change in E(p) = 0.000
Iter: 224; Max change in E(p) = 0.000
Iter: 225; Max change in E(p) = 0.000
Iter: 226; Max change in E(p) = 0.000
Iter: 227; Max change in E(p) = 0.000
Iter: 228; Max change in E(p) = 0.000
Iter: 229; Max change in E(p) = 0.000
Iter: 230; Max change in E(p) = 0.000
Iter: 231; Max change in E(p) = 0.000
Iter: 232; Max change in E(p) = 0.000
Iter: 233; Max change in E(p) = 0.000
Iter: 234; Max change in E(p) = 0.000
Iter: 235; Max change in E(p) = 0.000
Iter: 236; Max change in E(p) = 0.000
Iter: 237; Max change in E(p) = 0.000
Iter: 238; Max change in E(p) = 0.000
Iter: 239; Max change in E(p) = 0.000
Iter: 240; Max change in E(p) = 0.000
Iter: 241; Max change in E(p) = 0.000
Iter: 242; Max change in E(p) = 0.000
Iter: 243; Max change in E(p) = 0.000
Iter: 244; Max change in E(p) = 0.000
Iter: 245; Max change in E(p) = 0.000
Iter: 246; Max change in E(p) = 0.000
Iter: 247; Max change in E(p) = 0.000
Iter: 248; Max change in E(p) = 0.000
Iter: 249; Max change in E(p) = 0.000
Iter: 250; Max change in E(p) = 0.000
Iter: 251; Max change in E(p) = 0.000
Iter: 252; Max change in E(p) = 0.000
Iter: 253; Max change in E(p) = 0.000
Iter: 254; Max change in E(p) = 0.000
Iter: 255; Max change in E(p) = 0.000
Iter: 256; Max change in E(p) = 0.000
Iter: 257; Max change in E(p) = 0.000
Iter: 258; Max change in E(p) = 0.000
Iter: 259; Max change in E(p) = 0.000
Iter: 260; Max change in E(p) = 0.000
Iter: 261; Max change in E(p) = 0.000
Iter: 262; Max change in E(p) = 0.000
Iter: 263; Max change in E(p) = 0.000
Iter: 264; Max change in E(p) = 0.000
Iter: 265; Max change in E(p) = 0.000
Iter: 266; Max change in E(p) = 0.000
Iter: 267; Max change in E(p) = 0.000
Iter: 268; Max change in E(p) = 0.000
Iter: 269; Max change in E(p) = 0.000
Iter: 270; Max change in E(p) = 0.000
Iter: 271; Max change in E(p) = 0.000
Iter: 272; Max change in E(p) = 0.000
Iter: 273; Max change in E(p) = 0.000
Iter: 274; Max change in E(p) = 0.000
Iter: 275; Max change in E(p) = 0.000
Iter: 276; Max change in E(p) = 0.000
Iter: 277; Max change in E(p) = 0.000
Iter: 278; Max change in E(p) = 0.000
Iter: 279; Max change in E(p) = 0.000
Iter: 280; Max change in E(p) = 0.000
Iter: 281; Max change in E(p) = 0.000
Iter: 282; Max change in E(p) = 0.000
Iter: 283; Max change in E(p) = 0.000
Iter: 284; Max change in E(p) = 0.000
Iter: 285; Max change in E(p) = 0.000
Iter: 286; Max change in E(p) = 0.000
Iter: 287; Max change in E(p) = 0.000
Iter: 288; Max change in E(p) = 0.000
Iter: 289; Max change in E(p) = 0.000
Iter: 290; Max change in E(p) = 0.000
Iter: 291; Max change in E(p) = 0.000
Iter: 292; Max change in E(p) = 0.000
Iter: 293; Max change in E(p) = 0.000
Iter: 294; Max change in E(p) = 0.000
Iter: 295; Max change in E(p) = 0.000
Iter: 296; Max change in E(p) = 0.000
Iter: 297; Max change in E(p) = 0.000
Iter: 298; Max change in E(p) = 0.000
Iter: 299; Max change in E(p) = 0.000
Iter: 300; Max change in E(p) = 0.000
Iter: 301; Max change in E(p) = 0.000
Iter: 302; Max change in E(p) = 0.000
Iter: 303; Max change in E(p) = 0.000
Iter: 304; Max change in E(p) = 0.000
Iter: 305; Max change in E(p) = 0.000
Iter: 306; Max change in E(p) = 0.000
Iter: 307; Max change in E(p) = 0.000
Iter: 308; Max change in E(p) = 0.000
Iter: 309; Max change in E(p) = 0.000
Iter: 310; Max change in E(p) = 0.000
Iter: 311; Max change in E(p) = 0.000
Iter: 312; Max change in E(p) = 0.000
Iter: 313; Max change in E(p) = 0.000
Iter: 314; Max change in E(p) = 0.000
Iter: 315; Max change in E(p) = 0.000
Iter: 316; Max change in E(p) = 0.000
Iter: 317; Max change in E(p) = 0.000
Iter: 318; Max change in E(p) = 0.000
Iter: 319; Max change in E(p) = 0.000
Iter: 320; Max change in E(p) = 0.000
Iter: 321; Max change in E(p) = 0.000
Iter: 322; Max change in E(p) = 0.000
Iter: 323; Max change in E(p) = 0.000
Iter: 324; Max change in E(p) = 0.000
Iter: 325; Max change in E(p) = 0.000
Iter: 326; Max change in E(p) = 0.000
Iter: 327; Max change in E(p) = 0.000
Iter: 328; Max change in E(p) = 0.000
Iter: 329; Max change in E(p) = 0.000
Iter: 330; Max change in E(p) = 0.000
Iter: 331; Max change in E(p) = 0.000
Iter: 332; Max change in E(p) = 0.000
Iter: 333; Max change in E(p) = 0.000
Iter: 334; Max change in E(p) = 0.000
Iter: 335; Max change in E(p) = 0.000
Iter: 336; Max change in E(p) = 0.000
Iter: 337; Max change in E(p) = 0.000
Iter: 338; Max change in E(p) = 0.000
Iter: 339; Max change in E(p) = 0.000
Iter: 340; Max change in E(p) = 0.000
Iter: 341; Max change in E(p) = 0.000
Iter: 342; Max change in E(p) = 0.000
Iter: 343; Max change in E(p) = 0.000
Iter: 344; Max change in E(p) = 0.000
Iter: 345; Max change in E(p) = 0.000
Iter: 346; Max change in E(p) = 0.000
Iter: 347; Max change in E(p) = 0.000
Iter: 348; Max change in E(p) = 0.000
Iter: 349; Max change in E(p) = 0.000
Iter: 350; Max change in E(p) = 0.000
Iter: 351; Max change in E(p) = 0.000
Iter: 352; Max change in E(p) = 0.000
Iter: 353; Max change in E(p) = 0.000
Iter: 354; Max change in E(p) = 0.000
Iter: 355; Max change in E(p) = 0.000
Iter: 356; Max change in E(p) = 0.000
Iter: 357; Max change in E(p) = 0.000
Iter: 358; Max change in E(p) = 0.000
Iter: 359; Max change in E(p) = 0.000
Iter: 360; Max change in E(p) = 0.000
Iter: 361; Max change in E(p) = 0.000
Iter: 362; Max change in E(p) = 0.000
Iter: 363; Max change in E(p) = 0.000
Iter: 364; Max change in E(p) = 0.000
Iter: 365; Max change in E(p) = 0.000
Iter: 366; Max change in E(p) = 0.000
Iter: 367; Max change in E(p) = 0.000
Iter: 368; Max change in E(p) = 0.000
Iter: 369; Max change in E(p) = 0.000
Iter: 370; Max change in E(p) = 0.000
Iter: 371; Max change in E(p) = 0.000
Iter: 372; Max change in E(p) = 0.000
Iter: 373; Max change in E(p) = 0.000
Iter: 374; Max change in E(p) = 0.000
Iter: 375; Max change in E(p) = 0.000
Iter: 376; Max change in E(p) = 0.000
Iter: 377; Max change in E(p) = 0.000
Iter: 378; Max change in E(p) = 0.000
Iter: 379; Max change in E(p) = 0.000
Iter: 380; Max change in E(p) = 0.000
Iter: 381; Max change in E(p) = 0.000
Iter: 382; Max change in E(p) = 0.000
Iter: 383; Max change in E(p) = 0.000
Iter: 384; Max change in E(p) = 0.000
Iter: 385; Max change in E(p) = 0.000
Iter: 386; Max change in E(p) = 0.000
Iter: 387; Max change in E(p) = 0.000
Iter: 388; Max change in E(p) = 0.000
Iter: 389; Max change in E(p) = 0.000
Iter: 390; Max change in E(p) = 0.000
Iter: 391; Max change in E(p) = 0.000
Iter: 392; Max change in E(p) = 0.000
Iter: 393; Max change in E(p) = 0.000
Iter: 394; Max change in E(p) = 0.000
Iter: 395; Max change in E(p) = 0.000
Iter: 396; Max change in E(p) = 0.000
Iter: 397; Max change in E(p) = 0.000
Iter: 398; Max change in E(p) = 0.000
Iter: 399; Max change in E(p) = 0.000
Iter: 400; Max change in E(p) = 0.000
Iter: 401; Max change in E(p) = 0.000
Iter: 402; Max change in E(p) = 0.000
Iter: 403; Max change in E(p) = 0.000
Iter: 404; Max change in E(p) = 0.000
Iter: 405; Max change in E(p) = 0.000
Iter: 406; Max change in E(p) = 0.000
Iter: 407; Max change in E(p) = 0.000
Iter: 408; Max change in E(p) = 0.000
Iter: 409; Max change in E(p) = 0.000
Iter: 410; Max change in E(p) = 0.000
Iter: 411; Max change in E(p) = 0.000
Iter: 412; Max change in E(p) = 0.000
Iter: 413; Max change in E(p) = 0.000
Iter: 414; Max change in E(p) = 0.000
Iter: 415; Max change in E(p) = 0.000
Iter: 416; Max change in E(p) = 0.000
Iter: 417; Max change in E(p) = 0.000
Iter: 418; Max change in E(p) = 0.000
Iter: 419; Max change in E(p) = 0.000
Iter: 420; Max change in E(p) = 0.000
Iter: 421; Max change in E(p) = 0.000
Iter: 422; Max change in E(p) = 0.000
Iter: 423; Max change in E(p) = 0.000
Iter: 424; Max change in E(p) = 0.000
Iter: 425; Max change in E(p) = 0.000
Iter: 426; Max change in E(p) = 0.000
Iter: 427; Max change in E(p) = 0.000
Iter: 428; Max change in E(p) = 0.000
Iter: 429; Max change in E(p) = 0.000
Iter: 430; Max change in E(p) = 0.000
Iter: 431; Max change in E(p) = 0.000
Iter: 432; Max change in E(p) = 0.000
Iter: 433; Max change in E(p) = 0.000
Iter: 434; Max change in E(p) = 0.000
Iter: 435; Max change in E(p) = 0.000
Iter: 436; Max change in E(p) = 0.000
Iter: 437; Max change in E(p) = 0.000
Iter: 438; Max change in E(p) = 0.000
Iter: 439; Max change in E(p) = 0.000
Iter: 440; Max change in E(p) = 0.000
Iter: 441; Max change in E(p) = 0.000
Iter: 442; Max change in E(p) = 0.000
Iter: 443; Max change in E(p) = 0.000
Iter: 444; Max change in E(p) = 0.000
Iter: 445; Max change in E(p) = 0.000
Iter: 446; Max change in E(p) = 0.000
Iter: 447; Max change in E(p) = 0.000
Iter: 448; Max change in E(p) = 0.000
Iter: 449; Max change in E(p) = 0.000
Iter: 450; Max change in E(p) = 0.000
Iter: 451; Max change in E(p) = 0.000
Iter: 452; Max change in E(p) = 0.000
Iter: 453; Max change in E(p) = 0.000
Iter: 454; Max change in E(p) = 0.000
Iter: 455; Max change in E(p) = 0.000
Iter: 456; Max change in E(p) = 0.000
Iter: 457; Max change in E(p) = 0.000
Iter: 458; Max change in E(p) = 0.000
Iter: 459; Max change in E(p) = 0.000
Iter: 460; Max change in E(p) = 0.000
Iter: 461; Max change in E(p) = 0.000
Iter: 462; Max change in E(p) = 0.000
Iter: 463; Max change in E(p) = 0.000
Iter: 464; Max change in E(p) = 0.000
Iter: 465; Max change in E(p) = 0.000
Iter: 466; Max change in E(p) = 0.000
Iter: 467; Max change in E(p) = 0.000
Iter: 468; Max change in E(p) = 0.000
Iter: 469; Max change in E(p) = 0.000
Iter: 470; Max change in E(p) = 0.000
Iter: 471; Max change in E(p) = 0.000
Iter: 472; Max change in E(p) = 0.000
Iter: 473; Max change in E(p) = 0.000
Iter: 474; Max change in E(p) = 0.000
Iter: 475; Max change in E(p) = 0.000
Iter: 476; Max change in E(p) = 0.000
Iter: 477; Max change in E(p) = 0.000
Iter: 478; Max change in E(p) = 0.000
Iter: 479; Max change in E(p) = 0.000
Iter: 480; Max change in E(p) = 0.000
Iter: 481; Max change in E(p) = 0.000
Iter: 482; Max change in E(p) = 0.000
Iter: 483; Max change in E(p) = 0.000
Iter: 484; Max change in E(p) = 0.000
Iter: 485; Max change in E(p) = 0.000
Iter: 486; Max change in E(p) = 0.000
Iter: 487; Max change in E(p) = 0.000
Iter: 488; Max change in E(p) = 0.000
Iter: 489; Max change in E(p) = 0.000
Iter: 490; Max change in E(p) = 0.000
Iter: 491; Max change in E(p) = 0.000
Iter: 492; Max change in E(p) = 0.000
Iter: 493; Max change in E(p) = 0.000
Iter: 494; Max change in E(p) = 0.000
Iter: 495; Max change in E(p) = 0.000
Iter: 496; Max change in E(p) = 0.000
Iter: 497; Max change in E(p) = 0.000
Iter: 498; Max change in E(p) = 0.000
Iter: 499; Max change in E(p) = 0.000
Iter: 500; Max change in E(p) = 0.000
retrm.PJ   # final Polyak_Juditsky estimate
#>           [,1]
#> [1,] 0.4077852
plot(retrm.PJ) # Robbins-Monro history

plot(retrm.PJ, Polyak_Juditsky = TRUE) # Polyak_Juditsky history