How to start an affiliate program for a new business?

I’m launching a new e-commerce business and want to set up an affiliate program from scratch, but I’m not sure where to begin - should I join an existing affiliate network like ShareASale or Commission Junction, or is it better to build an in-house program, and what commission rates are typically competitive enough to attract quality affiliates without eating too much into my margins?