lms.yjn(percentiles = c(25, 50, 75), zero = NULL,
link.lambda = "identity", link.sigma = "loge",
elambda=list(), esigma=list(),
dfmu.init=4, dfsigma.init=2,
init.lambda = 1, init.sigma = NULL,
rule = c(10, 5), yoffset = NULL,
diagW=FALSE, iters.diagW=6)
lms.yjn2(percentiles=c(25,50,75), zero=NULL,
link.lambda="identity", link.sigma="loge",
elambda=list(), esigma=list(),
dfmu.init=4, dfsigma.init=2,
init.lambda=1.0, init.sigma=NULL,
yoffset=NULL, nsimEIM=250)
NULL
, means they all are
functions of the covariates.Links
for more choices.Links
for more choices.earg
in Links
for general information.vsmooth.spline
.vsmooth.spline
.
This argument may be assigned NULL
to get an initial value
NULL
, means an initial value is computed
in the @initialize
slot of the family function.NULL
, means -median(y)
is used, so that
the response actually used has median zero. TdiagW = TRUE
.CommonVGAMffArguments
for more information."vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
and vgam
.The generic function predict
, when applied to a
lms.yjn
fit, does not add back the yoffset
value.
lms.yjn2()
estimates the expected information
matrices using simulation (and is consequently slower) while
lms.yjn()
uses numerical integration.
Try the other if one function fails.Yee, T. W. (2004) Quantile regression via vector generalized additive models. Statistics in Medicine, 23, 2295--2315.
Yee, T. W. (2002) An Implementation for Regression Quantile Estimation. Pages 3--14. In: Haerdle, W. and Ronz, B., Proceedings in Computational Statistics COMPSTAT 2002. Heidelberg: Physica-Verlag.
Documentation accompanying the
lms.bcn
,
lms.bcg
,
qtplot.lmscreg
,
deplot.lmscreg
,
cdf.lmscreg
,
bminz
,
alsqreg
.data(bminz)
fit = vgam(BMI ~ s(age, df=4), fam=lms.yjn(zero=c(1,3)),
data=bminz, trace=TRUE)
predict(fit)[1:3,]
fitted(fit)[1:3,]
bminz[1:3,]
# Person 1 is near the lower quartile of BMI amongst people his age
cdf(fit)[1:3]
# Quantile plot
par(bty="l", mar=c(5,4,4,3)+0.1, xpd=TRUE)
qtplot(fit, percentiles=c(5,50,90,99), main="Quantiles",
xlim=c(15,90), las=1, ylab="BMI", lwd=2, lcol=4)
# Density plot
ygrid = seq(15, 43, len=100) # BMI ranges
par(mfrow=c(1,1), lwd=2)
a = deplot(fit, x0=20, y=ygrid, xlab="BMI", col="black",
main="Density functions at Age = 20 (black), 42 (red) and 55 (blue)")
a
a = deplot(fit, x0=42, y=ygrid, add=TRUE, llty=2, col="red")
a = deplot(fit, x0=55, y=ygrid, add=TRUE, llty=4, col="blue", Attach=TRUE)
a@post$deplot # Contains density function values
Run the code above in your browser using DataLab