cdf.lmscreg {VGAM} | R Documentation |
Computes the cumulative distribution function (CDF) for observations, based on a LMS quantile regression.
cdf.lmscreg(object, newdata = NULL, ...)
object |
A VGAM quantile regression model, i.e.,
an object produced by modelling functions such as vglm
and vgam with a family function beginning with
"lms." .
|
newdata |
Data frame where the predictions are to be made. If missing, the original data is used. |
... |
Parameters which are passed into functions such as
cdf.lms.yjn .
|
The CDFs returned here are values lying in [0,1] giving the relative
probabilities associated with the quantiles newdata
.
For example, a value near 0.75 means it is close to the upper quartile
of the distribution.
A vector of CDF values lying in [0,1].
The data are treated like quantiles, and the percentiles
are returned. The opposite is performed by
qtplot.lmscreg
.
The CDF values of the model have been placed in
@post$cdf
when the model was fitted.
Thomas W. Yee
Yee, T. W. (2004) Quantile regression via vector generalized additive models. Statistics in Medicine, 23, 2295–2315.
Documentation accompanying the VGAM package at http://www.stat.auckland.ac.nz/~yee contains further information and examples.
deplot.lmscreg
,
qtplot.lmscreg
,
lms.bcn
,
lms.bcg
,
lms.yjn
.
data(bminz) fit = vgam(BMI ~ s(age, df=c(4,2)), fam=lms.bcn(zero=1), data=bminz) fit@post$cdf[1:5] cdf(fit)[1:5] # Same fit@y[1:5] fitted(fit)[1:5,] cdf(fit, data.frame(age=c(31.5,39), BMI=c(28.4,24)))