covariate_interp {anipaths} | R Documentation |
Synchronous interpolation of covariate using either GAM (same as paths) or piece-wise constant if covariate is a factor
Description
Synchronous interpolation of covariate using either GAM (same as paths) or piece-wise constant if covariate is a factor
Usage
covariate_interp(paths, covariate = NULL, Time.name, time.grid, s_args)
Arguments
paths |
lists of data.frames containing positions, times, and covariate for each individual |
covariate |
character string giving name of covariate variable in data.frames |
Time.name |
character string giving name of time variable in data.frames |
time.grid |
grid of possible times to use for interpolation (individuals will only be interpolated to times within the range of observation times) |
s_args |
arguments to |
Value
list of interpolated covariate by individual
[Package anipaths version 0.10.3 Index]