###################################
# function fitted_pdf
# continuous variabe
a1 <- gamlss(y~pb(x),sigma.fo=~pb(x), data=abdom, family=LO)
fitted_pdf(a1, obs=c(10,15,20), from=30, to=100)
# count data
p1 <- gamlss(y~pb(x)+qrt, data=aids, family=NBI)
fitted_pdf(p1, obs=c(10:15), from=25, to=130, alpha=.9)
# binomial type
h<-gamlss(y~ward+loglos+year, sigma.formula=~year+ward, family=BB, data=aep)
fitted_pdf(h, obs=c(10:15), alpha=.9)
###################################
# function predict_pdf
predict_pdf(a1, newdata=abdom[10:20, ], from=30, to=100)
# count data
predict_pdf(p1, newdata=aids[10:15, ], from=30, to=150)
# binomial
predict_pdf(h, newdata=aep[10:15, ], from=0, to=20)
###################################
# function family_pdf
# continuous
family_pdf(from=-5,to=5, mu=0, sigma=c(.5,1,2))
# count data
family_pdf(NBI, to=15, mu=1, sigma=c(.5,1,2), alpha=.9, size.seqment = 3)
# binomial type
family_pdf(BB, to=15, mu=.5, sigma=c(.5,1,2), alpha=.9, , size.seqment = 3)
Run the code above in your browser using DataLab