clomid or femara

how do doctors pick If they are are going to prescribe clomid or femara? what would make them choose one over the other?