Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

summary() error: Error in [<-(*tmp*, int_components, dv, value = NA) : subscript out of bounds #330

Open
shu9911 opened this issue May 27, 2023 · 3 comments

Comments

@shu9911
Copy link

shu9911 commented May 27, 2023

Hi,

I encountered error when I'm trying to apply summary() to the model.
I can plot the model and see details using $, but when I try to use summary(), the error occurs.

> summary(all_intxn_pls) Error in [<-(tmp, int_components, dv, value = NA) : subscript out of bounds

In addition, I also failed to use bootstrap on this model.

> all__intxn_boot <- bootstrap_model(all_intxn_pls, nboot = 100) Bootstrapping model using seminr... Bootstrapping encountered this ERROR: 8 nodes produced errors; first error: system is computationally singular: reciprocal condition number = 1.60033e-16

I wonder how to fix this error.

My code of the model is as following. Thank you!

#interaction model
all_intxn_mm <- constructs(
  composite("NF", single_item("Cognitive_Style_NF")),
  composite("NT", single_item("Cognitive_Style_NT")),
  composite("SF", single_item("Cognitive_Style_SF")),
  composite("ST", single_item("Cognitive_Style_ST")),
  composite("ISS", single_item("ISS1")),
  composite("Value Co-creation", single_item("VCC_score")),
  interaction_term(iv = "NF", moderator = "ISS", method = orthogonal),
  interaction_term(iv = "NT", moderator = "ISS", method = orthogonal),
  interaction_term(iv = "SF", moderator = "ISS", method = orthogonal),
  interaction_term(iv = "ST", moderator = "ISS", method = orthogonal)
)

all_intxn_sm <- relationships(
  paths(from = c("NF", "NT", "SF", "ST", "NF*ISS", "NT*ISS", "SF*ISS", "ST*ISS"), 
        to = "Value Co-creation")
)

all_intxn_pls <- estimate_pls(data = all, 
                        measurement_model = all_intxn_mm,
                        structural_model = all_intxn_sm,
                        missing = mean_replacement,
                        missing_value = -99)
plot(all_intxn_pls, title = "MBTI*ISS to VCC model")
@soumyaray
Copy link
Contributor

Hi! Before looking into it further, can I ask if this the final model you are interested in? If so, wouldn't it make more sense to just model this using linear regression? All the "constructs" (both IV and DV) seem to be single items, along with interactions.

@shu9911
Copy link
Author

shu9911 commented May 28, 2023

Actually, I've run the regression too!
But I try to take a look at the path coefficients of these variables using SEM.

@soumyaray
Copy link
Contributor

Hi @shu9911 I'll still try to make time to see what is happening here, but apologies that it will not be a first priority as the use case (a regression path model) is a bit outside the intended usage. I do feel that it needs to be resolved at some point though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants