smoothagesccs: Spline-based semiparametric SCCS, smooth age

smoothagesccsR Documentation

Spline-based semiparametric SCCS, smooth age

Description

Fits a semiparametric SCCS model with smooth age effect, where the age related relative incidence function is represented by spline function; that is, linear combinations of M-splines. The exposure related relative incidence function is represented by step functions. One exposure group can be included.

Usage

smoothagesccs(indiv, astart, aend, aevent, adrug, aedrug, expogrp = 0,
              washout = NULL, kn=12, sp = NULL, data)

Arguments

indiv

a vector of individual identifiers of cases.

astart

a vector of ages at which observation periods start.

aend

a vector of ages at end of observation periods.

aevent

a vector of ages at event, an individual can experience multiple events.

adrug

a vector of ages at which exposure starts, only a single exposure type can be included.

aedrug

a vector of ages at which the exposure-related risk periods end.

expogrp

a vector of days to the start of exposure-related risk, counted from adrug. E.g if the risk period is [adrug+c,aedrug], use expogrp = c. To define multiple risk windows, expogrp is a vector of days on start of risk periods counted from adrug. The DEFAULT is zero where the exposure-related risk periods are [adrug, aedrug].

washout

a vector of days to start of washout periods counted from aedrug. The default is NULL, no washout periods.

kn

an integer >=5 representing the number of interior knots used to define the M-spline basis functions which are related to the age specific relative incidence function, usually between 8 and 12 knots is sufficient. It defaults to 12 knots.

sp

smoothing parameter value. It defaults to "auto" where the smoothing paramter is obtained automatically using a cross-validation method. The value of "sp" must be a number greater or equal to 0.

data

a data frame containing the input data. The data are assembled one line per event.

Details

The standard SCCS represents the age and exposure effects by piecewise constant step functions, however mis-specification of age group cut points might lead to biased estimates of the exposure related relative incidences. The semiparametric SCCS model, semisccs, has numerical challenges when the number of cases is large. This splined-based semiparametric SCCS model with smooth age effect avoids these limitations of the standard and semiparametric SCCS models. The smoothing parameter for the age-related relative incidence function is chosen by an approximate cross-validation method. The method is outlined in Ghebremichael-Weldeselassie et al (2014).

Value

Relative incidence estimates along with their 95% confidence limits.

coef

log of the exposure related relative incidence estimates.

se

standard errors of the log of exposure related relative incidence estimates.

age

age related relative incidences at each day between the minimum age at start of observation and maximum age at end of observation periods.

ageaxis

sequence of ages between the minimum age at start of observations and maximum age at end of observation periods corresponding to the age related relative incidences.

smoothingpara

smoothing parameter chosen by maximizing an approximate cross-validation score or given as an argument in the function

cv

cross-validation score

Author(s)

Yonas Ghebremichael-Weldeselassie, Heather Whitaker, Paddy Farrington.

References

Ghebremichael-Weldeselassie, Y., Whitaker, H. J., Farrington, C. P. (2015). Self-controlled case series method with smooth age effect. Statistics in Medicine, 33(4), 639-649.

Farrington, P., Whitaker, H., and Ghebremichael-Weldeselassie, Y. (2018). Self-controlled Case Series Studies: A modelling Guide with R. Boca Raton: Chapman & Hall/CRC Press.

See Also

smoothexposccs

Examples


# Fit the SCCS model with smooth age effect to the itp data and plot age effect.  

itp.mod <- smoothagesccs(indiv=case, astart=sta,aend=end, aevent=itp,
                           adrug=mmr, aedrug=mmr+42, expogrp=c(0,15,29), sp=2800,
                           data=itpdat)

itp.mod

plot(itp.mod)


SCCS documentation built on July 5, 2022, 5:05 p.m.