Description Usage Arguments Examples
View source: R/fix_family_cdf.R
Fix $cdf() slot of a mgcv family.
1 | fix_family_cdf(fam)
|
fam |
an |
1 2 3 4 5 6 7 8 9 10 11 | library(mgcvUtils); library(MASS)
b <- gam(list(accel~s(times,k=20,bs="ad"),~s(times)),
data=mcycle,family=gaulss())
b$family <- fix_family_cdf( b$family )
# Quantile residuals should look uniformly distributed
qres <- b$family$cdf(mcycle$accel, b$fitted.values,
wt = rep(1, nrow(mcycle)), scale = 1)
hist(qres)
# Not too bad
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.