I don't think you can do it directly, I guess that you have to create another hero in the object editor with all values the same, exept primairy attribute, and then change the unit type of the hero to that new type, with some kind of morphing ability.
yes, thats what you will have to do. you can use chaos for that, but that would create some nasty bugs(use search for that). replacing the hero should work, but well, it might as well mess up all your running systems etc