I am using MST function from MST (multivariate survival tree) package in R to train survival tree. However when I want to predict the node for one selected observation, the output is different. I have not changed the code, just ran the same rows multiple times. I am using the tree selected as the best tree when penalty log_n is used, see documentation (TLDR: n is number of out of bootstrap samples, but the tree is already selected and does not change during prediction). There is no factor issue, as suggested by other answers. Any idea what could be wrong?
I don't know what that function is doing specifically (questions specific to software are off topic here anyway) but from your description (eg bootstrap, or random sampling relating to the treatment of missing values) then there will be some random sampling happening. Therefore setting a seed for the randon number generator prior to running the code should ensure repeatability. Just because the final tree doesn't change doesn't mean that the exact same process has created it - you can think of the final tree in this case as a "limiting value" which will be obtained every time for the parameters that you choose when you run it.
I have figured it out. I have one categorical variable which has many levels. However for the split only part of those levels were used and if the observation has different value it is treated as "missing" and in prediction process decides randomly. Thus the observation is sent to left or right way randomly, if the level is not used in split.