# NOT RUN {
library(gamlss)
data(rent)
m1 <- gamlss(R~pb(Fl)+pb(A)+B+loc, data=rent, family=GA)
FF<-getQuantile(m1, quantile=0.9, term="A", plot=TRUE)
FF(1960)
FF(1060, deriv=1)
FF(1060, deriv=2)
# }
# NOT RUN {
# plotting partial quantile
# .05, 0.25, 0.5, 0.75, 0.95
# at the default values
# Fl = median(Fl), B=0, and loc=2
plot(R~A, data=rent, col="lightgray", pch=20)
for (i in c(.05, 0.25, 0.5, 0.75, 0.95))
{
Qua <- getQuantile(m1, quantile=i,term="A")
curve(Qua, 1900, 1985, lwd=1, lty=1, add=T)
}
# plotting at values Fl=60, B=1, and loc=1.
for (i in c(.05, 0.25, 0.5, 0.75, 0.95))
{
Qua <- getQuantile(m1, quantile=i,term="A",
fixed.at=list(Fl=60, B=1, loc=1))
curve(Qua, 1900, 1985, lwd=1, lty=2, col="red", add=T)
}
# plotting at Fl=60, B=1 and loc=1.
for (i in c(.05, 0.25, 0.5, 0.75, 0.95))
{
Qua <- getQuantile(m1, quantile=i,term="A",
fixed.at=list(Fl=120, B=0, loc=3))
curve(Qua, 1900, 1985, lwd=1, lty=3, col="blue", add=T)
}
# }
Run the code above in your browser using DataLab