ppi_param_tools {scorematchingad} | R Documentation |
PPI Parameter Tools
Description
The default parameterisation of the PPI model is a symmetric covariance-like matrix , a location-like vector
and a set of Dirichlet exponents
. For
p
components, has
p-1
rows, is a vector with
p-1
elements and is a vector with
p
elements.
For score matching estimation this form of the parameters must be converted into a single parameter vector using ppi_paramvec()
.
ppi_paramvec()
also includes easy methods to set parameters to NA
for estimation with ppi()
(in ppi()
the NA-valued elements are estimated and all other elements are fixed).
The reverse of ppi_paramvec()
is ppi_parammats()
.
An alternative parametrisation of the PPI model uses a single p
by p
matrix instead of
and
, and for identifiability
is such that
where
and
(Scealy and Wood 2023).
Convert between parametrisations using
ppi_toAstar()
and ppi_fromAstar()
.
Usage
ppi_paramvec(
p = NULL,
AL = NULL,
bL = NULL,
Astar = NULL,
beta = NULL,
betaL = NULL,
betap = NULL
)
ppi_parammats(paramvec)
ppi_toAstar(AL, bL)
ppi_fromAstar(Astar)
Arguments
p |
The number of components. If |
AL |
Either |
bL |
Either |
Astar |
The |
beta |
Either |
betaL |
Either |
betap |
Either |
paramvec |
A PPI parameter vector, typically created by |
Details
ppi_paramvec()
returns a vector starting with the diagonal elements of , then the off-diagonal elements extracted by
upper.tri()
(which extracts elements of along each row, left to right, then top to bottom), then
, then
.
The Astar
parametrisation rewrites the PPI density as proportional to
where (
Astar
) is a by
matrix.
Because
lies in the simplex (in particular
), the density is the same regardless of the value of
=
sum(Astar)
, where is the vector of ones. Thus
and
specify
up to an additive factor. In the conversion
ppi_toAstar()
, is returned such that
.
NULL
values or NA
elements are not allowed for ppi_toAstar()
and ppi_fromAstar()
.
Value
ppi_paramvec()
: a vector of length .
ppi_parammats()
: A named list of ,
, and
.
ppi_toAstar()
: The matrix .
ppi_fromAstar()
: A list of the matrix , the vector
and a discarded constant.
PPI Model
The PPI model density is proportional to
where is the dimension of a compositional measurement
, and
is
without the final (
th) component.
is a
symmetric matrix that controls the covariance between components.
is a
vector that controls the location within the simplex.
The
th component
of
controls the concentration of density when
is close to zero: when
there is no concentration and
is hard to identify; when
then the probability density of the PPI model increases unboundedly as
approaches zero, with the increasing occuring more rapidly and sharply the closer
is to
.
See Also
Other PPI model tools:
dppi()
,
ppi_robust()
,
ppi()
,
rppi()
Examples
ppi_paramvec(AL = "diag", bL = 0, betap = -0.5, p = 3)
vec <- ppi_paramvec(AL = rsymmetricmatrix(2), beta = c(-0.8, -0.7, 0))
ppi_parammats(vec)
Astar <- rWishart(1, 6, diag(3))[,,1]
ppi_fromAstar(Astar)
ppi_toAstar(ppi_fromAstar(Astar)$AL, ppi_fromAstar(Astar)$bL)