data.aids: UK aids data

Description Usage Arguments Value Author(s) Source References See Also Examples

View source: R/apc_data_sets.R

Description

Function that organises UK aids data in apc.data.list format.

The data set is taken from table 1 of De Angelis and Gilks (1994). The data are also analysed by Davison and Hinkley (1998, Example 7.4). The data are reporting delays for AIDS counting the number of cases by the date of diagnosis and length of reporting delay, measured by quarter.

The data set is in "trapezoid"-format. The original data set is unbalanced in various ways: first column covers a reporting delay of less than one month (or should it be less than one quarter?); last column covers a reporting delay of at least 14 quarters; last diagonal include incomplete counts. The default data set excludes the incomplete counts in the last diagonal, but includes the unbalanced first and last columns.

Usage

1
data.aids(all.age.groups = FALSE)

Arguments

all.age.groups

logical. If FALSE (default), the last calendar year with incomplete counts is ignored.

Value

The value is a list in apc.data.list format.

response

matrix of cases

data.format

logical equal to "trapezoid".

age1

numeric equal to 0. This is the label for the reporting delay.

per1

NULL. Not needed when data.format="trapezoid"

coh1

numeric equal to 1983.5. This is the label for the diagnosis quarter (1983, third quarter).

unit

numeric equal to 1/4. This is the width of the age and period groups.

per.zero

numeric equal to 0.

per.max

numeric equal to 38.

time.adjust

numric equal to 0.

label

character. Default data has "UK AIDS - clean".

Author(s)

Bent Nielsen <bent.nielsen@nuffield.ox.ac.uk> 7 Feb 2016

Source

Table 1 of De Angelis and Gilks (1994). Also analysed by Davison and Hinkley (1998, Example 7.4).

References

De Angelis, D. and Gilks, W.R. (1994) Estimating acquired immune deficiency syndrome incidence accounting for reporting delay. Journal of the Royal Statistical Sociey A 157, 31-40.

Davison, A.C. and Hinkley, D.V. (1998) Bootstrap methods and their application. Cambridge: Cambridge University Press.

See Also

General description of apc.data.list format.

Examples

 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
#########################
##	It is convient to construct a data variable
data	<- data.Belgian.lung.cancer()
##	To see the content of the data
data

#########################
#	Forecast AIDS incidences by diagonsis year (cohort).
#	uses as poisson response model with an AC structure
#	although there is evidence of overdispersion and the
#	period effect appears significant.
#	The omission of the period effect follows
#	Davison and Hinkley and a parsimoneous model may be
#	advantageous when forecasting.
#
apc.fit.table(data.aids(),"poisson.response")
fit <- apc.fit.model(data.aids(),"poisson.response","AC")
forecast <- apc.forecast.ac(fit)
data.sums.coh <- apc.data.sums(data.aids())$sums.coh
forecast.total <- forecast$response.forecast.coh
forecast.total[,1]	<- forecast.total[,1]+data.sums.coh[25:38]
x	<- seq(1983.5,1992.75,by=1/4)
y	<- data.sums.coh
xlab<- "diagnosis year (cohort)"
ylab<- "diagnoses"
main<- "Davison and Hinkley, Fig 7.6, parametric version"
plot(x,y,xlim=c(1988,1993),ylim=c(200,600),xlab=xlab,ylab=ylab,main=main)
apc.polygon(forecast.total,x.origin=1989.25,unit=1/4)

Example output

$response
      1955-1959 1960-1964 1965-1969 1970-1974
25-29         3         2         7         3
30-34        11        16        11        10
35-39        11        22        24        25
40-44        36        44        42        53
45-49        77        74        68        99
50-54       106       131        99       142
55-59       157       184       189       180
60-64       193       232       262       249
65-69       219       267       323       325
70-74       223       250       308       412
75-79       198       214       253       338

$dose
      1955-1959 1960-1964 1965-1969 1970-1974
25-29 15.789474 15.384615 14.000000 15.789474
30-34 16.666667 16.326531 15.277778 14.084507
35-39 14.102564 16.666667 16.326531 15.243902
40-44 13.483146 13.924051 16.600791 15.680473
45-49 15.909091 13.214286 13.793103 16.363636
50-54 16.060606 15.411765 12.941176 13.408876
55-59 15.154440 15.333333 14.905363 12.552301
60-64 13.075881 14.172266 14.555556 14.147727
65-69 10.667316 11.814159 12.971888 13.357994
70-74  8.498476  9.025271 10.108303 11.153221
75-79  5.915745  6.367153  6.880609  7.736324

$data.format
[1] "AP"

$age1
[1] 25

$per1
[1] 1955

$coh1
[1] 5

$unit
[1] 5

$per.zero
NULL

$per.max
NULL

$time.adjust
[1] 0

$label
NULL

$n.decimal
NULL

       -2logL df.residual prob(>chi_sq) LR.vs.APC df.vs.APC prob(>chi_sq)
APC   490.323         377             0        NA        NA            NA
AP    634.260         413             0   143.937        36             0
AC    716.481         413             0   226.158        36             0
PC   2585.817         390             0  2095.494        13             0
Ad   1042.976         449             0   552.653        72             0
Pd   2783.728         426             0  2293.404        49             0
Cd   2812.744         426             0  2322.420        49             0
A    3817.003         450             0  3326.680        73             0
P   12461.680         427             0 11971.357        50             0
C    8069.458         427             0  7579.135        50             0
t    3191.360         462             0  2701.037        85             0
tA   5966.319         463             0  5475.996        86             0
tP  12641.294         463             0 12150.971        86             0
tC   8393.387         463             0  7903.064        86             0
1   14184.299         464             0 13693.976        87             0
          aic
APC  2036.312
AP   2108.249
AC   2190.470
PC   4105.807
Ad   2444.965
Pd   4231.717
Cd   4260.733
A    5216.992
P   13907.669
C    9515.447
t    4567.350
tA   7340.308
tP  14015.283
tC   9767.376
1   15556.288

apc documentation built on Oct. 23, 2020, 6:17 p.m.