View source: R/utilities_fsvdraws.R
signident | R Documentation |
signident
provides methods for identifying the signs of
the factor loadings after running the MCMC sampler
signident(x, method = "maximin", implementation = 3)
x |
Object of class |
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, |
implementation |
Either 1, 2, or 3 (the default). Determines how the reordering is implemented. Should not be necessary to depart from the default. |
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.
Other postprocessing:
orderident()
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.