Similar Items: Endogenous technology and the measurement of productivity