Stress-induced g-anisotropy of Er in Ag thin films