Identifying the mode and impact of technological substitutions