What you are looking for is founded extensively by the so called master equations (linear or non-linear possible). See for the linear on here
The stochastic equations are for instance used to describe birth death processes and in general chemical reaction processes, also they can be applied to physical mdoels such as the two or multi mode laser. In the simplest case you have a transition from a state $A$ (box I) to a state $B$ (box II) at microscopic level of particles or individual species (social and biological system):
$A \xrightarrow{\lambda_{AB}} B$ $A \xleftarrow{\lambda_{BA}} B$
then with $\lambda_{AB}=P_\ell$ and $\lambda_{BA}=P_k$ as well as $P_\ell =A_{k\ell}$ and $P_k=A_{\ell k}$ (notation connects you to the wiki reference above):
$\frac{dP_k}{dt}=\sum_\ell(A_{k\ell}P_\ell - A_{\ell k}P_k)=\sum_{\ell\neq k}(A_{k\ell}P_\ell - A_{\ell k}P_k)$
You can then require microscopic steady state as condition hence:
$A_{k \ell} \pi_\ell = A_{\ell k} \pi_k$
In order to get to the macroscopic level you will need to build the moments such as the first order $\langle A_{k \ell} \rangle$ and $\langle A_{\ell k} \rangle$ (if linear the first, if non-linear then even higher order) and then in general you will see that the differential equation above (in the non-linear case with some neglegance of higher moments) reforms into a macroscopic differential equation as known from for instance chemistry or population dynamics (including birth/death processes). The moments turn then to encapsulate into the macroscopic reaction rates.
This approach is a general and elegant approach that allows you to have a microscopic comprehensive model both for your dyanmic model as well as its reaction rates (in your case the macroscopic rates of birth/death).
Hermann Haken among many others has investigated in detail these type of approach. Extensively literature you will find about this around synergetics/master equations for social and chemical systems. Hermann Haken, in his book Synergetics: an introduction describes with examples in the last chapters the complete calculations.
I hope this is good answer.
Append for a detailled description see Handbook of Stochastic Methods: for Physics, Chemistry and the Natural Sciences page 234 upwards