Description Usage Arguments Examples
View source: R/fix_family_qf.R
Fix $qf() slot of a mgcv family.
1 | fix_family_qf(fam)
|
fam |
an |
1 2 3 4 5 6 7 8 9 10 11 12 13 | library(mgcvUtils); library(MASS)
b <- gam(list(accel~s(times,k=20,bs="ad"),~s(times)),
data=mcycle,family=gaulss())
b$family <- fix_family_qf( b$family )
qfit <- sapply(c(0.1, 0.5, 0.9),
function(.q)
b$family$qf(.q, b$fitted.values))
plot(mcycle, ylim = c(-150, 100))
for(ii in 1:ncol(qfit)){
lines(mcycle$times, qfit[ , ii], col = 2)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.