Fills in predictor, response, and effort matrics for time series data where there are multiple multivariate time series. Time series gjam is here https://htmlpreview.github.io/?https://github.com/jimclarkatduke/gjam/blob/master/gjamTimeMsVignette.html
gjamFillMissingTimes(xdata, ydata, edata, groupCol, timeCol, groupVars = groupCol,
FILLMEANS = FALSE, typeNames = NULL, missingEffort = .1)
n by Q data.frame
holding predictor variables
n by S matrix
holding response variables
n by S matrix
holding effort
column name in xdata
for group variable, i.e., observations part of the same time series
column name in xdata
for time index
character vector
of column names in xdata
having values that are fixed for a value of groupCol
, i.e., they do not change with time index in timeCol
fill new rows in ydata
with mean for groupCol
times missingEffort
; otherwise NA
typenames current limited to 'DA'
for discrete counts
effort assigned to missing values of edata
and ydata
A list containing the following:
filled version of xdata
filled version of ydata
filled version of edata
time indices used for computation, including, timeZero
(row numbers in new data where each time series begins, with times = 0), timeLast
(row numbers in new data where each time series ends), rowInserts
(row numbers for all inserted rows), noEffort
(rows for which effort in edata
is filled with missingEffort
)
Missing times in the data occur where there are gaps in timeCol
column of xdata
and the initial time 0
for each sequence. New versions of the data have NA
(xdata
) or prior values with appropriate weight (ydata
). Missing times are filled in xdata, ydata, edata
, including a time 0
which serves as a prior mean for ydata
for time code1. The group and time indices in columns groupCol
and timeCol
of xdata
reference the time for a given time series. Missing values in the columns groupVars
of xdata
are filled automatically filled in. This assumes that values for these variables are fixed for the group. If FILLMEANS
, the missing values in ydata
are filled with means for the group and given a low weight specified in missingEffort
.
Clark, J. S., C. L. Scher, and M. Swift. 2020. The emergent interactions that govern biodiversity change. Proceedings of the National Academy of Sciences, 117, 17074-17083.
gjam
for more on xdata
, ydata
, and effort.
A more detailed vignette is can be obtained with:
browseVignettes('gjam')
web site 'http://sites.nicholas.duke.edu/clarklab/code/'.