Assertions and checks that may be of use for custom model implementations.
Check whether the input is a valid posterior probability matrix (for the given model).
Check whether the dataset does not contain trajectories without any observations. Requires Id column to be factor.
Check whether the provided data.frame
represents a longitudinal dataset
Check whether the dataset does not contain trajectories with duplicate observation moments.
Check the number of observation moments for each trajectory
Check whether all trajectories have the same number of observation moments, and are observed at the same moments in time.
Check whether all trajectories don't contain any NA observations.
Check whether there are no trajectories that are only comprised of NA observations
has_lcMethod_args(object, which)is_valid_postprob(pp, model = NULL)
no_empty_trajectories(data, id, ids)
is_data(data, id, time, response)
no_trajectories_duplicate_time(data, id, time)
are_trajectories_length(data, min = 1, id, time)
are_trajectories_equal_length(data, id, time)
have_trajectories_noNA(data, id, response)
no_trajectories_allNA(data, id, response)
The object to test.
The argument names. Ellipsis (...
) will be ignored.
The posterior probability matrix
.
The lcModel
object. Optional.
The id variable
Optional character vector
of trajectory identifiers that are expected to be present in the data.
The time variable
The response column name. Optional.
The minimum required number.