Each model function for IterativeQuadrature,
LaplaceApproximation, LaplacesDemon,
PMC, or VariationalBayes requires a vector
of parameters (specified at first as Initial.Values) and a list
of data. One component in the list of data must be named
parm.names. Each element of parm.names is a name
associated with the corresponding parameter in Initial.Values.
The parm.names vector is easy to program explicitly for a simple
model, but can require considerably more programming effort for more
complicated models. The as.parm.names function is a utility
function designed to minimize programming by the user.
For example, a simple model may only require parm.names <-
c("alpha", "beta[1]", "beta[2]", "sigma"). A more complicated model
may contain hundreds of parameters that are a combination of scalars,
vectors, matrices, upper-triangular matrices, and arrays, and is the
reason for the as.parm.names function. The code for the above
is as.parm.names(list(alpha=0, beta=rep(0,2), sigma=0)).
In the case of an upper-triangular matrix, simply pass the full matrix
to as.parm.names and indicate that only the upper-triangular
will be used via the uppertri argument. For example,
as.parm.names(list(beta=rep(0,J),U=diag(K)), uppertri=c(0,1))
creates parameter names for a vector of \(\beta\) parameters of
length \(J\) and an upper-triangular matrix \(\textbf{U}\) of
dimension \(K\).
Numerous examples may be found in the accompanying ``Examples''
vignette.