questions about isofit function

56 views
Skip to first unread message

simona ceriani

unread,
Jun 8, 2021, 10:07:11 AM6/8/21
to IsoriX

Hi All,

Thank you for letting me join the group! I work with sea turtles and I use d13C and d15N to predict likely origin of individuals. We have turtle tissues collected from known origin individual (~500) over 20 years. In the past, we used Arc GIS Bayesian kriging using all known points to develop tissue-specific isoscapes and conducted cross validation statistics. I like a lot the idea of using IsoriX as it’s R-based and wonder whether it could be used to build tissue-specific isoscapes in the marine environment?

I started playing around and I am getting stuck at the isofit step. It seems to require a nonzero variance and N>1 for fitting a residual dispersion model. When using Arc GIS, we used each individual point as an input but with isoriX, it seems we need to aggregate them first spatially. The problem is that we don’t have multiple isotope values from the same exact location bc we don’t have “stations” so our situation is different than what is shown in the working example with precipitation. If we aggregate points, we will lose sample size and if we aggregate points, what’s the best way to do so? spatially? Spatially & temporally?

My next question is regarding the use of elevation. Is it obligatory to have an elevation column and elevation data? Does the isofit function use elevation to mask water since the working example is focused on terrestrial systems? And if so, could I use bathymetry in the same way to mask land?

Thank you in advance for your insight.

Best

Simona

Alexandre Courtiol

unread,
Jun 9, 2021, 7:24:07 AM6/9/21
to iso...@googlegroups.com
Hi Simona,

Thanks for joining!

There is a lot to unpack here, so I won't attempt to reply to everything in detail at once.

Can IsoriX be used to build tissue-specific isoscapes in the marine environment?
Yes, certainly. I helped others before to analyse plankton and to make isoscape in seas and as far as I recall, that did not require any modification of IsoriX.
So if you get a script started and hit a roadblock, just let me know and I will show you how to.
We would love it if more "marine" people used IsoriX.
It was initially stimulated by projects about bats but there is no reason that it remains restricted to that.
To tell you everything, I even considered adding another dimension in IsoriX to model isovolumes (or whatever you would call a 3d isoscapes), but I never got around to it (perhaps in the future?).

What to do when you don’t have multiple isotope values from the same exact location?
IsoriX thinks of isotopes as being characterised by a (gaussian) distribution that varies in space.
It attempts to estimate how both the mean and the variance of such a distribution varies in space.
That the mean varies in space is the idea that any kriging is attempting to capture.
IsoriX goes further by also modelling the change in variance in space.
We did this because we think that it is important to consider such a variation for obtaining reliable assignments.
In your case for example the variance in isotopes that exist at a given location could be due to shifting currents in the sea.
These are the reasons why IsoriX requires several points per location.
So I see 2 options:
- 1. you decide to neglect such variance at a given location.
- 2. you attempt to estimate it by aggregating turtles over small areas.
As usual, I would recommend you try both and compare.
We can detail further how to in follow-up emails.
The aggregation does not "lose sample size": the N is considered as weights in the computations, and since IsoriX is only interested in distributions that are assumed gaussian (at a given location), all the info is present in the means and SD.

What is the elevation used for?
When working on land, elevation is used as a predictor for the isotopes.
In your case, I don't know if depth may influence isotopes value.
Perhaps not for the mean model, but probably for the model describing the changes in variance.
So you could indeed replace elevation by depth.
It is not used as a mask.
Specific masks are used in the plots and for the assignment, and in your case, masking the land will be trivial.
In short, IsoriX should be able to work with no elevation although there may be some glitches to fix for this to work smoothly (see e.g. https://github.com/courtiol/IsoriX/issues/125).
Again, if you get a script started and hit a roadblock, just let me know and I will show you how to and/or change IsoriX to make things easier.

I hope this helps.

++

Alex


--
You received this message because you are subscribed to the Google Groups "IsoriX" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isorix+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isorix/e3bc445d-7334-4da7-b517-46fb95d403d9n%40googlegroups.com.


--

simona ceriani

unread,
Jun 9, 2021, 6:29:35 PM6/9/21
to iso...@googlegroups.com
Hi Alex,
Thank you so much for the detailed reply and explanation. Very helpful! I'll try what you suggested. :-)
One more question regarding option 1 - could we run the model with each sample having a variance of 0 and N of 1?

Thanks!
Simona

You received this message because you are subscribed to a topic in the Google Groups "IsoriX" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/isorix/yk2vXOT9wc8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to isorix+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isorix/CAERMt4cm6C91UW4xX3QtYUe4itkY%2Bb0r7wWvq69C189w8-T7KA%40mail.gmail.com.

Alexandre Courtiol

unread,
Jun 10, 2021, 2:44:26 AM6/10/21
to iso...@googlegroups.com
Hi Simona,


On Thu, 10 Jun 2021 at 00:29, simona ceriani <simona....@gmail.com> wrote:
Hi Alex,
Thank you so much for the detailed reply and explanation. Very helpful! I'll try what you suggested. :-)
One more question regarding option 1 - could we run the model with each sample having a variance of 0 and N of 1?

To try that without me making some changes, I would suggest you start by trying the following:
1. Set all N to 1 except for one observation (put 2, ideally an observation with a value close to the mean value; but that should have little effect if you have enough turtles).
2. Randomly draw a very tiny variance at each location
3. Make sure the fitting of the disp model does not attempt estimating spatial variation by using the correct arguments in isofit.
Doing so could be problematic for the calibration step but as I understand your problem you will directly make a turtle isoscape and assign origin location using that, so you should not need to perform any calibration.
In the absence of calibration, the variance used for assignment is the response variance, i.e. prediction variance + residual variance.
In your case, such response variance will be simply the prediction variance since the residual variance will be fitted to something very close to 0.
So that should work!

Here is an example on the data of the package:

library(IsoriX)

GNIPDataDEagg$n_source_value <- 1
GNIPDataDEagg$n_source_value[1] <- 2 ## we add a single 2
GNIPDataDEagg$var_source_value <- runif(nrow(GNIPDataDEagg), min = 1e-6, max = 1e-4)

foo <- isofit(
  data = GNIPDataDEagg,
  disp_model_fix = list(elev = FALSE, lat_abs = FALSE, lat_2 = FALSE, long = FALSE, long_2 = FALSE),
  disp_model_rand = list(uncorr = FALSE, spatial = FALSE),
)

bar <- isoscape(raster = ElevRasterDE, isofit = foo)
plot(bar, which = "disp", mask = list(mask = NULL))

 

simona ceriani

unread,
Jun 10, 2021, 5:48:10 AM6/10/21
to iso...@googlegroups.com
Thank you Alexandre for your prompt reply! We'll give it a try! And yes, you are correct, we don't need to apply a calibration :-)
Best,
Simona

Tony Tucker

unread,
May 12, 2022, 11:35:38 AM5/12/22
to IsoriX
hello Simona, I have similar questions about flatback turtles in Western Australia so will be interested in the SEUS loggerhead example
Reply all
Reply to author
Forward
0 new messages