https://github.com/dipterix/spfda
Functional Group Bridge for Simultaneous Regression and Support Estimation (https://arxiv.org/abs/2006.10163)
https://github.com/dipterix/spfda
function-on-scalar-regression regularization-methods sparse
Last synced: 11 months ago
JSON representation
Functional Group Bridge for Simultaneous Regression and Support Estimation (https://arxiv.org/abs/2006.10163)
- Host: GitHub
- URL: https://github.com/dipterix/spfda
- Owner: dipterix
- License: other
- Created: 2018-07-25T15:05:08.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-03-21T15:00:49.000Z (almost 4 years ago)
- Last Synced: 2025-03-07T00:28:53.426Z (11 months ago)
- Topics: function-on-scalar-regression, regularization-methods, sparse
- Language: R
- Homepage:
- Size: 1.9 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# R Package "spfda" - Sparse function-on-scalar regression
[](https://CRAN.R-project.org/package=spfda)
[](https://github.com/dipterix/spfda/blob/master/LICENSE)
[](https://github.com/dipterix/spfda/actions)
> This package implements paper "Functional Group Bridge for Simultaneous Regression and Support Estimation"
[[PDF](https://arxiv.org/abs/2006.10163)] [[Github](https://github.com/dipterix/spfda)] [[CRAN](https://cran.r-project.org/package=spfda)] [[Examples](https://doi.org/10.5281/zenodo.6363319)]

## Installation
You can install the **released** version of `spfda`  from [CRAN](https://CRAN.R-project.org/package=spfda) with:
``` r
install.packages("spfda")
```
The **experimental** version can be installed via
``` r
# install.packages("remotes")
remotes::install_github("dipterix/spfda")
```
## Example
``` r
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](https://arxiv.org/abs/2006.10163).
```
Wang, Z, Magnotti, JF, Beauchamp, MS. Li, M, Functional Group Bridge for
Simultaneous Regression and Support Estimation.
```