anlz_prdmatrix {wqtrends}R Documentation

Get prediction matrix for a fitted GAM

Description

Get prediction matrix for a fitted GAM

Usage

anlz_prdmatrix(mod, doystr = 1, doyend = 364, avemat = FALSE)

Arguments

mod

input model object as returned by anlz_gam

doystr

numeric indicating start Julian day for extracting averages

doyend

numeric indicating ending Julian day for extracting averages

avemat

logical indicating if the prediction matrix is to be passed to anlz_metseason (default) or anlz_avgseason

Details

Used internally by anlz_metseason, not to be used by itself

Value

a data.frame with predictors to use with the fitted GAM

Examples

library(dplyr)

# data to model
tomod <- rawdat %>%
  filter(station %in% 34) %>%
  filter(param %in% 'chl') %>% 
  filter(yr > 2015)
  
mod <- anlz_gam(tomod, trans = 'log10')
anlz_prdmatrix(mod, doystr = 90, doyend = 180)

[Package wqtrends version 1.4.2 Index]