get.theta function

Internal function to calculate theta parameter