pim.formula-class {pim} | R Documentation |
Class pim.formula
Description
This class contains information on the formula passed in
a call to pim
. The object is used to create the
model matrix of a pim (see model.matrix
)
Details
Although a future version of this package will include the
possibility to fit survival models, this is currently not implemented.
If the pim
function encounters special functions on the
left-hand side (i.e. when has.lhs.fun
is TRUE
), the
model won't be calculated.
The slot penv
contains a reference to an environment
In most cases, this will be the environment contained in a
pim.environment
object. Note though that the
pim.formula
object only contains a link to the environment.
The extra slots contained in the pim.environment
object
are NOT copied to the pim.formula
. Also keep
in mind that the environment linked to the pim.environment
object will continue to exist even after deleting the
pim.environment
itself, and this for as long as the
pim.formula
object exists.
This class is not exported and hence cannot be extended. It serves internal use in the pim package only.
Slots
terms
a
terms.object
derived from the formulahas.specials
a logical value indicating whether the right-hand side of the original formula contains special functions like
L
andR
has.lhs.fun
a logical value indicating whether the left-hand side of the original formula contains special functions. These exclude the functions
P
andPO
but include functions likeSurv
. See Detailspredictors
a character vector with the names of all the variables mentioned in the right-hand side of the formula.
response
an character vector with the name of the response variable.
lhs
a call with the processed left-hand side of the formula
orig
a formula object with the original formula
penv
an
environment
object to which the formula is related (i.e. the environment containing possibleL
andR
function definitions.) See Details.has.intercept
a logical value indicating whether the formula has an explicit intercept (indicated by + 1)
Note
This class is not exported, so it can't be extended as for now.
Although it is possible to use the function new
for
creation of new instances, users are strongly advised to use
the function new.pim.formula
in case they need to manually
create a new instance of the class pim.formula
.