Learn R Programming

latrend (version 1.1.0)

responseVariable: Extract the response variable

Description

Extracts the response variable from the given object.

Usage

# S4 method for lcMethod
responseVariable(object, ...)

# S4 method for lcModel responseVariable(object, ...)

Arguments

object

The object to extract the response variable from.

...

Additional arguments.

Value

The response variable name as a character.

Details

If the lcMethod object specifies a formula argument, then the response is extracted from the response term of the formula.

See Also

Other lcModel variables: idVariable(), timeVariable()

Examples

Run this code
# NOT RUN {
method <- lcMethodKML("Value")
responseVariable(method) # "Value"

method <- lcMethodLcmmGBTM(fixed = Value ~ Time, mixture = ~ Time)
responseVariable(method) # "Value"

data(latrendData)
model <- latrend(lcMethodKML("Y", id = "Id", time = "Time"), latrendData)
responseVariable(model) # "Value"
# }

Run the code above in your browser using DataLab