A 2002-2005 requires a 2006 STi transmission, half shafts, and 4EAT driveshaft. The R160, since it has a 3.9:1 F/D can be used with the STi transmission. The 2006,2007 WRX must replace the rear diff.
There are plenty of STi transmission swaps into WRXs. It's quite common in fact.