getTheta function

Obtain theta estimates