signident: A posteriori sign identification

Description Usage Arguments Value See Also Examples

View source: R/utilities_fsvdraws.R

Description

signident provides methods for identifying the signs of the factor loadings after running the MCMC sampler

Usage

1
signident(x, method = "maximin", implementation = 3)

Arguments

x

Object of class 'fsvdraws', usually resulting from a call to fsvsample.

method

Can be "diagonal" or "maximin". If "diagonal" is chosen, the diagonal elements of the factor loadings matrix are assumed to have positive signs and the others are arranged accordingly. If "maximin" is chosen, for each factor, signident looks for the series where the minimum absolute loadings are biggest and chooses this series to have positive loadings.

implementation

Either 1, 2, or 3 (the default). Determines how the reordering is implemented. Should not be necessary to depart from the default.

Value

Returns an object of class 'fsvdraws' with adjusted factors and factor loadings. Moreover, a list element called 'identifier' is added, providing the numbers of the series used for identification and the corresponding minimum distances to zero.

See Also

Other postprocessing: orderident()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
set.seed(1)
sim <- fsvsim(series = 8, factors = 2) # simulate 
res <- fsvsample(sim$y, factors = 2, signswitch = TRUE,
                 draws = 2000, burnin = 1000) # estimate

# Plot unidentified loadings:
facloaddensplot(res, fsvsimobj = sim, rows = 8)

# Identify:
res <- signident(res)

# Plot identified loadings:
facloaddensplot(res, fsvsimobj = sim, rows = 8)

factorstochvol documentation built on Feb. 10, 2021, 1:07 a.m.