Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

shine.qqGam

Shiny QQ-plots for GAMs


Description

This function takes the output of qq.gamViz and transforms it into an interactive shiny app.

Usage

## S3 method for class 'qqGam'
shine(o, ...)

Arguments

o

the output of qq.gamViz.

...

currently not used.

Details

In RStudio, this function returns a call to qq.gamViz that reproduces the last plot rendered in the interactive shiny window.

Examples

## Not run: 

## simulate binomial data...
library(mgcv)
library(mgcViz)
set.seed(0)
n.samp <- 400
dat <- gamSim(1,n = n.samp, dist = "binary", scale = .33)
p <- binomial()$linkinv(dat$f) ## binomial p
n <- sample(c(1, 3), n.samp, replace = TRUE) ## binomial n
dat$y <- rbinom(n, n, p)
dat$n <- n
lr.fit <- gam(y/n ~ s(x0) + s(x1) + s(x2) + s(x3)
              , family = binomial, data = dat,
              weights = n, method = "REML")
lr.fit <- getViz(lr.fit)
# launch shiny gagdet
shine(qq(lr.fit))
 

## End(Not run)

mgcViz

Visualisations for Generalized Additive Models

v0.1.6
GPL-3
Authors
Matteo Fasiolo [aut, cre], Raphael Nedellec [aut], Yannig Goude [ctb], Christian Capezza [ctb], Simon N. Wood [ctb]
Initial release
2020-03-04

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.