| autoplot.pcdfit | R Documentation |
Plot the estimated baseline function
## S3 method for class 'pcdfit'
autoplot(object, ...)
## S3 method for class 'pcdfit'
plot(x, ...)
object, x |
A fitted |
... |
Ignored. |
The rate model's \hat\Lambda increases by construction. The means
model's \hat\mu need not, and with covariates that fluctuate it
generally does not; it is drawn as estimated rather than forced upwards,
because that behaviour is the point of the comparison between the two models.
A ggplot2::ggplot() object: a step function of the cumulative
baseline rate for the rate model, or of the baseline mean for the means
model. autoplot() returns it; plot() draws it and returns it
invisibly, so it can be used for its side effect like any other plot()
method.
set.seed(1)
d <- sim_pcd(80, beta = c(1, -1), lambda = function(t) 8 / (1 + t))
autoplot(pcdreg(pcd(id, tstart, tstop, count) ~ x1 + x2, d))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.