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

soc.mca: error with passive modalities #104

Open
FCalderoni opened this issue Dec 10, 2021 · 0 comments
Open

soc.mca: error with passive modalities #104

FCalderoni opened this issue Dec 10, 2021 · 0 comments

Comments

@FCalderoni
Copy link

After successfully using the soc.mca back in 2014, I tried to update the analysis. Initially all was fine and I succeeded.
Then something happened from one day to the other. I did not change the code (was actually cleaning it before storing it for the future). The issue is quite simple.

When I try to set my passive modalities and run soc.mca I now get the following error:

Error in rowSums(ind.reduced[, varlist.long.red == unique(varlist)[i]]) :
'x' must be an array of at least two dimensions

After some trial and error I was able to reach a possible hypothesis: I am setting as passive one modality of a dummy variable (1/0) and this generates the error. If I try and set as passive a modality of a factor with more variables, the problem disappears.
I also hypothesize that the error popped up after I have updated R, R Studio and all the packages a few days ago.

I was able to find this https://github.com/Rsoc/soc.ca/blob/master/extra/soc_ca_all_scripts.R and I think the problem may be in line 523 and following of the code.

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

1 participant