Learn R Programming

wqtrends (version 1.5.1)

anlz_prdmatrix: 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)

Value

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

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

Examples

Run this code
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)

Run the code above in your browser using DataLab