Skip to content

cmansch/SCM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 

Repository files navigation

Companion to Functional Regression with Intensively Measured Longitudinal Outcomes: A New Lens through Data Partitioning

This contains both general code to implement the method in a sequential method and code to mimic the simulations included in the original paper. Functions require data to have labels following the below mapping:

Input Label
Response Y
X corresponding to &beta(t) x1,...,xq
Z corresponding to &eta z1,...,zp
Time time
Id

Sourcing of files assumes that the working directory is the main folder.


File structure

  • Rsource all code to fit method described in paper
    • combine.R computes matrices and vectors for the one-step estimator using output from distribute.R
    • distribute.R implements QIF on data by block
    • functions.R includes functions related to making the design matrix for basis functions and derivatives of basius functions
    • gcv.R wraps combine and distribute functions with implementation of generalized cross validation statistic
    • matrix_inverse.cpp allows implementation of matrix inverse in C++ rather than R
    • qif.cpp implementation of quadratic inference functions to return necessary summary statistics for combine step
  • Examples code to implement and run examples similar those included in the paper
    • nhanes contains two scripts to convert data from Leroux's package to usable format for SCM estimator, and implementation of SCM estimator
    • Rsource_pqif _our implementation of penalized quadratic inference functions following the method of Qu and Li (2006)
      • gcvpqif.R wraps the penalized quadratic influence function code to estimate lambda
      • pqif.cpp our implementation in C++ of the penalized quadratic influence functions
    • datasets.R used to generate data sets as found in paper
    • psim1.R run a single iteration of the broken stick simulation
    • psim2_single_onebeta.R run a single iteration of the second simulation with known gammas
    • psim3_single.R run a single iteration of the third simulation with known functional form
    • psimPoissonSingle.R run a single iteration of the simulation with Poisson link function

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published