-
Notifications
You must be signed in to change notification settings - Fork 19
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
Bootstrap error in seminr model #329
Comments
Hi @Proost1 can I ask how big is your sample size? It seems that during the resampling process of bootstrapping, some of the resampled sets has measurement items that have no variance (all the values are the same). Can you identify which of your items might face this issue? |
Hi! Thanks for reaching out to me. My sample size is 546. I have a lot of factor variables due to Likertscale question, so it is not clear to me which variabels cause troubles. I also have binary variables, but the error does not seem to say which variables the problem are…
Kind regards,
Laura
Op 13 apr. 2023 om 04:04 heeft Soumya Ray ***@***.***> het volgende geschreven:
Hi @Proost1<https://github.com/Proost1> can I ask how big is your sample size? It seems that during the resampling process of bootstrapping, some of the resampled sets has measurement items that have no variance (all the values are the same). Can you identify which of your items might face this issue?
—
Reply to this email directly, view it on GitHub<#329 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A7EBSVTKMRX7ZJ6IJQAF6QDXA5NJNANCNFSM6AAAAAAW3OBTQA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Hi, hmm, I haven't encountered this error before. I can try to help trouble shoot if you could share your data/code with me. If so, you can sent it to my email (on my Github profile) – we will delete all the files after your problem is resolved. |
Error sounds like one variable is a string and not an ordinal value to me.
Sorry for just throwing this in here.
Best
André
… Am 14.04.2023 um 15:53 schrieb Soumya Ray ***@***.***>:
—
|
Leaving parts of my email response to @Proost1 here for the record I've figured out the issue and resolved it. The problem seemed to be that the haven package used to load the SAV data file was interfering with seminr's ability to fix the missing values. It seems that the special a) converting the SAV file into a CSV file (code at top of attached R file – commented out) The model now estimates and can be summarized (note, the summary function takes a minute to finish) I've emailed you the new R code and CSV data file. I suggest that instead of following my above steps (first two are commented out in the code), simply run the attached R file, which uses the data in the attached CSV. Do let me know if it works for you. BUT FIRST, you will have to remove the haven package from memory: I suggest using RStudio's "Session" menu > "Restart R" option, because simply detaching the package didn't work for me. Do let me know if the code runs then! |
I am a master's student conducting research on consumer behavior using the seminr package in Rstudio (version of R: 4.2.3). While working with the bootstrap_model() function, I encountered an error message that reads "8 nodes produced errors; first error: zero variance items cannot be scaled."
I am not certain how to resolve this issue and would appreciate any assistance that could be provided.
Thank you for your help in advance!
The text was updated successfully, but these errors were encountered: