My question is related to the concept named "Covariate-Specific Effects" in the book "Causal Inference in Statistics: A Primer". In Section 3.3, it is called the "w-specific effect" and is calculated as:
$$ P(Y=y|do(X=x),W=w) = \sum_t P(Y=y|X=x, W=w, T=t) P(T=t|X=x,W=w). $$
And in Section 3.5, it is called the "z-specific effect" and is calculated as:
$$ p(Y=y|do(X=x),Z=z) = \sum_s P(Y=y|X=x,S=s,Z=z) P(S=s|Z=z). $$
I am a bit confused since both of the two formulas calculate the Covariate-Specific Effect but they are indeed different w.r.t the second term. Is this a mistake? What causes this difference?