Discriminant Validity

1,398 views
Skip to first unread message

VEERARAGHAVAN J

unread,
Aug 26, 2015, 2:09:35 AM8/26/15
to lavaan
Hi all,

I performed cfa() using lavaan's cfa() functiion with default arguments, and obtained fit stats. I used reliability() method of semTools package to find the AVE and alpha values. But I do not know how to perform discriminant validity, to produce a factor correlation matrix and Square root of AVE just as it look like in the stats tools package of James Gaskin as explained in this youtube video.

 https://www.youtube.com/watch?v=yk6DVC7Wg7g

Any way to produce the factor correlation matrix and sqare root of AVE to evaluate discriminant validity after performing cfa() using the lavaan package? All your help in this is highly appreciated. Thanks in advance.

Mikko Rönkkö

unread,
Aug 26, 2015, 3:16:36 AM8/26/15
to lav...@googlegroups.com
Hi

You an get the estimated factor correlations with 

inspect(fit, “cor.lv”)

See the documentation

?lavInspect

The square root function in R is sqrt, and you can apply that to the AVE values.

You should note that there is very little evidence that the AVE comparison detects discriminant validity problems.

Mikko

--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+un...@googlegroups.com.
To post to this group, send email to lav...@googlegroups.com.
Visit this group at http://groups.google.com/group/lavaan.
For more options, visit https://groups.google.com/d/optout.

VEERARAGHAVAN J

unread,
Aug 26, 2015, 5:16:10 AM8/26/15
to lavaan
Hi Mikko,

Thanks for the swift reply. In many articles the AVE comparison(Fornell and Larcker criterion) is cited for discriminant validity in addition to cross loadings. I read in an article Heterotrait-monotrait (HTMT) ratio of correlation is a better method. Is it possible to use it using lavaan? If so I can use that method instead rather than AVE comparison. If not I may use,if any other better method which is supported by lavaan. Thanks in advance.

Mikko Rönkkö

unread,
Aug 26, 2015, 5:27:15 AM8/26/15
to lav...@googlegroups.com
Hi,

The HTMT index is calculated from the data covariance matrix and does not require a model to be estimated. It does basically the same thing as the AVE criterion. Both these essentially asses whether the factors are perfectly correlated, but that is not what the original idea of discriminant validity of measures is about. There is no evidence that I would be aware of that would show that either of these approaches would generally detect crossloading indicators. 

You can calculate the HTML with the following code:

# Mean within- and between-block correlations
meanBlockCor <- (t(reflective) %*% (S*lower.tri(S)) %*% reflective) /
(t(reflective) %*% lower.tri(S) %*% reflective)
# Choose the blocks that have at least two reflective indicators
i <- which(colSums(reflective) > 1)
meanBlockCor <- meanBlockCor[i,i]
# Calculate the indices
htmt <- meanBlockCor*lower.tri(meanBlockCor) /
sqrt(diag(meanBlockCor) %o% diag(meanBlockCor))



Where S is the sample correlation matrix and reflective is a binary matrix indicating the factor loading matrix.


The chi square statistic will tell you if the model fits the data and if it does not, then you need to diagnose why that is the case.

Mikko

VEERARAGHAVAN J

unread,
Aug 26, 2015, 9:51:03 AM8/26/15
to lavaan
Thanks...But I could not understand the code, as I am a newbie to R programming. Anyway I try to understand and use it in my work. Thank you so much again...


On Wednesday, 26 August 2015 11:39:35 UTC+5:30, VEERARAGHAVAN J wrote:

VEERARAGHAVAN J

unread,
Aug 26, 2015, 10:43:27 AM8/26/15
to lavaan
Hi,

I want to know how to extract the AVE from reliability() method to calculate square root of AVE. I found little doc in R regarding the type of object returned by reliability() method. Also after calculating the sqrt of AVE I want to join AVE with factor correlation matrix(AVE in diagonal). How to do it? Thanks in advance.


On Wednesday, 26 August 2015 11:39:35 UTC+5:30, VEERARAGHAVAN J wrote:

Mikko Rönkkö

unread,
Aug 26, 2015, 10:49:20 AM8/26/15
to lav...@googlegroups.com
Hi

AVE is the mean of squared standardized factor loadings. Here is an example how to calculate AVEs:

# load the lavaan package (only needed once per session)
library(lavaan)

# specify the model
HS.model <- ' visual  =~ x1 + x2 + x3      
textual =~ x4 + x5 + x6
speed   =~ x7 + x8 + x9 '

# fit the model
fit <- cfa(HS.model, data=HolzingerSwineford1939)

# Extract the standardized loading matrix
loadMatrix <- inspect(fit, "std")$lambda

# Clear the zero loadings
loadMatrix[loadMatrix==0] <- NA

# Calculate mean squared loadings (i.e. AVEs)
apply(loadMatrix^2,2,mean, na.rm = TRUE)




Mikko

VEERARAGHAVAN J

unread,
Aug 26, 2015, 11:03:25 AM8/26/15
to lavaan
HI,

Thanks a lot for the inner working of how AVE is calculated.Thats very neat and clear. But what I asked is take out AVE from reliability() function and add it with the output of lavInspect(fit,"cor.lv"). It would be helpful to manipulate data using matrix or data frame. Thanks in advance.


On Wednesday, 26 August 2015 11:39:35 UTC+5:30, VEERARAGHAVAN J wrote:

Alex Schoemann

unread,
Aug 26, 2015, 11:46:22 AM8/26/15
to lavaan
reliability() in semTools returns a matrix. If you run

rel <- reliability(fit)

You have a matrix named rel with rows representing different measures of reliability and columns representing factors.

VEERARAGHAVAN J

unread,
Aug 26, 2015, 1:28:36 PM8/26/15
to lavaan
Thank you so much alex...Very good info which is not available in the documentation. would suffice my need...

Mahima Raina

unread,
Jun 23, 2017, 10:57:29 PM6/23/17
to lavaan
Would appreciate a further explaination on R code for HTMT.
Can you please give another example and description? Thanks in advance !

Terrence Jorgensen

unread,
Jun 26, 2017, 4:44:39 AM6/26/17
to lavaan
Would appreciate a further explaination on R code for HTMT.
Can you please give another example and description? 

You can find example syntax and a reference for further reading on the ?htmt help page (in the semTools package).

This forum is only about using lavaan, but you can address any further questions about HTMT on the general SEM forum SEMNET:


Terrence D. Jorgensen
Postdoctoral Researcher, Methods and Statistics
Research Institute for Child Development and Education, the University of Amsterdam

Reply all
Reply to author
Forward
0 new messages