How to estimate markups and production functions