deplot.lmscreg(object, newdata = NULL, x0, y.arg, plot.it = TRUE, ...)
FALSE
no plot will
be done.plotdeplot.lmscreg
.object
but with a list
placed in the slot post
, called
@post$deplot
. The list has componentsnewdata
above, or a one-row
data frame constructed out of the x0
argument.y.arg
above.y.arg
.deplot.lms.yjn
in order to compute
the density function.plotdeplot.lmscreg
,
qtplot.lmscreg
,
lms.bcn
,
lms.bcg
,
lms.yjn
.fit <- vgam(BMI ~ s(age, df = c(4, 2)), fam = lms.bcn(zero = 1), data = bmi.nz)
ygrid <- seq(15, 43, by = 0.25)
deplot(fit, x0 = 20, y = ygrid, xlab = "BMI", col = "green", llwd = 2,
main = "BMI distribution at ages 20 (green), 40 (blue), 60 (red)")
deplot(fit, x0 = 40, y = ygrid, add = TRUE, col = "blue", llwd = 2)
deplot(fit, x0 = 60, y = ygrid, add = TRUE, col = "red", llwd = 2) -> a
names(a@post$deplot)
a@post$deplot$newdata
head(a@post$deplot$y)
head(a@post$deplot$density)
Run the code above in your browser using DataLab