Description Usage Arguments Details Value Author(s) References Examples
Formats a data frame of variable time-series for use in run.mar
1 2 3 |
data |
Data frame to be transformed: first column dates, following columns variable time-series | ||||||||||||||||
increment |
Time-step increment data are to be averaged into: "month", "year", "week", or "day" | ||||||||||||||||
fill.gap |
Maximum length of gap between time-steps to be filled by linear interpolation | ||||||||||||||||
replace.0s |
How zeros in the time-series should be dealt with:
| ||||||||||||||||
log |
Should the data be log-transformed? | ||||||||||||||||
z.method |
Standardize the data so all variables have equal means and standard deviations:
| ||||||||||||||||
order |
The order in which year, month, and day are recorded in the date format in the first column of |
The run.mar
function requires a data frame consisting of a continuous time-block indicator variable in the first column, dates/time-steps in the second column, and variable time-series with evenly spaced time-step increments in the remaining columns. This function automatically creates the continuous time-block variable column and aggregates the time-series into evenly spaced increments as indicated by the increment
argument. Although it automatically tries to assess the format of the dates in data
, the order
argument may have to be provided if this fails (for example, in the case where all dates in the dataset fall before the 12th of each month).
Other transformations that are commonly applied to ecological data prior to MAR modeling (e.g., Hampton et al. 2006, Ives et al. 2003) can optionally be performed, but are skipped by default with their respective arguments set to FALSE.
A data frame with a continuous time-block indicator variable in the first column, dates/time-steps in the second column, and variable time-series with evenly spaced time-step increments in the remaining columns
LP Scheef
Hampton SE, Scheuerell MD, and Schindler DE (2006) Coalescence in the Lake Washington story: Interaction strengths in a planktonic food web. Limnology and Oceanography 51:2042-2051
Ives AR, Dennis B, Cottingham KL, and Carpenter SR (2003) Estimating community stability and ecological interactions from time-series data. Ecological Monographs 73:301-330
1 2 3 | data(L4.AllDates)
L4.mar<-prepare.data(data=L4.AllDates, increment="month", fill.gap=0,
replace.0s="rand.half", log=TRUE, z.method="deseason")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.