pistar.mvn: The Mixture Index of Fit for Multivariate Normal Independence

View source: R/pistar.mvn.R

pistar.mvnR Documentation

The Mixture Index of Fit for Multivariate Normal Independence

Description

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).

Usage

pistar.mvn(data, cor_matrix = FALSE, max_dif = .Machine$double.neg.eps^0.5, 
           jack = FALSE, seed = 1989, lag = c(5, 10), verbose = TRUE)

Arguments

data

a matrix, or a correlation matrix.

cor_matrix

logical: is the supplied data a correlation matrix? If TRUE jackknife cannot be performed.

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?

Details

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).

Value

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:

est

for the supplied data.

jack

vector of values from jackknife.

pred

not yet implemented.

data

the supplied data.

param

not yet implemented.

trace

a list of traces from the iterations:

est

vector from estimation with supplied data.

jack

list of traces from jackknife.

iter

a list of numbers of the iterations:

est

from estimation with supplied data.

jack

a list of traces from jackknife.

test

a test statistic to evaluate if the procedure has converged to a local or global optimum. See Knott (2005) for more details.

est

Vector from estimation with supplied data.

jack

List of vectors from jackknife.

Author(s)

Juraj Medzihorsky

Developed from code published by Knott (2005).

References

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.

Examples

	#	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)


jmedzihorsky/pistar documentation built on June 4, 2022, 9:58 a.m.