pistar.mvn | R Documentation |
pistar.mvn
is used to estimate the value of the pi*
mixture index of fit for independence in multivariate normal distribution
using the procedure of Knott (2005). Standard errors can be obtained
using jackknife as proposed by Dayton (2003).
pistar.mvn(data, cor_matrix = FALSE, max_dif = .Machine$double.neg.eps^0.5, jack = FALSE, seed = 1989, lag = c(5, 10), verbose = TRUE)
data |
a matrix, or a correlation matrix. |
cor_matrix |
logical: is the supplied data a correlation matrix? If |
max_dif |
numeric: maximal acceptable difference between selected iterations for the convergence diagnostic. See ‘Details’. |
jack |
logical: perform jackknife? |
seed |
seed for random number generation. |
lag |
parameters of the convergence diagnostic, see ‘Details’. |
verbose |
logical: print during estimation? |
The function was developed from code published by Knott (2005).
A simple convergence diagnostic was added to Knott's (2005) procedure.
The absolute values of the differences between the value of
pi* at the current iteration and between lag
iterations and stops the iterations as successful if all the differences
are smaller than the constant supplied as max_dif
argument.
To check if the algorithm has converged to a global or a local minimum
check test
in the output and restart the procedure with
a different seed
if needed (see Knott 2005 for more details).
Object of class
"Pistar"
, and "PistarMVN"
with the following components:
call |
the matched call. |
pistar |
a list of estimated values of the mixture index of fit:
|
pred |
not yet implemented. |
data |
the supplied data. |
param |
not yet implemented. |
trace |
a list of traces from the iterations:
|
iter |
a list of numbers of the iterations:
|
test |
a test statistic to evaluate if the procedure has converged to a local or global optimum. See Knott (2005) for more details.
|
Juraj Medzihorsky
Developed from code published by Knott (2005).
Dayton, C. M. (2003) Applications and computational strategies for the two-point mixture index of fit. British Journal of Mathematical & Statistical Psychology, 56, 1-13.
Knott, M. (2005) A measure of independence for a multivariate normal distribution and some connections with factor analysis, Journal of Multivariate Analysis, 96, 374-383.
# simulate data set.seed(1989) n <- 1e2 A <- cbind(rnorm(n), rnorm(n)) # find pi* a <- pistar(proc="mvn", data=A, jack=FALSE) a summary(a) plot(a)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.