standardized_to_direct {pedmod}R Documentation

Transform Between Parameterizations

Description

Transform the parameters between the parameterizations that are used in the package.

Usage

standardized_to_direct(par, n_scales, jacobian = FALSE)

direct_to_standardized(par, n_scales)

Arguments

par

concatenated vector with the fixed effect slopes and the scale parameters that should be transformed.

n_scales

integer with the number of scale parameters.

jacobian

logical indicating if the Jacobian matrix of transformation should be computed.

Value

standardized_to_direct: returns the parameters using the direct parameterizations. See vignette("pedmod", package = "pedmod") for the definition. There is an attribute called 'variance proportions' with the proportion of variance of each effect assuming that all the scale matrices are correlation matrices. There is an attribute called jacobian with the Jacobian matrix if jacobian is TRUE.

direct_to_standardized: the parameters using the standardized parameterizations. See vignette("pedmod", package = "pedmod") for the definition.

Examples

# transform backwards and forwards
set.seed(1)
smp <- runif(10, -1, 1)
res <- standardized_to_direct(smp, 2L, jacobian = TRUE)
back_val <- direct_to_standardized(res, 2L)

all.equal(smp, back_val, check.attributes = FALSE)
res


[Package pedmod version 0.2.4 Index]