Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

transformPredict

Helper function that matches the output to the specified newdata


Description

If Cluster is not provided, the prediction is outputted in long format per cluster, resulting in a longer data.frame than the newdata input

Usage

transformPredict(pred, model, newdata)

## S4 method for signature ''NULL',lcModel'
transformPredict(pred, model, newdata)

## S4 method for signature 'vector,lcModel'
transformPredict(pred, model, newdata)

## S4 method for signature 'matrix,lcModel'
transformPredict(pred, model, newdata)

## S4 method for signature 'data.frame,lcModel'
transformPredict(pred, model, newdata)

Arguments

pred

The prediction object

model

The model for which the prediction is made.

newdata

A data.frame containing the input data to predict for.

Value

A data.frame with the predictions, or a list of cluster-specific prediction frames


latrend

A Framework for Clustering Longitudinal Data

v1.1.2
GPL (>= 2)
Authors
Niek Den Teuling [aut, cre] (<https://orcid.org/0000-0003-1026-5080>), Steffen Pauws [ctb], Edwin van den Heuvel [ctb], Copyright © 2021 Koninklijke Philips N.V. [cph]
Initial release
2021-04-14

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.