MV Using Variables for Stats using Yanfly's Enemy Base Parameters?

SO at a point in the game we're making you fight copies of your characters. I wanted them to have the same stats as the player characters and I thought maybe I could store the stats in a variable and use Yanfly's Enemy Base Parameters to do this, but I'm rusty and can't remember how that would work. I kinda think I know how it would work in theory but can't remember the language I'd use to do it.
Taking a quick look through the plugin help file, I came up with this:
Note that it says in the plugin description that you need Yep_EnemyLevels for this.

<Custom Enemy Parameters>
let actor = $gameActors.actor(X); // Replace X with the id of the actor to copy stats from
maxhp = actor.mhp;
maxmp = actor.mmp;
atk = actor.atk;
def = actor.def;
mat = actor.mat;
mdf = actor.mdf;
agi = actor.agi;
luk = actor.luk;
</Custom Enemy Parameters>

This is untested however, as I don't own the plugin.
If @ScorchedGround's suggestion doesn't work, try referencing the actor directly in each line, e.g.

<Custom Enemy Parameters> maxhp = $gameActors.actor(1).mhp; maxmp = $gameActors.actor(1).mmp; atk = $gameActors.actor(1).atk; def = $gameActors.actor(1).def; mat = $gameActors.actor(1).mat; mdf = $gameActors.actor(1).mdf; agi = $gameActors.actor(1).agi; luk = $gameActors.actor(1).luk; </Custom Enemy Parameters>
Thank you both. I will give it a try soon as I figure out a few other things and report back
Note that it says in the plugin description that you need Yep_EnemyLevels for this.
I know. It means reworking a few things in our game, but I think it will be worth it.
edit: If you can think of any way to achieve this without the plugin that would be nice.
Edit 2: @caethyril 's method worked!

Original thread: https://forums.rpgmakerweb.com/threads/using-variables-for-stats-using-yanflys-enemy-base-parameters.146425/