Coder Social home page Coder Social logo

bonstats / gcreg Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 670 KB

General Constraint Regression Models

License: GNU General Public License v3.0

R 100.00%
polynomial-regression constrained-regression mixed-effects shape-constraints monotonicity r

gcreg's Introduction

gcreg: General Constraint Regression models in R

This package is currently being developed. It's aim is to provide methods for fitting regression models with:

  • Functional and shape constraints, e.g. monotonicity
  • Parameter inequality constraints
  • Joint constraints, e.g. combinations of the above
  • Other constraints that create closed and convex parameter spaces

The paper accompanying this package is available here.

The current focus of development is on monotonicity in polynomial fixed and mixed effects models but will be extended over time to more general models and constraints.

To get started, install this package from GitHub using the devtools package:

devtools::install_github("bonStats/gcreg")
library(gcreg)

To install with vignettes you will need to install some required packages and set build_vignettes = T:

install.packages(c("rmarkdown","ggplot2","fda"))
devtools::install_github("bonStats/gcreg", build_vignettes = T)
library(gcreg)

You can start fitting constrained polynomial models with the gcreg::cpm() function. For example

library(fda)
data(onechild)
cpm(height~day, data = onechild, degree = 5, constraint = "monotone", c_region = c(1,312))

See the package vignettes for more examples:

gcreg's People

Contributors

bonstats avatar

Watchers

 avatar

gcreg's Issues

Easily obtain information criteria

Be able to easily obtain information criteria/measures of model fit from the fitted model and through similar processes (fitted_model$aic) as in other R packages

Vignettes not available as pdf

Need pdfs for package to be available without installation. Better instructions needed to install vignettes on local machine.

install.packages(c("rmarkdown","ggplot2","fda"))
devtools::install_github("bonStats/gcreg", build_vignettes = T)

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.