eval_sbetel: Evaluate a smoothed BETEL density

Description Usage Arguments Value Examples

View source: R/core.R

Description

Evaluate a (unnormalized) smoothed BETEL density at parameter values th given the model (list) generated by init_sbetel() and the data xy. A wrapper for c++ implementation.

Usage

1
eval_sbetel(th, model, xy = model$args$xy, td = 0, itermax = 20)

Arguments

th

A numerical vector of parameter values.

model

A list returned by init_sbetel() defining the model.

xy

The data for which the density is coniditoned on. Defaults to the data passed to init_sbetel() without the prior.

td

The number of rows of prior data, i.e. the number of rows from the beginning of the data that should not be smoothed.

itermax

Maximum number of Newton-Rhapson iterations within the evaluation of the likelihood. Defaults to 20 which should be more than enough.

Value

eval_sbetel() returns a numerical value that is the unnormalized density at th conditional on xy.

Examples

1
2
3
4
## Not run: 
eval_sbetel(th = model$initial(model$args$xy)$th, model = model, xy = model$args$xy)

## End(Not run)

jetroant/sbetel documentation built on Oct. 20, 2020, 1:11 a.m.