lcApproxModel-class {latrend}R Documentation

lcApproxModel class

Description

approx models have defined cluster trajectories at fixed moments in time, which should be interpolated For a correct implementation, lcApproxModel requires the extending class to implement clusterTrajectories(at=NULL) to return the fixed cluster trajectories

Usage

## S3 method for class 'lcApproxModel'
fitted(object, ..., clusters = trajectoryAssignments(object))

## S4 method for signature 'lcApproxModel'
predictForCluster(
  object,
  newdata,
  cluster,
  what = "mu",
  approxFun = approx,
  ...
)

Arguments

object

The lcModel object.

...

Additional arguments.

clusters

Optional cluster assignments per id. If unspecified, a matrix is returned containing the cluster-specific predictions per column.

newdata

A data.frame of trajectory data for which to compute trajectory assignments.

cluster

The cluster name (as character) to predict for.

what

The distributional parameter to predict. By default, the mean response 'mu' is predicted. The cluster membership predictions can be obtained by specifying what = 'mb'.

approxFun

Function to interpolate between measurement moments, approx() by default.


[Package latrend version 1.6.1 Index]