I'm trying to fit centile curves for a censored gamma distribution. The censoring goes well I think, but when trying to make the percentile curves, I get the following result:
I tried the following code to get this:
y <- c(35.00, 100.00, 100.00, 5.00, 40.00, 40.00, 80.00, 50.00, 40.00, 60.00,
45.00, 100.00, 40.00, 15.00, 45.00, 40.00, 72.50, 50.00, 100.00, 35.00,
100.00, 50.00, 60.00, 30.00, 50.00, 56.25, 70.00, 50.00, 75.00, 100.00,
83.00, 100.00, 81.25, 40.00, 50.00, 40.00, 36.00, 40.00, 56.25, 25.00,
100.00, 50.00, 67.00, 100.00, 70.00, 45.00, 50.00, 100.00, 50.00, 50.00,
50.00, 30.00, 50.00, 62.50, 30.00, 55.00, 40.00, 40.00, 25.00, 45.00,
20.00, 40.00, 100.00, 40.00, 50.00, 75.00, 100.00, 50.00, 40.00, 70.00,
35.00, 100.00, 100.00, 80.00, 50.00)
x <- c(44, 58, 57, 67, 52, 41, 49, 41, 33, 42, 47, 61, 68, 57, 58, 42, 53, 57, 57, 49, 58, 42, 55, 34, 55, 52, 61, 66, 57, 53, 50, 48, 69, 66, 60, 65, 56, 47, 52, 36, 62, 63, 50, 61, 56, 46, 35, 65, 48, 65, 58, 65, 64, 58, 53, 63, 58, 54, 64, 40, 65, 50, 61, 57, 61, 48, 64, 56, 62, 56, 50, 66, 65, 64, 64)
ysurv <- Surv(y1, y1!=100, type="right")
gen.cens(GA, type = "right")
g0Cens <- gamlss(ysurv ~ x,
sigma.fo = ~x,
nu.fo = ~ x,
family = GArc)
centiles(g0Cens, x)
Now my question is, how can I prevent the centile curves to go over the bound of 100 since the values are only realistic to be inbetween 0 and 100.
I appreciate all your time and help.