File: uspop2.Rd

package info (click to toggle)
survival 2.37-7-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 6,684 kB
  • ctags: 364
  • sloc: asm: 6,453; ansic: 4,857; makefile: 2
file content (30 lines) | stat: -rw-r--r-- 1,067 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
\name{uspop2}
\alias{uspop2}
\docType{data}
\title{Projected US Population}
\description{US population by age and sex, for 2000 through 2020}
\usage{data(uspop2)}
\format{
  The data is a matrix with dimensions age, sex, and calendar year.
  Age goes from 0 through 100, where the value for age 100 is the total
  for all ages of 100 or greater.
}
\details{ This data is often used as a "standardized" population for
  epidemiolgy studies.}

\source{
NP2008_D1:  Projected Population by Single Year of Age, Sex, Race, and Hispanic 
Origin for the United States: July 1, 2000 to July 1, 2050,
www.census.gov/population/projections.
}
\examples{
us50 <- uspop2[51:101,, "2000"]  #US 2000 population, 50 and over
age <- as.integer(dimnames(us50)[[1]])
smat <- model.matrix( ~ factor(floor(age/5)) -1)
ustot <- t(smat) \%*\% us50  #totals by 5 year age groups
temp <- c(50,55, 60, 65, 70, 75, 80, 85, 90, 95)
dimnames(ustot) <- list(c(paste(temp, temp+4, sep="-"), "100+"),
                         c("male", "female"))
}
\seealso{\code{\link{uspop}}}
\keyword{datasets}