transformFitted: Helper function for ensuring the right fitted() output

Description Usage Arguments Value

Description

This function is also responsible for checking whether the input data is valid, such that the fitting process can fail early.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
transformFitted(pred, model, clusters)

## S4 method for signature ''NULL',lcModel'
transformFitted(pred, model, clusters)

## S4 method for signature 'matrix,lcModel'
transformFitted(pred, model, clusters)

## S4 method for signature 'list,lcModel'
transformFitted(pred, model, clusters)

## S4 method for signature 'data.frame,lcModel'
transformFitted(pred, model, clusters)

Arguments

pred

Prediction object

model

The model from which the prediction is made.

clusters

Optional argument for specifying the trajectory cluster assignments.

Value

A vector if the clusters argument is specified, else a matrix with the fitted values per cluster per column.


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