That would be misleading as there is no correlation between CR and PC level.
However, there is a guideline in page 283 of the Dungeon Master's Guide under "Monsters with Classes". It doesn't help very much, honestly, and I ended up having to:
1.) Modify a Monster
Page 273 of the DMG gives us an idea of simply taking stats from an existing creature in the Monster Manual and modifying it to our needs. This is, by far, the easiest way to make a monster. For your case, I would choose an Evil Mage Stat Block and add Sorcerer levels to it. This would have the following effects to it:
- It gains Hit Dice of its normal type (d4 for tiny, d6 for Small, d8 for Medium and so on...) for each level you add to it.
- It gains Sorcerer features of your choice, the benefits to this are not reliably quantified so you should judge for yourself if the class level added would increase the creature's CR.
What I found while tinkering with adding PC classes to NPCs is that for each relevant class level added, you increase the CR by 1. (I found an answer supporting this, but although it is for Pathfinder, it should give you an idea of how CR increases in relation to adding Class levels). For example, adding 3 levels of Barbarian(a relevant class) to my Bugbear NPC (CR 1) made him CR 4, pitting him and a few of his lackeys to balance out the encounter made for a fun challenge for my group.
Caveat: A sorcerer level would most likely not increase an Evil Mage's CR by a full 1, play testing and additional calculations will be needed. The reason for this is because an Evil Mage already has "Spellcasting", which reduces the "added value" of a Sorcerer level to be limited only to the Sorcerer's features until she gains more Sorcerer levels than her current spellcasting ability.
2.) Give her Legendary Actions
The downfall of solo creatures versus a party is that one side is limited to the number of actions per round it can do and in the case of the poor solo, he gets 1 Action while the players have as many Actions as they have players. This is why page 82 of the DMG raises the budgeted XP for an encounter for every creature pitted against a party. So it is a good idea to give a solo creature Legendary Actions.
Legendary Actions are a specific set of Actions a creature can take in between another creature's turn, giving more Actions (usually, 2-3 more) to the poor solo-creature.
Caveat: Legendary Actions count when calculating DPR for your OCR, adjust accordingly.
3.) Give her Legendary Resistance
Another problem for a solo creature is that it will get debuffed by a PC, and once one debuff lands, it's basically at the PC's mercy (which tends to be not a lot). Legendary Resistance gives the creature the option to succeed on a failed Saving Throw which increases its survivability against a full party with spells flinging left and right against her. Legendary Resistance increases a creature's Effective HP for each use depending on the CR as shown in DMG page 280.
When taken all together, your Evil Mage should be ready take on a party of 4 by her lonesome.