create a bunch of R functions that deal with estimating the nxfp