Extracts the response variable from the given object.

Get the response variable, i.e., the dependent variable.

responseVariable(object, ...)

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

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

Arguments

object

The object.

...

Not used.

Value

A nonempty string, as 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 variables: idVariable(), timeVariable()

Examples

method <- lcMethodLMKM(Y ~ Time)
responseVariable(method) # "Y"
#> [1] "Y"
data(latrendData)
method <- lcMethodRandom("Y", id = "Id", time = "Time")
model <- latrend(method, latrendData)
responseVariable(model) # "Y"
#> [1] "Y"