Learn R Programming

IsoriX (version 0.6)

isomultifit: Fit isoscape models per strata (typically time interval such as months)

Description

This function fits several bunch of isocapes (e.g. one per strata), which we call sub-isoscape. It can thus be used to predict annual averages precipitation weighted isoscapes.

Usage

isomultifit(iso.data, split.by = "month", mean.model.fix = list(elev = TRUE,
  lat.abs = TRUE, lat.2 = FALSE, long = FALSE, long.2 = FALSE),
  disp.model.fix = list(elev = FALSE, lat.abs = FALSE, lat.2 = FALSE, long =
  FALSE, long.2 = FALSE), mean.model.rand = list(uncorr = TRUE, spatial =
  TRUE), disp.model.rand = list(uncorr = TRUE, spatial = TRUE),
  uncorr.terms = list(mean.model = "lambda", disp.model = "lambda"),
  spaMM.method = list(mean.model = "fitme", disp.model = "fitme"),
  dist.method = "Earth", control.mean = list(), control.disp = list(),
  verbose = interactive())

Arguments

iso.data

The dataframe containing the data used for fitting the isoscape model

split.by

A string indicating the name of the column of iso.data used to split the dataset. The function isofit will then be called on each of these sub-datasets. The default split the dataset per months (split.by = "month").

mean.model.fix

A list of logical indicating which fixed effects to consider in mean.fit

disp.model.fix

A list of logical indicating which fixed effects to consider in disp.fit

mean.model.rand

A list of logical indicating which random effects to consider in mean.fit

disp.model.rand

A list of logical indicating which random effects to consider in disp.fit

uncorr.terms

A list of two strings defining the parametrization used to model the uncorrelated random effects for mean.fit and disp.fit

spaMM.method

A list of two strings defining the spaMM functions used for mean.fit and disp.fit

dist.method

A string indicating the distance method

control.mean

A list of additional arguments to be passed to the call of mean.fit

control.disp

A list of additional arguments to be passed to the call of disp.fit

verbose

A logical indicating whether information about the progress of the procedure should be displayed or not while the function is running. By default verbose is TRUE if users use an interactive R session and FALSE otherwise.

Value

This function returns a list of class multiisofit containing all pairs of inter-related fits: multi.fits. The returned list also contains the object info.fit that contains all the call arguments.

Details

This function is a wrapper around the function isofit.

See Also

isofit for information about the fitting procedure of each sub-isoscape.

Examples

Run this code
# NOT RUN {
## The examples below will only be run if sufficient time is allowed
## You can change that by typing e.g. IsoriX.options(example_maxtime = XX)
## if you want to allow for examples taking up to ca. XX seconds to run
## (so don't write XX but put a number instead!)

if(IsoriX.getOption("example_maxtime") > 30) {

## We prepare the GNIP monthly data between January and June for Germany

GNIPDataDEmonthly <- queryGNIP(data = GNIPDataDE,
                               month = 1:6,
                               split.by = "month")

dim(GNIPDataDEmonthly)

## We fit the isoscapes

isoscapemodels <- isomultifit(iso.data = GNIPDataDEmonthly)

isoscapemodels
}
# }

Run the code above in your browser using DataLab