Extracts the response variable from the given object
.
Get the response variable, i.e., the dependent variable.
responseVariable(object, ...)
# S4 method for class 'lcMethod'
responseVariable(object, ...)
# S4 method for class 'lcModel'
responseVariable(object, ...)
A nonempty string, as character
.
If the lcMethod
object specifies a formula
argument, then the response is extracted from the response term of the formula.
Other variables:
idVariable()
,
timeVariable()
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"