My heading is awesome

How large does an organization need to be an order to create an internal HR department. Does it make more sense to outsource HR responsibilities or to create an internal HR department?