Posterior mean of endogenous variable

I am looking for the posterior mean and standard deviation of my endogenous variable, so I would like to know if the variables reported in the section “Moments of simulated variables” of the dynare output are these values?

I am confused because I read that if you have a linear model (which I have) the posterior mean is the steady state for the endogenous variable. However if you compare the value for the steady state and the mean value reported in the “moments of simulated variables” section, they are not identical.

So it’s not clear for me which one should be the posterior mean and why they are different?

There are several things you need to distinguish. The theoretical moments provided by Dynare are computed for one parameter value, while posterior distributions are across parameter draws.
In a linear model, the mean is asymptotically equal to the steady state as shocks only introduce symmetric variation around the steady state. The steady state is therefore always be equal to the *theoretical *mean. However, in short simulations, the two can differ.

Now for estimation, you seem to be interested in the historical mean of a variable. Due to short samples, this will indeed not correspond to the steady state. But you can easily compute it from the SmoothedVariables stored in oo_ when you use the smoother option in the estimation command.