GithubHelp home page GithubHelp logo

gps.mgcv's Introduction

gps.mgcv (version 1.0)

General P-Splines for Package 'mgcv'

The package constructs and predicts the general P-splines of Li and Cao (2022) in mgcv by defining a new 'gps' smooth class (see ?gps.smooth). A general P-spline f(x) is specified as s(x, bs = 'gps', ...) in a formula and estimated using mgcv's model fitting functions, namely gam (generalized additive models, or GAMs), bam (GAMs for big data) and gamm (GAMs as mixed-effect models). General P-splines are state-of-the-art penalized B-splines. Unlike the standard P-splines of Eilers and Marx (1996) that only make sense for uniform B-splines on equidistant knots, they are properly defined for non-uniform B-splines on irregularly spaced knots, thanks to their powerful general difference penalty that accounts for uneven knot spacing. The package also contains functions for fitting and benchmarking different penalized B-splines (see ?Fit4BS and ?SimStudy) and a case study of smoothing Bone Mineral Content longitudinal data (see ?BMC).

Installation from CRAN

The package is not on CRAN yet, so you need to install it from this GitHub repository for now.

Installation from GitHub

The package requires R (>= 4.0.0), gps (>= 1.1) and mgcv (>= 1.8-40).

Package mgcv comes with an R distribution, but you may need to update it if your existing version is older than the requirement. You can always install its latest version from CRAN using install.packages("mgcv").

Install both gps and gps.mgcv from GitHub:

## you may need to first install package 'devtools' from CRAN
devtools::install_github("ZheyuanLi/gps")
devtools::install_github("ZheyuanLi/gps.mgcv")

Vignette

R code for Li and Cao (2022) is at: https://github.com/ZheyuanLi/gps-vignettes/blob/main/gps1.pdf

gps.mgcv's People

Contributors

zheyuanli avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.