| variogram | R Documentation |
It computes the semi-variogram for longitudinal data.
variogram(y, times, id)
y |
a numeric vector of longitudinal responses. |
times |
a numeric vector of times at which the longitudinal responses were collected. |
id |
a numeric vector of a factor of subject id numbers. |
A list with two components, i.e., svar, a two-column matrix with the time lags and the variogram
values, and sigma2 the total variance.
Dimitris Rizopoulos d.rizopoulos@erasmusmc.nl
ind <- aids$patient == 2
yy <- aids$CD4[ind]
tt <- aids$obstime[ind]
ids <- aids$patient[ind]
variogram(yy, tt, ids)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.