Learn R Programming

latrend (version 1.1.0)

lcModelWeightedPartition: Create a lcModel with pre-defined weighted partitioning

Description

Create a lcModel with pre-defined weighted partitioning

Usage

lcModelWeightedPartition(
  data,
  response,
  weights,
  center = weighted.meanNA,
  clusterNames = colnames(weights),
  time = getOption("latrend.time"),
  id = getOption("latrend.id"),
  name = "wpart"
)

Arguments

data

The data on which the cluster result is based, a data.frame.

response

The name of the response variable.

weights

A numIds x numClusters matrix of partition probabilities.

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.