genCookDist {influence.SEM}R Documentation

Generalized Cook Distance.

Description

Case influence on a vector of parameters may be quantified by generalized Cook's Distance (gCD; Cook 1977, 1986):

gCD_i=(\hat{\mathbf{\theta}}-\hat{\mathbf{\theta}}_{(i)})' _a\hat{\mathbf{\Sigma}}(\hat{\mathbf{\theta}}_{(i)})^{-1} (\hat{\mathbf{\theta}}-\hat{\mathbf{\theta}}_{(i)})

where \hat{\mathbf{\theta}} and \hat{\mathbf{\theta}}_{(i)} are l \times 1 vectors of parameter estimates obained from the original and delete i samples, and _a\hat{\mathbf{\Sigma}}(\hat{\mathbf{\theta}}_{(i)}) is the estimated asymptotic covariance matrix of the parameter estimates obtained from reduced sample.

Usage

genCookDist(model, data, ...)

Arguments

model

A description of the user-specified model using the lavaan model syntax. See lavaan for more information.

data

A data frame containing the observed variables used in the model. If any variables are declared as ordered factors, this function will treat them as ordinal variables.

...

Additional parameters for sem function.

Value

Returns a vector of gCD_i.

Note

If for observation i model does not converge or yelds a solution with negative estimated variances, the associated value of gCD_i is set to NA.

Author(s)

Massimiliano Pastore

References

Cook, R.D. (1977). Detection of influential observations in linear regression. Technometrics, 19, 15-18.

Cook, R.D. (1986). Assessment of local influence. Journal of the Royal Statistical Society B, 48, 133-169.

Pek, J., MacCallum, R.C. (2011). Sensitivity Analysis in Structural Equation Models: Cases and Their Influence. Multivariate Behavioral Research, 46, 202-228.

Examples

## not run: this example take several minutes
data("PDII")
model <- "
  F1 =~ y1+y2+y3+y4
"
# fit0 <- sem(model, data=PDII)
# gCD <- genCookDist(model,data=PDII)
# plot(gCD,pch=19,xlab="observations",ylab="Cook distance")

## not run: this example take several minutes
## an example in which the deletion of a case produces solution 
## with negative estimated variances
model <- "
  F1 =~ x1+x2+x3
  F2 =~ y1+y2+y3+y4
  F3 =~ y5+y6+y7+y8
"

# fit0 <- sem(model, data=PDII)
# gCD <- genCookDist(model,data=PDII)
# plot(gCD,pch=19,xlab="observations",ylab="Cook distance")

[Package influence.SEM version 2.3 Index]