Learn R Programming

pim (version 2.0.2)

response: Extract response from a pim.formula or a pim object

Description

This function extracts the response from a pim.formula for use in pim.fit.

Usage

response(object)

# S4 method for pim.formula response(object)

# S4 method for pim response(object)

Arguments

object

an object of class pim or pim.formula.

Value

The response variable with pseudo-observations for a pim.

See Also

pim-class and pim.formula-class for more information on the classes, and pim, pim.fit and pim.formula for more information on related functions.

Examples

Run this code
# NOT RUN {
data('FEVData')
Model <- pim(FEV~ Smoke*Sex , data=FEVData)
response(Model)

# In pieces
FEVenv <- new.pim.env(FEVData, compare="unique")
FEVform <- new.pim.formula(
  Age ~ I(L(Height) - R(Height))  ,
  FEVenv
)
response(FEVform)
# }

Run the code above in your browser using DataLab