shine.qqGam: Shiny QQ-plots for GAMs

View source: R/shine.qqGam.R

shine.qqGamR Documentation

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 documentation built on Oct. 6, 2023, 5:09 p.m.

Related to shine.qqGam in mgcViz...