Added restriction on p[*][0] = 1 and q[*][1] = 1 (aka baseline estimates)