Fits a spline-based non parametric SCCS model where both the exposure related relative incidence and age related relative incidence functions are represented by spline functions; that is, linear combinations of M-splines.
nonparasccs(indiv, astart, aend, aevent, adrug, aedrug, kn1=12, kn2=12,
sp1=NULL, sp2=NULL, data)
Relative incidence estimates along with their 95% confidence intervals.
exposure related relative incidence estimates at each point of time since start of exposure until the maximum difference between the start and end of exposure.
time units since the start of exposure.
lower confidence limits of the exposure related relative incidence estimates.
upper confidence limits of the exposure related relative incidence estimates.
a vector of individual identifiers of cases.
a vector of ages at start of observation periods.
a vector of ages at end of observation periods.
a vector of ages at event, an individual can experience multiple events.
a vector of ages at which exposure related risk period starts.
a vector of ages at which exposure-related risk ends.
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.
a an integer >= 5 representing the number of interior knots used to define the M-spline basis functions which are related to the exposure specific relative incidence function, usually between 8 and 12 knots is sufficient. The default value is 12.
smoothing parameter value for age related relative incidence function. It defaults to "NULL" where the smoothing parameter is obtained automatically using an approximate cross-validation method. The value of "sp1" must be a number greater or equal to 0.
smoothing parameter value for exposure related relative incidence function. It defaults to "NULL" where the smoothing paramter is obtained automatically using an approximate cross-validation method. The value of "sp1" must be a number greater or equal to 0.
A data frame containing the input data.
Yonas Ghebremichael-Weldeselassie, Heather Whitaker, Paddy Farrington.
The smoothing parameters for the age and exposure related relative incidence functions are chosen using a cross-validation method. To visualize the exposure-related relative incidence function, use the plot function.
Ghebremichael-Weldeselassie, Y., Whitaker, H. J., Farrington, C. P. (2016). Flexible modelling of vaccine effects in self-controlled case series models. Biometrical Journal, 58(3):607-622.
Ghebremichael-Weldeselassie, Y., Whitaker, H. J., Farrington, C. P. (2017). Spline-based self controlled case series method. Statistics in Medicine 33: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.
smoothagesccs
, smoothexposccs
# ITP and MMR data
itp.mod <- nonparasccs(indiv=case, astart=sta, aend=end,
aevent=itp, adrug=mmr, aedrug=mmr+42, sp1=28000, sp2=1200,
data=itpdat)
itp.mod
# Plot the exposure and age related relative incidence functions
plot(itp.mod)
Run the code above in your browser using DataLab