smoothexposccs: Spline-based semiparametric SCCS, smooth exposure

View source: R/smoothexposccs.R

smoothexposccsR Documentation

Spline-based semiparametric SCCS, smooth exposure

Description

Fits a spline-based SCCS model where the exposure-related relative incidence function is represented by a spline function, that is a linear combination of M-splines, and the age effects are represented by a piecewise constant function.

Usage

smoothexposccs(indiv, astart, aend, aevent, adrug, aedrug, agegrp, kn=12, 
               sp = NULL, data)

Arguments

indiv

a vector of individual identifiers of cases.

astart

a vector of ages at which the observation periods start.

aend

a vector of ages at end of observation periods.

aevent

a vector of ages at event (outcome of interest), an individual can experience multiple events.

adrug

a vector of ages at which exposure related risk period starts.

aedrug

a vector of ages at which exposure related risk period ends.

agegrp

a vector of cut points for the age groups where each value represents the start of an age catagory. The first element in the vector is the start of the second age group. The first age group starts at the minimum of astart, the start of the observation period.

kn

number of interior knots >=5 used to define the M-spline basis functions, usually between 8 and 12 knots is sufficient. The default is 12.

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.

Details

The standardsccs, semisccs and smoothagesccs use piecewise constant step functions to model the exposure effect. However mis-specification of exposure group cut points might result in biased estimates. This method represents exposure related relative incidence function by a spline function.

Value

Relative incidence estimates along with their 95% confidence limits. Varaince-covariance matrix can also be obtained.

estimates

exposure related relative incidence estimates at each point of time since start of exposure until the maximum duration of exposure.

lci

lower confidence limits of the exposure-related relative incidence estimates.

uci

upper confidence limits of the exposure-related relative incidence estimates.

Author(s)

Yonas Ghebremichael-Weldeselassie, Heather Whitaker, Paddy Farrington.

References

Ghebremichael-Weldeselassie, Y., Whitaker, H. J., Farrington, C. P. (2015). Flexible modelling of vaccine effects in self-controlled case series models 25, 1768–1797.

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

smoothagesccs, nonparasccs

Examples


library(SCCS)

# Fit smooth exposure SCCS to MMR vaccine and itp 

 itp.mod1 <- smoothexposccs(sp=10, indiv=case, astart=sta, aend=end,
                           aevent=itp, adrug=mmr, aedrug=mmr+42,
                           agegrp=c(427, 488, 549, 610, 671), data=itpdat)
 
 itp.mod1
 
 plot(itp.mod1)
 

SCCS documentation built on May 29, 2024, 11:55 a.m.