Description Usage Format Details Source

Data for Time Series Examples

The data are age-adjusted (2000 U.S. standard) female lung cancer mortality rates (per 100,000 population) for each year from 1996 to 2010.

1 |

This dataset is an array with dimensions of 51, 15, 4. The rownames of the array are the 51 state and DC abbreviations (2 characters). TSdata[,,1:4] contains the x (time) value, followed by the value for the line, then the lower 95% confidence limit, and finally the upper 95% confidence limit value.

The first dimension [`st`,,] of 51 elements contains each state or DC.
This dimension is referenced by the rownames of the array.

The second dimension [,`t`,] of `n` elements in this case are the time periods
in the time series. Our example uses the years 1996 to 2010 as the
time period values. A reasonable number of points is between 200 and 300.

The third dimension [,,`v`] of 2 or 4 elements is the x or y values during the time period.
If the no confidence data is provided, the third dimension is 2:

data[,,

`1`] is the X valuedata[,,

`2`] is the mid-Y value (Y)

If a confidence band is being plotted in \var{tsconf} graphs then there are 4 elements.

data[,,

`1`] is the X valuedata[,,

`2`] is the mid-Y value (Y)data[,,

`3`] is the low-Y valuedata[..

`4`] is the high-Y value

For example, the x,y coordinates for year=1996 (time period = 1) for the first
state (`AK`) is TSdata[`1`,`1`,c(1,2)].

This approach was done to allow a data matrix built for the "tsconf" glyphics
to be used for a `ts` glyphics.

This data is used by micromapSEER with the "USStatesDF" border group.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ```
# how to create a new time series data set
tempTS <-read.table("...yourfilename.csv",sep=",",header=T)
yrmat <-matrix(rep(1996:2010,51),nrow=51,ncol=15,byrow=T) # year labels
ratemat<-as.matrix(
tempTS[,c(8,13,18,23,28,33,38,43,48,53,58,63,68,73,78)]
)
locimat<-as.matrix(
tempTS[,c(9,14,19,24,29,34,39,44,49,54,59,64,69,74,79)]
)
hicimat<-as.matrix(
tempTS[,c(10,15,20,25,30,35,40,45,50,55,60,65,70,75,80)]
)
workmat<-cbind(yrmat,ratemat,locimat,hicimat)
TSdata <-NULL
TSdata <-array(workmat,dim=c(51,15,4))
# change state ab from factors to characters.
rownames(TSdata)<-as.character(tempTS$stab)
``` |

Surveillance, Epidemiology, and End Results (SEER) Program (www.seer.cancer.gov) SEER*Stat Database: Mortality - All COD, Aggregated With State, Total U.S. (1969-2010) (Katrina/Rita Population Adjustment), National Cancer Institute, DCCPS, Surveillance Research Program, Surveillance Systems Branch, released April 2013. Underlying mortality data provided by NCHS (www.cdc.gov/nchs).

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.