BAPCList-class: Class '"APCList"'

APCListR Documentation

Class "APCList"

Description

This S4 class captures incidence or mortality data togehter with the corresponding person-years and a gridfactor, indicating how much wider the agegroup intervals are compared to the period interval length.

Constructor

Creates a APCList object:

APCList(epi, pyrs, gf, agelab=character(), periodlab=character(), cohortlab=character())

epi

A data.frame object of disease or mortality counts. The number of rows are equal to the number of periods and the number of columns equal to the number of age groups. Data cells to be projected should be set to NA.

pyrs

A data.frame object of person years of population estimates. This data frame needs to have the same dimension as epi. Thus, the number of rows are equal to the number of periods and the number of columns equal to the number of age groups. Caution: Person years estimates for data cells that are to be projected must still be provided.

gf

A grid factor indicating how much wider the agegroup intervals are compared to the period interval length. For example if periods are given annualy but age-groups are given for 5-year groups, the grid factor is equal to five.

agelab

A character vector with age group labels.

periodlab

A character vector with period labels.

cohortlab

A character vector with cohort labels.

ageindex

An integer index vector for age groups (derived internally).

periodindex

An integer index vector for periods (derived internally).

cohortindex

An integer index vector for cohort (derived internally).

overdisindex

An integer index vector for the overdispersion (derived internally).

stdweight

Vector of length I giving one weight for each age group to compute age-standardized projections.

stdobs

Vector of length I containing age-standardized observations.

npred

Number of periods that were predicted.

agespec.rate

A list of length I, one for each age group. Each list element contains a matrix of dimension J * 4, where J denotes the number of periods. The columns present the 2.5% CI, the mean of the rate, the 97.5% CI and the standard deviation of the rate.

agespec.proj

A list of length I, one for each age group. Each list element contains a matrix of dimension J * 4, where J denotes the number of periods. The columns present the 2.5% CI, the mean of the predictive distribution, the 97.5% CI and the standard deviation of the predictive distribution.

agestd.rate

A matrix of dimension J * 4 containing 2.5% CI, mean and the 97.5% CI and the standard deviation of age standardized rates for all J periods.

agestd.proj

A matrix of dimension J * 4 containing 2.5% CI, mean and the 97.5% CI and the standard deviation of age standardized projections for all J periods.

inlares

A list containing the INLA results object.

Methods

x[i,j]

signature(x = "APCList"): Creates a APCList object, keeping only the i periods and j age groups.

nage

signature(object = "APCList"): get the number of agegroups.

nperiod

signature(object = "APCList"): get the number of periods.

ncohort

signature(object = "APCList"): get the number of cohorts.

gridfactor

signature(object = "APCList"): get the gridfactor.

epi

signature(object = "APCList"): get the disease/mortality counts.

pyrs

signature(object = "APCList"): get the person years.

ageindex

signature(x = "APCList"): get the ageindex used in INLA formula

periodindex

signature(x = "APCList"): get the periodindex used in the INLA formula

cohortindex

signature(x = "APCList"): get the cohortindex used in the INLA formula

agelabels

signature(x = "APCList"): get the agelabels

periodlabels

signature(x = "APCList"): get the periodlabels

cohortlabels

signature(x = "APCList"): get the cohortlabels

agespec.rate

signature(x = "APCList"): get the agespec.rate slot

agespec.proj

signature(x = "APCList"): get the agespec.proj slot

agestd.rate

signature(x = "APCList"): get the agestd.rate slot

agestd.proj

signature(x = "APCList"): get the agestd.proj slot

inlares

signature(x = "APCList"): get the inlares slot

periodindex<-

signature(x = "APCList"): replace the periodindex slot used in the INLA formula. Caution: Changing this index you should know what you do, otherwise it will result in errors.

cohortindex<-

signature(x = "APCList"): replace the cohortindex slot used in the INLA formula. Caution: Changing this index you should know what you do, otherwise it will result in errors.

overdisindex<-

signature(x = "APCList"): replace the overdisindex slot used in the INLA formula. Caution: Changing this index you should know what you do, otherwise it will result in errors.

agelabels<-

signature(x = "APCList"): replace the agelabels slot

periodlabels<-

signature(x = "APCList"): replace the periodlabels slot

cohortlabels<-

signature(x = "APCList"): replace the cohortlabels slot

agespec.rate<-

signature(x = "APCList"): replace the agespec.rate slot

agespec.proj<-

signature(x = "APCList"): replace the agespec.proj slot

agestd.rate<-

signature(x = "APCList"): replace the agestd.rate slot

agestd.proj<-

signature(x = "APCList"): replace the agestd.proj slot

inlares<-

signature(x = "APCList"): replace the inlares slot

Author(s)

Andrea Riebler

Examples

   data(FemLCSweden)
   data(FemPYSweden)

   lc_sweden <- APCList(FemLCSweden, FemPYSweden, gf=5)
   lc_sweden

BAPC documentation built on March 23, 2022, 3 p.m.

Related to BAPCList-class in BAPC...