  Lanthanide element signatures are key to understanding many astrophysical
observables, from merger kilonova light curves to stellar and solar abundances.
To learn about the lanthanide element synthesis that enriched our solar system,
we apply the statistical method of Markov Chain Monte Carlo to examine the
nuclear masses capable of forming the $r$-process rare-earth abundance peak. We
describe the physical constraints we implement with this statistical approach
and demonstrate the use of the parallel chains method to explore the
multidimensional parameter space. We apply our procedure to three moderately
neutron-rich astrophysical outflows with distinct types of $r$-process
dynamics. We show that the mass solutions found are dependent on outflow
conditions and are related to the $r$-process path. We describe in detail the
mechanism behind peak formation in each case. We then compare our mass
predictions for neutron-rich neodymium and samarium isotopes to the latest
experimental data from the CPT at CARIBU. We find our mass predictions given
outflows that undergo an extended (n,$\gamma$)$\rightleftarrows$($\gamma$,n)
equilibrium to be those most compatible with both observational solar
abundances and neutron-rich mass measurements.
