Download The Hmisc Package
Transcript
286
transcan
check
set to FALSE to suppress certain warning messages
newdata
a new data matrix for which to compute transformed variables. Categorical variables must use the same integer codes as were used in the call to transcan.
If a formula was originally specified to transcan (instead of a data matrix),
newdata is optional and if given must be a data frame; a model frame is generated automatically from the previous formula. The na.action is handled
automatically, and the levels for factor variables must be the same and in the
same order as were used in the original variables specified in the formula given
to transcan.
fit.reps
set to TRUE to save all fit objects from the fit for each imputation in fit.mult.impute.
Then the object returned will have a component fits which is a list whose ith
element is the ith fit object.
derived
an expression containing S expressions for computing derived variables that are
used in the model formula. This is useful when multiple imputations are done for
component variables but the actual model uses combinations of these (e.g., ratios
or other derivations). For a single derived variable you can specified for example derived=expression(ratio <- weight/height). For multiple derived variables use the form derived=expression({ratio <- weight/height;
product <- weight*height}) or put the expression on separate input
lines. To monitor the multiply-imputed derived variables you can add to the
expression a command such as print(describe(ratio)). See the
example below.
type
By default, the matrix of transformed variables is returned, with imputed values
on the transformed scale. If you had specified trantab=TRUE to transcan,
specifying type="original" does the table look-ups with linear interpolation to return the input matrix x but with imputed values on the original scale
inserted for NAs. For categorical variables, the method used here is to select
the category code having a corresponding scaled value closest to the predicted
transformed value. This corresponds to the default impcat; a problem in getting predicted values for tree objects prevented using tree for this. Note:
imputed values thus returned when type="original" are single expected
value imputations even in n.impute is given.
object
an object created by transcan, or an object to be converted to S function code,
typically a model fit object of some sort
prefix
suffix
When creating separate S functions for each variable in x, the name of the new
function will be prefix placed in front of the variable name, and suffix
placed in back of the name. The default is to use names of the form .varname,
where varname is the variable name.
where
position in search list at which to store new functions (for Function). Default is position 1 in the search list. See the assign function for more documention on the where argument.
y
a vector corresponding to x for invertTabulated, if its first argument x is
not a list
freq
a vector of frequencies corresponding to cross-classified x and y if x is not a
list. Default is a vector of ones.