Description Usage Arguments Value Author(s) See Also Examples
A linear interpolation, using approx
, is used to obtain
estimates of the covariate at times other than those observed.
1 2 3 4 5 | interplinear(x, ...)
## S3 method for class 'lgtdl'
interplinear(x, time, cov = NULL, ...)
## S3 method for class 'AsIs'
interplinear(x, ...)
|
x |
The |
time |
The time(s) at which interpolation is desired. |
cov |
The name of the covariate in the |
... |
Ignored. |
A vector containing the interpolated estimates of the covariate values at the requested times.
Robert Gentleman
1 2 3 4 5 6 | x1<-data.frame(time=c(1,3,5), cov=c(4,6,8))
x2<-data.frame(time=c(11,13,15), interest=c(66,45,88))
x1<-as.lgtdl(x1)
x2<-as.lgtdl(x2)
interpprev(x1, 4)
interpprev(x2, c(12, 14))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.