Description Usage Arguments Value Examples
This is an S3 object constructor helper function for class cpmmc which inherit from metropolis_hastings class and markov_chain class
1 2 3 |
data, |
observed data points |
theta_0, |
initialisation of the vector of parameters of interest |
u_0, |
initialisation of the auxiliary random variables |
rho, |
correlation parameter used to sample auxiliary random variables |
log_marginal_estimator_func, |
log likelihood estimator function |
log_theta_prior_density, |
log density function for the prior distribution of theta |
log_theta_proposal_density, |
log density function for theta proposals |
theta_proposal_sampler, |
distribution function to sample new theta proposals |
cpmmc object
1 2 3 4 5 6 7 8 9 | cpmmc_obj <- cpmmc(data = rnorm(10, 1, 1),
theta_0 = 0,
u_0 = array(rnorm(5*10), dim = c(5,1,10)),
rho = 0.9,
log_marginal_estimator_func = function(x) {dnorm(x, 1, log=T)},
log_theta_prior_density = function(x) {dnorm(x, log = T)},
log_theta_proposal_density = function(old_theta, new_theta) {dnorm(new_theta-old_theta, log = T)},
theta_proposal_sampler = function(theta) {rnorm(1, mean = theta)}
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.