responseVariable {latrend} | R Documentation |
Extract response variable
Description
Extracts the response variable from the given object
.
Get the response variable, i.e., the dependent variable.
Usage
responseVariable(object, ...)
## S4 method for signature 'lcMethod'
responseVariable(object, ...)
## S4 method for signature 'lcModel'
responseVariable(object, ...)
Arguments
object |
The object. |
... |
Not used. |
Details
If the lcMethod
object specifies a formula
argument, then the response is extracted from the response term of the formula.
Value
A nonempty string, as character
.
See Also
Other variables:
idVariable()
,
timeVariable()
Examples
method <- lcMethodLMKM(Y ~ Time)
responseVariable(method) # "Y"
data(latrendData)
method <- lcMethodRandom("Y", id = "Id", time = "Time")
model <- latrend(method, latrendData)
responseVariable(model) # "Y"
[Package latrend version 1.6.1 Index]