ggrcs2 | R Documentation |
A Function to Draw Histograms and Restricted Cubic Splines (RCS)
data |
need a dataframe |
fit |
You need the fitted model.Must be lrm or coxph. |
x |
The target variable you wish to fit. It is displayed on the X-axis when plotting. |
You can use this function to easily draw a combined.histogram and restricted cubic spline.The function draws the graph through ggplot2.RCS fitting requires the use of the rcs function of the RMS package.Can fit cox regression,logistic regression and linear regression models.
a picture
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.