I’m using Andreasen et al (2018, REStud) higher order pruning method to simulate my model. I would like to set the initial value of state variables (vector x in their paper and code) equal to observed data values. The problem is that their stochastic simulation code requires initial values for first, second and third order effects. How should I connect the data values to the three sets of initial values?

That is not possible. The downside of pruning is that you end up with an augmented state space and the decomposition into first to third order components is not unique.

Thank you, professor Pfeifer. I have a confusion here:

Dynare function simult_ allows for specifying initial values and using pruning. How is it possible? How does simult_ pass the initial values to the pruning algorithm?

simult_ takes the initial value as the first order term and sets all other terms to 0. That is the reason why all simulations use either a burnin period so that the starting point of simulations does not depend on the initial condition (essentially you start at the ergodic mean) or uses the stochastic steady state, which again is a unique combination of the three terms in the state space. However, if you only know the value of e.g. output at a point in time, you do not know which combination of first to third order term gave rise to this observation.