Dear users,
Reading through Stan’s documentation under heading Sampling i would like to know about the following statement
“For continuous parameters, Stan uses Hamiltonian Monte Carlo (HMC) sampling”
- For a real parameter defined in the parameters{ } block does the stan( ) function automatically selects HMC sampler if algorithm is not specified?
Example:
parameters {
real theta;
}
model{
theta ~ normal(0 , 1);
}
And use
fit <- stan("modelcode",
data = stan_data,
chains = 1, iter = 100,
warmup = 50,
)
-
If algorithm is not specified, the output of print( ) says “samples are draws using NUTS(diag_e)”. Then, if the parameter estimated is real, does this output means that the result we get from the default stan( ) function is incorrect? or do we need to specify algorithm = c(“HMC”) in the stan( ) function?
-
Is it legal to specify more than one algorithm at the same time? For example: algorithm = c(“NUTS”, “HMC”, “Fixed_param”) .
Thanks