truncsm | R Documentation |
For truncated data within some boundary, estimate parameters that do not necessarily rely on the boundary.
truncsm(x, dV, family = mvn(), init = NULL, options = list(), ...)
x |
truncated random observation |
dV |
boundary where |
family |
distribution family to look in, currently supports multivariate normal as "mvn" |
init |
initial conditions to be passed to |
options |
extra options that can be specified, see details |
... |
additional arguments that can be passed to optim |
For details of the procedure, see "Estimating Density Models with Complex Truncation Boundaries" by Song Liu et al.
The variable x
takes values within a certain truncated region, where the boundary of this region is defined by
dV
. It is possible through score matching to estimate parameters that are not constrained
to the boundary by minimising the difference in score functions of the model and the data - the gradient of the log pdf, i.e.
ψ = \nabla log p(x; θ).
If family
is not supplied, then psi
needs to be supplied as an element of options
.
psi
will be function will calculates the derivatives of the log pdf, and needs to output a list
containing two elements: the first derivative as f
and second derivative as grad
.
All arguments to options
are:
psi
function outputting first and second derivatives of log pdf as f
and grad
, taking two inputs only: theta
and x
; the parameter to estimate over and the truncated observations.
g
function outputting function controlling behaviour at the boundary, outputting value and first derivative of the function as g
and grad
, taking two inputs only: the truncated observations, x
and the boundary points dV
.
See psi_mvn
and g_def
for examples.
parameter estimates given by score matching
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.