MyNixOS website logo
Description

Control Polygon Reduction.

Implementation of the Control Polygon Reduction and Control Net Reduction methods for finding parsimonious B-spline regression models.

cpr: Control Polygon Reduction

Project Status: Active – The project has reached a stable, usable state and is being actively developed. R-CMD-check Coverage Status CRAN_Status_Badge CRAN RStudio mirror downloads

An R package for implementing the Control Polygon Reduction model selection method. When we are tasked with modeling the functional relationship between a response and a continuous predictor, i.e., y = f(x), CPR allows for quick and efficient searching of a large model space to find B-spline estimates of the function f(x).

CPR extends to multiple dimensions and allows one to find good locations for knots in a tensor product of B-splines.

Learn More About CPR.

This model selection method was developed as part of Peter DeWitt's PhD dissertation work. It has been extended since.

Vignettes

There are two vignettes within the package

vignettes(topic = 'cpr', package = 'cpr')
vignettes(topic = 'cnr', package = 'cpr')

You can also read these on package website

Related Publications:

  • The CPR method was presented at the 28th International Biometric Conference held July 2016, in Victoria, British Columbia, Canada. The abstract, paper, and talk had the title: "Parsimonious B-splines Regression Models via Control Polygon Reduction." A bibtex entry for the abstract:
@inproceedings{,
  author       = {DeWitt, Peter E. and Carlson, Nichole E. and Samantha MaWhinney},
  title        = {Parsimonious B-spline Regression Models via Control Polygon Reduction},
  booktitle    = {Abstracts for the XXVIIIth International Biometric Conference},
  month        = {July},
  year         = {2016},
  organization = {International Biometric Society},
  address      = {Victoria, British Columbia},
  isbn         = {978-0-9821919-4-1}
}

Awards: The presentation of the work earned Peter DeWitt two awards:

  1. "Best Student Oral Presentation" from the International Biometric Society (IBS).
  2. "Distinguished Oral Presentation" as part of the student paper competition hosted by the Western North American Region (WNAR) of the IBS.

Installing CPR

Released Version

Install from the Comprehensive R Archive Network (CRAN)

# within R
install.packages("cpr", repos = "https://cran.rstudio.com")

Developmental Version

If you are working on a Windows machine you will need to have Rtools installed.

From github

This will require you to have remotes package installed.

# Just the package without the manual and without vignettes
remotes::install_github(repo = "dewittpe/cpr")

# Install with vignettes
remotes::install_github(
    repo = "dewittpe/cpr"
  , dependbuild_vignettes = TRUE
  , dependencies = TRUE
)

From a cloned repository

You'll need to have the R package devtools installed on your machine.

To check R dependencies before building, or after you get errors due to missing R packages run:

devtools::install_dev_deps()

To build the R package and install the dev version on you machine:

make install

Alternatively, you should be able to build and install without make

R CMD build <path to cloned repo>
R CMD INSTALL cpr_<version>.tar.gz

Other Notes:

The cpr package provides 3D graphics via the rgl package. If you are get an error, or rather message, of the form:

  font family "sans" not found, using "bitmap"

Then there is an easy fix. You need to get the FreeType 2 font engine.

On Debian, you can get the library via:

apt-get install libfreetype6-dev

Once the FreeType 2 font engine has been installed on your computer you must reinstall the rgl package.

Metadata

Version

0.4.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows