Learn R Programming

latrend (version 1.5.0)

estimationTime: Get the model estimation time

Description

Get the estimation time of the model, determined by the time taken for the associated fit() function to finish.

Usage

# S4 method for lcModel
estimationTime(object, unit = "secs", ...)

# S4 method for lcModels estimationTime(object, unit = "secs", ...)

# S4 method for list estimationTime(object, unit = "secs", ...)

Value

A numeric representing the model estimation time, in the specified unit.

Arguments

object

The list of lcModel objects.

unit

The time unit in which the estimation time should be outputted. By default, estimation time is in seconds. For accepted units, see base::difftime.

...

Additional arguments.

Examples

Run this code
data(latrendData)
method <- lcMethodLMKM(Y ~ Time, id = "Id", time = "Time")
model <- latrend(method, latrendData)

estimationTime(model)
estimationTime(model, unit = 'mins')
estimationTime(model, unit = 'days')

Run the code above in your browser using DataLab