maxp function

Maximum likelihood estimation