fitted.ppgam | R Documentation |
Extract Model Fitted Values
## S3 method for class 'ppgam'
fitted(object, ...)
object |
a fitted |
... |
not used |
Fitted values extracted from the object ‘object’.
# Times of landfalling US hurricanes
data(USlandfall)
# convert dates to years, as a continuous variable
year <- as.integer(format(USlandfall$date, "%Y"))
day <- as.integer(format(USlandfall$date, "%j"))
USlandfall$year <- year + pmin(day / 365, 1)
hits <- subset(USlandfall, landfall == 1)
m1 <- ppgam( ~ s(year), hits)
fitted(m1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.