Consistent error message while running grouping analysis in 'plspm' package

49 views Asked by At

I am looking for some help in resolving an error using the partial least squares path modeling package ('plspm').

I can get results running a basic PLS-PM analysis but run into issues when using the grouping function, receiving the error message:

Error in if (w_dif < specs$tol || iter == specs$maxiter) break : missing value where TRUE/FALSE needed

I have no missing values and all variables have the proper classification. Elsewhere I read that there is a problem with processing observations with the exact same values across all variables, I have deleted those and still face this issue. I seem to be facing the issue only when I run the groups using the "bootstrap" method as well.

farmwood = read.csv("farmwood_groups(distance).csv", header = TRUE) %>%

slice(-c(119:123))

Control = c(0,0,0,0,0,0)
Normative = c(0,0,0,0,0,0)
B_beliefs = c(0,0,0,0,0,0)
P_control = c(1,0,0,0,0,0)
S_norm = c(0,1,0,0,0,0)
Behavior = c(0,0,1,1,1,0)


farmwood_path = rbind(Control, Normative, B_beliefs, P_control, S_norm, Behavior)

colnames(farmwood_path) = rownames(farmwood_path)

    farmwood_blocks = list(14:18,20:23,8:13,24:27,19,4:7)
farmwood_modes = rep("A", 6)
farmwood_pls = plspm(farmwood, farmwood_path, farmwood_blocks, modes = farmwood_modes)
ames(farmwood)[names(farmwood) == "QB3"] <- "Distance"

farmwood$Distance <- as.factor(farmwood$Distance)
distance_boot = plspm.groups(farmwood_pls, farmwood$Distance, method = "bootstrap")
distance_perm = plspm.groups(farmwood_pls, farmwood$Distance, method = "permutation")

The data is contained here:

https://www.dropbox.com/s/8vewuupywpi1jkt/farmwood_groups%28distance%29.csv?dl=0

Any help would be appreciated. Thank you in advance

0

There are 0 answers