View source: R/helper_functions.R
| calc_trackInd | R Documentation |
Function to conveniently calculate the trackInd variable that is needed internally when fitting a model to longitudinal data with multiple tracks.
calc_trackInd(ID)
ID |
ID variable of track IDs that is of the same length as the data to be analysed |
A vector of indices of the first observation of each track which can be passed to the forward and forward_g to sum likelihood contributions of each track
uniqueID = c("Animal1", "Animal2", "Animal3")
ID = rep(uniqueID, c(100, 200, 300))
trackInd = calc_trackInd(ID)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.