Assessing public opinion’s influence on foreign policy