-
Notifications
You must be signed in to change notification settings - Fork 97
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
Error in if (R2.adds[best] > R2.previous && (!R2scope || R2scope && R2.adds[best] <= : missing value where TRUE/FALSE needed #610
Comments
There is no reproducible example, but I can generate this with overfitted models that have no residual variation (no residual unconstrained component). In those cases Please confirm if your full model is overfitted (no residual variation). If it is not overfitted, there is some unknown problem and we need a reproducible example. |
I think the full model is not overfitted cause I have ran a 67 environment variants and a 27 environment variants dataset for forward selection without any error (use the same command line). Here I paste a reproducible example in a email. |
@eggxo Thanks for the files you sent privately. First look at these files shows that you really run out of degrees of freedom and you have zero residual variation. This makes Here is the essential information from your full model: Inertia Proportion Rank
Total 4131 1
Constrained 4131 1 24
Unconstrained 0 0 0
Inertia is variance
Some constraints or conditions were aliased because they were redundant This shows that the residual unconstrained variance is 0. The rank of constrained component is 24, and some constraints were aliased because you got more of them than could be analysed with your data. In this case the aliased variables were > alias(RDAfull, names.only=TRUE)
[1] "windannual" "UVB4" "UVB5" "UVB6" |
thank u Sir! |
ordir2step can proceed to models with no residual unconstrained variation where adjusted R2 will be NA and this will stop with error condition. Now stops smoothly and reports adjR2=0 for these cases.
Dear jarioksa,
I meet an error: Error in if (R2.adds[best] > R2.previous && (!R2scope || R2scope && R2.adds[best] <= : missing value where TRUE/FALSE needed when I run ordiR2step. It seems the test reached the <none>, then the program Execution halted.
How could I solve this problem? Thanks alot! (below are the log and my command)
command:
RDA0 <- rda(gen ~ 1, Variables)
save(RDA0,file="RDA0.data")
RDAfull <- rda(gen ~ ., Variables)
save(RDAfull,file="RDAfull.data")
mod <- ordiR2step(RDA0, RDAfull, Pin = 1, R2permutations = 1000, R2scope = F)
log:
Step: R2.adj= 0.4143618
Call: gen ~ UVB4 + sradthrid7_9 + sradfirst1_3 + UVB3 + sradsecond4_6 + Organic + sradfour10_12 + vaprsecond4_6 + sradannual + CECSOL_M_mean + PHIHOX_M_mean + K + UVB5 + windthrid7_9 + P + vaprfirst1_3 + elev + windsecond4_6 + windfour10_12 + UVB2 + vaprfour10_12 + vaprannual + OCDENS_M_mean
R2.adjusted
<none> 0.4143618
Error in if (R2.adds[best] > R2.previous && (!R2scope || R2scope && R2.adds[best] <= :
missing value where TRUE/FALSE needed
Calls: ordiR2step
Execution halted
The text was updated successfully, but these errors were encountered: