Description Usage Arguments Details Value Author(s) See Also Examples
This function is called by survsim.plot
and is not intended to be used by itself.
1 |
data |
A data frame of simulated duration data in which the duration variable is called y.
Generally, this data frame is taken from the |
xb |
A vector of the linear predictors, combining the covariates and coefficients from the simulation.
Generally, this data frame is taken from the |
bins |
The number of bins to draw in each histogram |
This function produces three histograms, one of the simulated durations, one of the linear predictors,
and one of the exponentiated linear predictors. It uses facet_wrap
within
a call to ggplot
to arrange the plots.
A figure of class "gg"
and "ggplot"
Jonathan Kropko <jkropko@virginia.edu> and Jeffrey J. Harden <jharden2@nd.edu>
1 2 | simdata <- sim.survdata(N=1000, T=100, num.data.frames=1)
data.plot(simdata$data, simdata$xb)
|
Loading required package: rms
Loading required package: Hmisc
Loading required package: lattice
Loading required package: survival
Loading required package: Formula
Loading required package: ggplot2
Attaching package: ‘Hmisc’
The following objects are masked from ‘package:base’:
format.pval, units
Loading required package: SparseM
Attaching package: ‘SparseM’
The following object is masked from ‘package:base’:
backsolve
Loading required package: mgcv
Loading required package: nlme
This is mgcv 1.8-33. For overview type 'help("mgcv-package")'.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.