Another idea, based on similar principles and more 'PF friendly.'
For Aberrations, Animals, Constructs, Fey, Humanoids, Ooze, Plant and Vermin:
Take the lesser of: HD, half of CR (Rounded down).
Subtract this value from CR and subtract twice this amount from HD
If HD is no more than twice CR, this will equalize the two.
For Magical Beasts and Monstrous Humanoids:
Take the lesser of: 1/4 HD, 1/4 of CR (Rounded down).
Subtract this value from CR and subtract four times this amount from HD.
If HD is no more than four times CR, this will equalize the two.
Example:
Ogre: CR 3, 4 Humanoid HD
Lesser of 4, half of 3 CR or 1, so ‘1’.
Ogre becomes: CR 2, 2 Humanoid HD. The ogre is treated as a 2nd level character.
While I don't agree with Paizo's CR = level equivalent idea, this is consistent.
The ogre trades away 2 levels of fighter (+2 hp, armor, fighter abilities, feats) or 2 levels of barbarian (+4 hp, some armor, skills, rage, etc.) in exchange for a big boost to (some) stats and permanently/undispellably Large size. (Note that you can have permanent Enlarge Person cast on you for about 3k or so)