| nonparasccs {SCCS} | R Documentation | 
Spline-based non parametric SCCS method
Description
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.
Usage
nonparasccs(indiv, astart, aend, aevent, adrug, aedrug, kn1=12, kn2=12,
            sp1=NULL, sp2=NULL, data)
Arguments
| indiv | a vector of individual identifiers of cases. | 
| astart | a vector of ages at start of observation periods. | 
| 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 related risk period starts. | 
| aedrug | a vector of ages at which exposure-related risk ends. | 
| kn1 | 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. | 
| kn2 | 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. | 
| sp1 | 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. | 
| sp2 | 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. | 
| data | A data frame containing the input data. | 
Details
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.
Value
Relative incidence estimates along with their 95% confidence intervals.
| estimates | 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. | 
| timesinceexposure | time units since the start 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. (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.
See Also
Examples
# 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)