I usually connect a 1 A current source to the point where I want to measure impedance. Then the voltage at that node reads impedance directly. You can look at magnitude, phase, whatever you want vs. frequency using an ordinary frequency sweep.
Make sure all other sources are either zero or disconnected, as appropriate.