Plot the histograms of simulated data
This function is called by survsim.plot
and is not intended to be used by itself.
data.plot(data, xb, bins = 30)
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>
simdata <- sim.survdata(N=1000, T=100, num.data.frames=1) data.plot(simdata$data, simdata$xb)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.