I am trying to perform an RDA analysis with a simple dataset but I keep on having the same errors even though the data is standardized. Can anyone help me understand what is the problem with this model?
`view(data_RDA)
summary(data_RDA)
abiotic.lake<-data_RDA[, c(1:11)]
biotic.lake<-data_RDA[, c(12:20)]
biotic.lake<-decostand(biotic.lake,"hellinger")
abiotic.lake<-decostand(abiotic.lake,"standardize")
rda.lake<- rda(biotic.lake, abiotic.lake)
plot(rda.lake, type="text") #The error starts at this point
anova.cca(rda.lake)
summary(rda.lake)
coef(rda.lake)
`
The error I´m getting when I try to run the plot line:
Error in cbind(x$CCA$v, x$CA$v)[, choices, drop = FALSE] :
subscript out of bounds
I think the analysis is not being performed because the summary of rda.lake returns only RDA1 results.
The data are being recognized as numeric.
The anova.cca function returns only zeros as residuals and does not show a p-value, what makes me believe there is a problem with the data or the model.
These are the actual tables used and both have 6 rows.
biotic.lake
Cian | Crip | Dino | Cris | Xant | Diat | Eugl | Zigne | Cloro |
---|---|---|---|---|---|---|---|---|
0.0590634 | 0.21536114 | 1.286085 | 0.01117714 | 0.00000000 | 0.17741471 | 0.1438246 | 0.04127306 | 0.23323527 |
0.0590634 | 0.21536114 | 1.286085 | 0.01117714 | 0.00000000 | 0.17741471 | 0.1438246 | 0.04127306 | 0.23323527 |
0.0590634 | 0.21536114 | 1.286085 | 0.01117714 | 0.00000000 | 0.17741471 | 0.1438246 | 0.04127306 | 0.23323527 |
2.8144055 | 0.09724492 | 1.128178 | 0.02302370 | 0.03858338 | 0.01373549 | 0.9708160 | 0.90119103 | 0.08646308 |
2.8144055 | 0.09724492 | 1.128178 | 0.02302370 | 0.03858338 | 0.01373549 | 0.9708160 | 0.90119103 | 0.08646308 |
2.8144055 | 0.09724492 | 1.128178 | 0.02302370 | 0.03858338 | 0.01373549 | 0.9708160 | 0.90119103 | 0.08646308 |
abiotic.lake
Prof | Temp_H2O | OD | Cond | N_Tot | NO2 | NO3 | SRP | SIO | Zmax | Zeu |
---|---|---|---|---|---|---|---|---|---|---|
0.0 | 20.7 | 8.15 | 98 | 230.72 | 9.28 | 294.32 | 15.91 | 3.72 | 4.8 | 4.5 |
2.0 | 20.4 | 7.16 | 105 | 228.61 | 8.56 | 352.34 | 8.92 | 4.49 | 4.8 | 4.5 |
4.8 | 20.0 | 5.20 | 107 | 190.82 | 6.82 | 293.81 | 11.15 | 7.82 | 4.8 | 4.5 |
0.0 | 30.4 | 9.24 | 100 | 610.28 | 3.46 | 42.82 | 36.15 | 13.17 | 5.0 | 2.0 |
2.0 | 28.3 | 6.62 | 110 | 612.11 | 3.63 | 48.19 | 32.19 | 11.94 | 5.0 | 2.0 |
5.0 | 25.8 | 2.13 | 115 | 560.31 | 4.69 | 60.98 | 35.30 | 11.03 | 5.0 | 2.0 |
- Edit: As required, the output of "dput"
Blockquote
`dput(data_RDA)
structure(list(Prof = c(0, 2, 4.8, 0, 2, 5), Temp_H2O = c(20.7, 20.4, 20, 30.4, 28.3, 25.8), OD = c(8.15, 7.16, 5.2, 9.24, 6.62, 2.13), Cond = c(98L, 105L, 107L, 100L, 110L, 115L), N_Tot = c(230.72, 228.61, 190.82, 610.28, 612.11, 560.31), NO2 = c(9.28, 8.56, 6.82, 3.46, 3.63, 4.69), NO3 = c(294.32, 352.34, 293.81, 42.82, 48.19, 60.98), SRP = c(15.91, 8.92, 11.15, 36.15, 32.19, 35.3), SIO = c(3.72, 4.49, 7.82, 13.17, 11.94, 11.03), Zmax = c(4.8, 4.8, 4.8, 5, 5, 5), Zeu = c(4.5, 4.5, 4.5, 2, 2, 2), Cian = c(0.0590634, 0.0590634, 0.0590634, 2.814405487, 2.814405487, 2.814405487), Crip = c(0.215361139, 0.215361139, 0.215361139, 0.097244921, 0.097244921, 0.097244921), Dino = c(1.286084811, 1.286084811, 1.286084811, 1.128178481, 1.128178481, 1.128178481), Cris = c(0.011177144, 0.011177144, 0.011177144, 0.023023705, 0.023023705, 0.023023705), Xant = c(1e-07, 1e-07, 1e-07, 0.038583378, 0.038583378, 0.038583378), Diat = c(0.17741471, 0.17741471, 0.17741471, 0.01373549, 0.01373549, 0.01373549), Eugl = c(0.14382456, 0.14382456, 0.14382456, 0.970816029, 0.970816029, 0.970816029), Zigne = c(0.041273061, 0.041273061, 0.041273061, 0.901191033, 0.901191033, 0.901191033), Cloro = c(0.233235275, 0.233235275, 0.233235275, 0.086463085, 0.086463085, 0.086463085)), class = "data.frame", row.names = c(NA, -6L))
- Edit 2: As required, the output of rda.lake:
Blockquote
'rda.lago
Call: rda(X = biotic.lake, Y = abiotic.lake)
Inertia Proportion Rank
Total 0.01198 1.00000
Constrained 0.01198 1.00000 1
Unconstrained 0.00000 0.00000 0
Inertia is variance
Some constraints were aliased because they were collinear (redundant)
Eigenvalues for constrained axes:
RDA1
0.011977 '
- Edit 3: NAs produced by rda analysis.
Blockquote
'coef(rda.lake)
RDA1
Prof 0.003503013
Temp_H2O -0.152503172
OD 0.100134578
Cond 0.020938441
N_Tot -0.295691269
NO2 NA
NO3 NA
SRP NA
SIO NA
Zmax NA
Zeu NA '