lcModelPartition: Create a lcModel with pre-defined partitioning

Description Usage Arguments

View source: R/modelPartition.R

Description

Represents an arbitrary partitioning of a set of trajectories. As such, this model has no predictive capabilities. The cluster trajectories are represented by the specified center function (mean by default).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
lcModelPartition(
  data,
  response,
  trajectoryAssignments,
  nClusters = NA,
  center = meanNA,
  clusterNames = NULL,
  time = getOption("latrend.time"),
  id = getOption("latrend.id"),
  name = "part",
  envir = parent.frame()
)

Arguments

data

A data.frame representing the trajectory data.

response

The name of the response variable.

trajectoryAssignments

A vector of cluster membership per trajectory, either factor, or integer (1 to nClusters).

nClusters

The number of clusters. Optional for factor assignments.

center

The function for computing the longitudinal cluster centers, used for representing the cluster trajectories.

clusterNames

The names of the clusters, or a function with input n outputting a character vector of names.

time

The name of the time variable.

id

The name of the trajectory identification variable.

name

The name of the method.

envir

The environment associated with the model. Used for evaluating the assigned data object by model.data.lcModel.


latrend documentation built on April 14, 2021, 5:08 p.m.