Skip to content

dipterix/spfda

Repository files navigation

R Package "spfda" - Sparse function-on-scalar regression

CRAN-version license-MIT R-check DOI-spfda

This package implements paper "Functional Group Bridge for Simultaneous Regression and Support Estimation"

[Preprint] [Github] [CRAN] [Examples]

Demo example

Installation

You can install the released version of spfda CRAN-version from CRAN with:

install.packages("spfda")

The experimental version can be installed via

# install.packages("remotes")
remotes::install_github("dipterix/spfda")

Example

library(spfda)
dat <- spfda_simulate()
x <- dat$X
y <- dat$Y

## basic example code

fit <- spfda(y, x, lambda = 5, CI = TRUE)

## Generics

BIC(fit)
plot(fit, col = c("orange", "dodgerblue3", "darkgreen"),
     main = "Fitted with 95% CI", aty = c(0, 0.5, 1), atx = c(0,0.2,0.8,1))
matpoints(fit$time, t(dat$env$beta), type = 'l', col = 'black', lty = 2)
legend('topleft', c("Fitted", "Underlying"), lty = c(1,2), bty = 'n')
print(fit)
coefficients(fit)

Citation

Use citation('spfda') to generate citation information, or check this link.

Zhengjia Wang, John Magnotti, Michael S. Beauchamp, Meng Li, 
  Functional Group Bridge for Simultaneous Regression and Support Estimation, 
  Biometrics, Volume 79, Issue 2, June 2023, Pages 1226–1238, 
  https://doi.org/10.1111/biom.13684

About

Functional Group Bridge for Simultaneous Regression and Support Estimation (https://arxiv.org/abs/2006.10163)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages