\chapter{Frequency Models} \label{chap:frequencymodels} \SweaveOpts{keep.source=TRUE, pdf=FALSE, prefix.string=Chap07, grdevice=tikz.Swd} <>= options(digits=3, show.signif.stars=FALSE, width=53) rm(list=ls()) require(tikzDevice) source("../SweaveTikZ.R") @ %data files: read.table("US.txt", T); load("annual.RData"); read.csv("bi.csv", T) %packages: xtable, pscl, plotmo, earth, ggplot2, reshape %source code: NONE %third party: source("roc.R") \begin{quote} ``Statistics is the grammar of science.'' \end{quote} \indent---Karl Pearson\\ Here in Part II of the book we focus on statistical models for understanding and predicting hurricane climate. This chapter shows you how to model hurricane occurrence. This is done using the annual count of hurricanes making landfall in the United States. We also consider the occurrence of hurricanes across the basin and by origin. We begin with exploratory analysis and then show you how to model counts with Poisson regression. Issues of model fit, interpretation, and prediction are considered in turn. The topic of how to assess forecast skill is also examined including how to perform cross validation. Alternatives to the Poisson regression model are considered. Logistic regession and receiver operating characteristics are also covered. \section{Counts} The data set {\it US.txt} contains a list of tropical cyclone counts by year (see Chapter~\ref{chap:Rtutorial}). The counts indicate the number of hurricanes hitting in the United States (excluding Hawaii). Input the data, save them as a data frame object, and print out the first six lines by typing <>= H = read.table("US.txt", header=TRUE) head(H) @ The columns include year {\tt Year}, number of U.S. hurricanes {\tt All}, number of major U.S. hurricanes {\tt MUS}, number of U.S. Gulf coast hurricanes {\tt G}, number of Florida hurricanes {\tt FL}, and number of East coast hurricanes {\tt E}. To make subsequent analyses easier save the number of years in the record as \verb@n@ and the average number hurricanes per year as \verb@rate@. <>= n = length(H$Year); rate = mean(H$All) n; rate @ The average number of U.S. hurricanes is \Sexpr{round(rate,digits=2)} per year over these \Sexpr{n} years. Good practice requires you to show your data. This gives readers a way to examine the modeling assumptions you make. Here you plot the time series and distribution of the annual counts. Together the two plots provide a nice summary of the information in your data relevant to any modeling effort. <