Closed GantZA closed 4 years ago
The ABC sampler needs to be able to simulate values from your distribution. So you need be able to call rand(SLOB_MODEL(D, σ, nu, α, μ))
and get a correct draw from the distribution.
As a fallback the Distributions package will utilize inverse transform sampling which only requires the quantile function of a random variable to be defined in order to sample from it. You do not have to use this, as long as you can sample from your distribution in some other way.
Sorry for such a late reply, I finally got around to implementing the "rand" fix and it's working now! Thank you for the help
I am unsure of how to setup an ABC model where I don't know the quantile or distribution of the node.
I have a model which returns an
Array{Float64, 2}
data type and takes in 5 parameters. I have prior distributions for the parameters but I don't have any distribution for the output of the model. Below is the basic idea of what I have set as theModel()
I have used the
extension = quotes...
block to create theSLOB_MODEL
struct which "inherits" from theContinuousMultivariateDistribution
. Is this how I should be defining the SLOB_MODEL? I have looked at the documentation, and it says that I need to provide the following methods:length
,insupport
and_logpdf
. But I can't give a_logpdf
value as I don't know the distribution. Additionally, in the GK example, there doesn't seem to be a_logpdf
method definedMaybe I'm not meant to be using the Stochastic node type for
price_path
? It is a non-deterministic function though which can be controlled through a seed variable if this helps?