Obtaining the likelihood function after fitting

Just to clarify, I ultimately want to do something like what’s asked about in this older post.

I meant to tag @StephanH originally and not the other person (sorry).