selectSupTrajMinSize {longitudinalData} | R Documentation |
When an individual trajectories contain too many missing value, it
might be necessary to exclude it.
Give an object of class LongData
,
selecSupTrajMinSize
select the trajectories that does not contain
too many missing value.
selectSupTrajMinSize(object,minSize)
object |
[LongData] : Object from who some individual
trajectories may be exclude |
minSize |
[numeric] : minimum number of non missing value
that an individual trajectories must contain to not be exclude. |
Individual trajectories whose values are partially missing can either be
excluded or included in a computation. minSize
sets the
minimum number of values that a trajectory must contain to not be
excluded. For example, if a trajectories have 7 mesurements
(time=7
) and minSize
is set to 3, the trajectory
(5,3,NA,4,NA,NA,NA)
will be include while
(2,NA,NA,NA,4,NA,NA)
will be exclude. Please note that
trajectories that are totally missing (i.e. 0 present values) are always excluded.
A logical vecteur taking values TRUE for the trajectories to include, FASLE for the trajectories to exclude.
### Construction of the LongData trajA <- as.longData(matrix(c(4,1,1,NA,NA,1,NA,NA,2,2,3,NA),4)) ### Selection of the longData with at least 2 values selectSupTrajMinSize(trajA,2) ### Selection of the longData with no missing value selectSupTrajMinSize(trajA,3)