Negative thermal expansion and local dynamics