-
Notifications
You must be signed in to change notification settings - Fork 26
Description
I would like to check the htmt by using bootstrap confidence intervals
When nboot is set to a larger number, e.g. 1000, the following error occured
Error in if (original_matrix[i, j]/stats::sd(boot_array[i, j, ]) > 999999999) { :
missing value where TRUE/FALSE needed
If nboot is reduced to 100, no error was found.
- Is there a recommended number of boot?
- If the sample size is small (only 22 for now), is it suitable to do PLS-SEM using bootstrap approach?
EDIT on 2023/12/08:
I dive deeper into the code, and fine the corresponding line of code
report_paths_and_intervals.R, line 262
parse_boot_array <- function(original_matrix, boot_array, alpha = 0.05) {
...
if (original_matrix[i,j]/ stats::sd(boot_array[i,j,]) > 999999999) {}
...
}
which is called from report_summary.r, line 59-68 for 5 times.
The problem is that the boot_HTMT value in one of the model is Inf
htmt_summary <- parse_boot_array(HTMT(object), object$boot_HTMT, alpha = alpha)
The HTMT() is from evaluate_validity.R, line 46
It seems that the Inf is probably due to divided by zero of MTHM (or MTMM?), such that sum(cor_matrix[!lower.tri(cor_matrix)]) is zero. My first suspicion is that the there could be negative correlation, but the matrix is calculating the HTMT+ (Ringle et al., 2023) instead of the original HTMT (Henseler et al., 2015) by setting cor_matrix <- abs(...).
In this case, I think the root cause there are only a few items (maybe 2?) within a construct, and the correlation matrix is zero in one of the bootstrapped model due to subsampling problem in small sample size. However, we should at least have a warning message about the situation of zero correlation, rather than throwing the error directly.