Based off the guardian formula (thanks to miligrito for working this out)
Guardian Lv2: (Current HP x 0.09) + ((((ATK - mobDEF) x 4) + (yourLvL - enemyLvL) + STR value + Weapon ATK value + RGN) x (1 x elemental bonus%))
HP does give more attack due to the fact that having 100k+ HP will simply out damage an ATK set, ATK has a higher effect however on being constant (times 4 compared to HP which is times 0.09) the higher your attack the more constant your guardian damage will be compared to being purely HP only. Guardian has a 2% HP recoil per every use of it so the more your hp decreases the less amount of output you will dish out with your guardian.