| responseVariable | R Documentation |
Extracts the response variable from the given object.
## S4 method for signature 'lcMethod' responseVariable(object, ...) ## S4 method for signature 'lcModel' responseVariable(object, ...)
object |
The object to extract the response variable from. |
... |
Additional arguments. |
If the lcMethod object specifies a formula argument, then the response is extracted from the response term of the formula.
The response variable name as a character.
Other lcModel variables:
idVariable(),
timeVariable()
method <- lcMethodLMKM(Y ~ Time)
responseVariable(method) # "Y"
data(latrendData)
method <- lcMethodRandom("Y", id = "Id", time = "Time")
model <- latrend(method, latrendData)
responseVariable(model) # "Y"