MultiMapParameters: Mapping function for univariate distributions

Description Usage Arguments Details Value Author(s) Examples

View source: R/ParameterTransformation.R

Description

Map unrestricted vector of parameters into the proper space. This function transforms the parameters updated using the GAS recursion into their proper space.

Usage

1
MultiMapParameters(Theta_tilde, Dist, N)

Arguments

Theta_tilde

numeric Vector of reparametrised parameters, see Details.

Dist

character Label of the conditional distribution, see DistInfo.

N

numeric Cross sectional dimension. Note that only iN<5 is supported.

Details

The order of the parameters is generally: locations, scales, correlations, shape. When the distribution defined by Dist does not have, say, the shape parameter, this should be simply omitted. See also DistInfo for specific distributions.

Value

A numeric vector of parameters.

Author(s)

Leopoldo Catania

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Map unrestricted parameters for the Multivariate Student-t distribution with N=3
library("GAS")

N = 3

Dist = "mvt"

# Vector of location parameters (this is not transformed).
Mu_tilde  = c(0.1,0.2,0.3)

# Vector of unrestricted scales parameters such that
# the scales will be equal to 1.0, 1.2 and 0.3, for the first, second and
# third variables, respectively.
Phi_tilde = c(log(1.0), log(1.2), log(0.3))

# The vector c(0.1,0.2,0.3) represents vec(R),
# where R is the correlation matrix.
# Note that is up to the user to ensure that
# vec(R) implies a proper correlation matrix
# The function UnMapR_C transforms vec(R) in a vector of unrestricted parameters. It is
# the inverse of the hyperspherical coordinates transformration.

Rho_tilde = UnMapR_C(c(0.1,0.2,0.3), N)

# Vector of unconditional reparametrised parameters such that the
# degrees of freedom are 7.
#
# LowerNu() prints the lower bound numerical parameter for the degree
# of freedom, see help(LowerNu)
#

Theta_tilde = c(Mu_tilde, Phi_tilde , Rho_tilde, log(7 - LowerNu()))

Theta = MultiMapParameters(Theta_tilde, Dist, N)

Theta

GAS documentation built on Feb. 4, 2022, 5:12 p.m.