Description Usage Arguments Value See Also Examples
View source: R/rms_estimate_with_int.R
This will often be used in conjunction with lapply or purrr::pmap. For an example,
see chunk death_inhosp_plot in this Rnw file
(function here is called estimate.with.interaction.rms).
| 1 | rms_estimate_with_int(rmsObjName, estVar, estVals, intVar, intAdjust, getRatios)
 | 
| rmsObjName | Character string; name of model fit object of class rms | 
| estVar | Character string; name of variable for which we want estimate/CI | 
| estVals | Vector of length 2; comparison wanted for main variable. Default = datadist() defaults. | 
| intVar | Character string; name of interacting variable | 
| intAdjust | Character or numeric value; value to adjust intVar to. Default = datadist() default. | 
| getRatios | Indicator for whether to calculate ratios (exp(XB)) vs estimates on XB scale. Defaults to TRUE if get(rmsObjName) is from cph() or lrm(). | 
data.frame containing reference, comparison, effect, lower and upper confidence limits, variable name and indicator for whether row contains reference:reference comparison.
ols, lrm, cph,
Gls, summary.rms, map,
pmap.
| 1 2 3 4 5 6 7 8 9 | ## Fit logistic regression using lrm()
mymod <- lrm(Species ~ Sepal.Length * Sepal.Width, data = iris)
## Set datadist
dd.iris <- datadist(iris)
options(datadist = 'dd.iris')
## Continuous covariate, comparing all quantiles to median by default
rms_estimate_with_int('mymod', estVar = 'Sepal.Length', intVar = 'Sepal.Width')
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.