Hi,
I am trying to make a palaeoenvironmental transfer function using the R
package rioja that predicts the water-table (measured as depth to the water
table) of an area given the testate amoebae that are found there. I've
carried out weighted averaging of the data and am trying to produce a graph
that shows the observed water-table versues the model's predicted values.
Following the instructions in the rioja help booklet (see below), I end up
with a graph where the origin is not at the bottom left of the diagram, i.e.
the graph is showing some values that suggest that the water table is, say,
1m above ground.
I've tried entering the water-tables as negative values but the same thing
happens.
Does anybody know if there something I'm missing out? Or is there a way
that, if the values returned are less than 0, then they can automatically be
put just as 0?
Any help would be most appreciated,
Thank you,
Matthew


My environmental matrix (x) is:
SampleId WTD Moisture pH EC
1 "1" "20" "91.72700" "3.496674" " 85.02688"
2 "2" " 2" "93.88913" "3.550794" " 85.69465"
3 "3" "26" "90.30269" "3.948559" "113.19206"
4 "4" " 5" "94.14427" "3.697213" " 48.56375"
5 "5" "30" "90.04269" "3.745020" "108.57278"
....
90 "GAL_15" "70" "94.07849" "3.777932" " 66.77673"

The species matrix (y) contains the abundance of 32 species over 90 sites,
set out like this
F1 AmpFlav AmpWri ArcCat ArcDis
1 1 22.2929936 0.0000000 0.0000000 0.0000000
2 2 30.9677419 0.0000000 0.0000000 3.2258065


fit <- WA(y, x, tolDW = FALSE, use.N2=TRUE, check.data=TRUE, lean=FALSE)
# plot predicted vs. observed
plot(fit)
plot(fit, resid=TRUE)
# Water-table reconstruction
pred <- predict(fit, y)
#plot the reconstruction
plot(sites, pred$fit[, 1], type="b")
# cross-validation model using bootstrapping
fit.xv <- crossval(fit, cv.method="boot", nboot=1000)
par(mfrow=c(1,2))
plot(fit)
plot(fit, resid=TRUE)
plot(fit.xv, xval=TRUE)
plot(fit.xv, xval=TRUE, resid=TRUE)

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to