I have tried to replicate the graph of the example in R but I have not been able to reach a similar result.
I would appreciate the help.