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

vif.cca Error in qr.X(Q) #622

Closed
powerfulDie opened this issue Mar 1, 2024 · 0 comments
Closed

vif.cca Error in qr.X(Q) #622

powerfulDie opened this issue Mar 1, 2024 · 0 comments

Comments

@powerfulDie
Copy link

powerfulDie commented Mar 1, 2024

Thank you for the nice tool.
I have a data frame named Env.bank which is the environment data. A total of 26 columns were in this data frame, and the first column was named Sample_ID.
Then I ran:

rda_bank <- rda(Origin_bank_hell ~ ., data=Env.bank[,2:26], scale = TRUE))
vif_bank <- vif.cca(rda_bank)

Everything is OK.

But I want to use the while loop to delete the maximum vif value one by one. so I edited the Sample_ID as the rownames.

Env.bank.LOOP <- Env.bank%>%  column_to_rownames("Sample_ID")

Then I ran the same command as above:

(rda_bank1 <- rda(Origin_bank_hell ~ ., data=Env.bank.LOOP,scale = TRUE))
 vif_bank <- vif.cca(rda_bank1)

there was an error: **Error in qr.X(Q) : need larger value of 'ncol' as pivoting occurred**.

I searched for the reason in chatGPT. It commented that
"it might indicate a potential issue with the collinearity or structure of your data. This error can occur when the design matrix used to fit the model is not full rank."

I am confused. Because there were different results when I used the same data to execute. Did you meet the same case?
Would it be possible for you to help me?

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