Based on these signatures gp_utility.R is from my Gaussian process case study, Robust Gaussian Process Modeling, which I should note come with no guarantees. That said these functions take the stanfit object as their first argument, not the extracted samples. Provided that you have the right variable names replacing Sim_result with simu_fit in the last three function calls should be better.
Many thanks for your advice. Actually I tried that one as well but it did not respond again and I receieve the same error as: Error in UseMethod(“extract”) :
no applicable method for ‘extract’ applied to an object of class “stanfit”
having said that, only one time i get the result, but never again get respond.
Anyway, I do appreciate your case study [Robust Gaussian Process Modeling], i read it many times which is absoloutly a great lecture to understand the core idea behind GP.
My guess is that you’re loading a tidyverse package in addition to rstan and calls to extract are being directed to the tidy extract function but not the rstan extract function. If that’s correct then replacing all instances of extract in the gp_utility.R code with rstan::extract should fix everything.