normal_random_effect_model: Instantiate random_effects_model object

Description Usage Arguments Value

View source: R/random_effects_model.R

Description

This is an S3 object constructor helper function for class random_effects_model which inherics from cpmmc class. This class uses the normal_log_IS_estimate function to estimate log likelihood using importance sampling.

Usage

1
2
3
4
5
normal_random_effect_model(data, theta_0, u_0, rho,
  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))

Arguments

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_theta_prior_density,

log density function for the prior distribution of theta, default is the standard Gaussian distribution

log_theta_proposal_density,

log density function for theta proposals, default is the random walk proposal using the standard Gaussian distribution

theta_proposal_sampler,

distribution function to sample new theta proposals, default is the standard Gaussian distribution

Value

random_effects_model object


JTT94/cpmmc documentation built on May 14, 2019, 12:08 p.m.