functional data analysis with the refund package
play

Functional data analysis with the refund package Philip T. Reiss - PowerPoint PPT Presentation

Functional data analysis Splines refund fMRI example References Functional data analysis with the refund package Philip T. Reiss University of Haifa reiss@stat.haifa.ac.il http://works.bepress.com/phil_reiss Psychoco: International


  1. Functional data analysis Splines refund fMRI example References Functional data analysis with the refund package Philip T. Reiss University of Haifa reiss@stat.haifa.ac.il http://works.bepress.com/phil_reiss Psychoco: International Workshop on Psychometric Computing Dortmund, 27 February 2020 1 / 26

  2. Functional data analysis Splines refund fMRI example References Thanks to . . . • Co-authors • Jeff Goldsmith • Fabian Scheipl • Lei Huang • Julia Wrobel • Chongzhi Di • Jonathan Gellar • Jaroslaw Harezlak • Mathew W. McLean • Bruce Swihart • Luo Xiao • Ciprian Crainiceanu • Daniel Reich for providing diffusion tensor imaging data collected at Johns Hopkins University and the Kennedy Krieger Institute • Martin Lindquist for providing functional MRI data • Funding sources including the U.S. National Institutes of Health (National Institute of Mental Health, National Heart, Lung, and Blood Institute, National Institute of Biomedical Imaging and Bioengineering) and the Israel Science Foundation 2 / 26

  3. Functional data analysis Splines refund fMRI example References Outline Functional data analysis Splines refund fMRI example 3 / 26

  4. Functional data analysis Splines refund fMRI example References Functional data analysis • Since the 1990s, a new class of data sets has become common, in which the data for each individual include not just a few measurements, but an entire curve or function . • The term “functional data analysis” (FDA), popularized by Ramsay and Silverman (1997, 2005), refers to methodology for data of this type, which typically extends classical statistical methods (regression, multivariate analysis, etc.) 4 / 26

  5. Functional data analysis Splines refund fMRI example References Example: diffusion tensor imaging (DTI) data • Each curve represents fractional anisotropy (FA), a measure of white-matter integrity derived by DTI, at 93 locations along the corpus callosum. 0.8 Fractional anisotropy pasat 0.6 60 50 40 30 20 10 0 0.4 0 25 50 75 Position along corpus callosum • Color denotes PASAT (cognitive function) score—related to FA? • 142 individuals scanned multiple times—382 observations in total. 5 / 26

  6. Functional data analysis Splines refund fMRI example References 6 / 26

  7. Functional data analysis Splines refund fMRI example References The R package refund * (Reiss et al., 2010; Goldsmith et al., 2019) is a collaborative project implementing methods for 1. functional regression • “scalar-on-function” regression: y ∼ x ( s ) • “function-on-scalar” regression: y ( s ) ∼ x • “function-on-function” regression: y ( s ) ∼ x ( s ) 2. functional principal component analysis * short for REgression with FUNctional Data 7 / 26

  8. Functional data analysis Splines refund fMRI example References Why refund ? The original R package fda (Ramsay et al., 2009) uses penalized splines to fit functional linear models such as • the scalar-on-function regression model � y i = α + x i ( s ) β ( s ) ds + ε i , S i = 1 , . . . , n (e.g., Ramsay and Silverman, 1997; Marx and Eilers, 1999), • and the function-on-scalar (varying-coefficient) regression model y i ( s ) = β 0 ( s ) + x i β 1 ( s ) + ε i ( s ) . Limitations: • restricted to “vanilla” models—without multiple predictors, random effects, extensions to generalized linear models • smoothing parameter selection is laborious refund lifts these restrictions. 8 / 26

  9. Functional data analysis Splines refund fMRI example References Outline Functional data analysis Splines refund fMRI example 9 / 26

  10. Functional data analysis Splines refund fMRI example References • Penalized splines are a popular way to fit the nonparametric regression model y i = f ( x i ) + ε i , E ( ε i ) = 0 where f is some smooth function. • Briefly, the spline approach assumes f to be piecewise polynomial (usually cubic), such that at the “knots” (boundaries) there are a certain number of continuous derivatives (usually 2). • Specifically, we take f to be a linear combination of B -splines, piecewise polynomial functions with compact support: f ( x ) = b ( x ) T β where b ( x ) = [ b 1 ( x ) , . . . , b K ( x )] T , β ∈ R K . 1.0 0.8 0.6 0.4 0.2 0.0 10 / 26 0.0 0.2 0.4 0.6 0.8 1.0

  11. Functional data analysis Splines refund fMRI example References • Given a spline basis, we estimate f ( x ) by penalized least squares, i.e., f ( x ) = b ( x ) T ˆ ˆ β minimizes n � � [ y i − f ( x i )] 2 f ′′ ( x ) 2 dx + λ i = 1 � �� � � �� � roughness functional sum of squared errors over all functions of the form f ( x ) = b ( x ) T β . • Choice of λ is critical: ● ● ● λ large λ small ● ● ● ● ● ● 2.4 ● ● 2.4 ● ● 2.4 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 2.3 ● 2.3 ● 2.3 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 2.2 2.2 2.2 ● ● ● ● ● ● y ● y ● y ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 2.1 ● 2.1 ● 2.1 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 2.0 ● ● ● ● 2.0 ● ● ● ● 2.0 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 1.9 1.9 1.9 ● ● ● 0.0 0.2 0.4 0.6 0.8 0.0 0.2 0.4 0.6 0.8 0.0 0.2 0.4 0.6 0.8 x x x • Coefficient functions β ( s ) in functional regression are also estimated by (more complicated) penalized least squares. • refund implements fast automatic smoothing parameter selection via the mgcv package (Wood, 2011, 2017). 11 / 26

  12. Functional data analysis Splines refund fMRI example References Outline Functional data analysis Splines refund fMRI example 12 / 26

  13. Functional data analysis Splines refund fMRI example References Regression functions in refund Predictors Scalar Functional Scalar pfr Responses Functional fosr, fosr2s, pffr pffr Let’s illustrate with the DTI data . . . 13 / 26

  14. Functional data analysis Splines refund fMRI example References Scalar-on-function regression with random subject effects (intercepts): � P ij = α i + FA ij ( s ) β ( s ) ds + ε ij , S where P is PASAT score and FA ( s ) is fractional anisotropy curve. 14 / 26

  15. Functional data analysis Splines refund fMRI example References A function-on-scalar regression model: FA ij ( s ) = β 0 ( s ) + P ij β 1 ( s ) + ε ij ( s ) . 15 / 26

  16. Functional data analysis Splines refund fMRI example References Functional PCA: 16 / 26

  17. Functional data analysis Splines refund fMRI example References 17 / 26

  18. Functional data analysis Splines refund fMRI example References 18 / 26

  19. Functional data analysis Splines refund fMRI example References (Brockhaus, 2016) 19 / 26

  20. Functional data analysis Splines refund fMRI example References Outline Functional data analysis Splines refund fMRI example 20 / 26

  21. Functional data analysis Splines refund fMRI example References • Lindquist (2012) analyzed functional MRI measures of response to pain in 20 volunteers. • Each volunteer had 39–48 trials consisting of • hot (painful) or warm stimulus applied to left forearm (18 sec) • a fixation cross on a screen (14 sec) • the words “How painful?” appeared on the screen (14 sec) • asked to rate the pain intensity on a scale from 100 to 550. • To study whether BOLD response predicts pain, Reiss et al. (2017) fitted the following scalar-on-function regression model: � y ij = α i + γ I hot + x ij ( t ) β ( t ) dt + ε ij , i = 1 , . . . , n , j = 1 , . . . , J i , ij T in which • y ij is the log pain score for the i th participant’s j th trial; • the α i ’s are iid normally distributed random intercepts; • I hot is an indicator for a hot stimulus; ij • x ij ( t ) is lateral cerebellum BOLD signal over the trial interval T ; • the ε ij ’s are iid normally distributed errors with mean zero. • γ found to be highly significantly positive; but what about β ( t ) ? 21 / 26

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend