Package orthogonalsplinebasis

Similar documents
Package splines2. June 14, 2018

Package blockmatrix. February 19, 2015

Package SSLASSO. August 28, 2018

Package flsa. February 19, 2015

Package lmesplines. R topics documented: February 20, Version

Package spark. July 21, 2017

Package freeknotsplines

Package filematrix. R topics documented: February 27, Type Package

Package ECctmc. May 1, 2018

Package crochet. January 8, 2018

Package ICsurv. February 19, 2015

Package nsprcomp. August 29, 2016

Package seg. February 15, 2013

Package pso. R topics documented: February 20, Version Date Title Particle Swarm Optimization

Package frt. R topics documented: February 19, 2015

Package svd. R topics documented: March 24, Type Package. Title Interfaces to various state-of-art SVD and eigensolvers. Version 0.3.

Package slam. February 15, 2013

Spline Models. Introduction to CS and NCS. Regression splines. Smoothing splines

Package clustering.sc.dp

The pspline Package. August 4, Author S original by Jim Ramsey R port by Brian Ripley

Package simmsm. March 3, 2015

Contents. Implementing the QR factorization The algebraic eigenvalue problem. Applied Linear Algebra in Geoscience Using MATLAB

Package svd. R topics documented: September 26, 2017

Package GADAG. April 11, 2017

Package CatEncoders. March 8, 2017

Package rgcvpack. February 20, Index 6. Fitting Thin Plate Smoothing Spline. Fit thin plate splines of any order with user specified knots

Package survivalmpl. December 11, 2017

Package slam. December 1, 2016

Package glassomix. May 30, 2013

Package TVsMiss. April 5, 2018

Package hgam. February 20, 2015

A comparison of spline methods in R for building explanatory models

2D Spline Curves. CS 4620 Lecture 13

Package ibbig. R topics documented: December 24, 2018

Package NetCluster. R topics documented: February 19, Type Package Version 0.2 Date Title Clustering for networks

Package intcensroc. May 2, 2018

Package kirby21.base

Package assortnet. January 18, 2016

Package sure. September 19, 2017

Package lspls. July 27, 2018

Matrix algebra. Basics

Package MeanShift. R topics documented: August 29, 2016

Stat 579: Objects in R Vectors

Package logspline. February 3, 2016

Package logisticpca. R topics documented: August 29, 2016

Package capushe. R topics documented: April 19, Type Package

Package getopt. February 16, 2018

Package sfc. August 29, 2016

Package seg. September 8, 2013

Package rmatio. July 28, 2017

Package esabcv. May 29, 2015

Package geofd. R topics documented: October 5, Version 1.0

Package BigVAR. R topics documented: April 3, Type Package

Package distrellipse

Package sparsenetgls

Package misclassglm. September 3, 2016

Package bigalgebra. R topics documented: February 19, 2015

Package intccr. September 12, 2017

lecture 10: B-Splines

Package SiZer. February 19, 2015

Package geojsonsf. R topics documented: January 11, Type Package Title GeoJSON to Simple Feature Converter Version 1.3.

Package parcor. February 20, 2015

Package NB. R topics documented: February 19, Type Package

Package Mondrian. R topics documented: March 4, Type Package

Package munfold. R topics documented: February 8, Type Package. Title Metric Unfolding. Version Date Author Martin Elff

Package qvcalc. R topics documented: September 19, 2017

Package anidom. July 25, 2017

Basic matrix math in R

Package dostats. R topics documented: August 29, Version Date Title Compute Statistics Helper Functions

Package polychaosbasics

Cubic Splines and Matlab

Package fso. February 19, 2015

Package fbroc. August 29, 2016

Package svapls. February 20, 2015

Package Brobdingnag. R topics documented: March 19, 2018

Package tfer. February 20, 2015

Package glinternet. June 15, 2018

Package PCADSC. April 19, 2017

Package rpst. June 6, 2017

Package datasets.load

Package TANDEM. R topics documented: June 15, Type Package

Package pomdp. January 3, 2019

Package pendvine. R topics documented: July 9, Type Package

Package dkdna. June 1, Description Compute diffusion kernels on DNA polymorphisms, including SNP and bi-allelic genotypes.

Package benchden. February 19, 2015

Package LSDinterface

Package RCA. R topics documented: February 29, 2016

Package dglm. August 24, 2016

Package sspline. R topics documented: February 20, 2015

Package glmnetutils. August 1, 2017

Package gibbs.met. February 19, 2015

Package Combine. R topics documented: September 4, Type Package Title Game-Theoretic Probability Combination Version 1.

Package orderbook. R topics documented: February 20, Type Package Title Orderbook visualization/charting software

Package naivebayes. R topics documented: January 3, Type Package. Title High Performance Implementation of the Naive Bayes Algorithm

Package biglars. February 19, 2015

2 sybildynfba-package. Dynamic Flux Balance Analysis

Package PRISMA. May 27, 2018

Package inca. February 13, 2018

Package jdx. R topics documented: January 9, Type Package Title 'Java' Data Exchange for 'R' and 'rjava'

Package ridge. R topics documented: February 15, Title Ridge Regression with automatic selection of the penalty parameter. Version 2.

Transcription:

Type Package Package orthogonalsplinebasis Title Orthogonal B-Spline Basis Functions Version 0.1.6 Date 2015-03-30 Author Andrew Redd Depends methods, stats, graphics March 31, 2015 Maintainer Andrew Redd <andrew.redd@hsc.utah.edu> Represents the basis functions for B-splines in a simple matrix formulation that facilitates, taking integrals, derivatives, and making orthogonal the basis functions. License GPL (>= 2) URL https://github.com/halpo/obsplines NeedsCompilation no Repository CRAN Date/Publication 2015-03-31 07:51:02 R topics documented: orthogonalsplinebasis-package............................... 2 evaluate-methods...................................... 2 expand.knots........................................ 2 fitls............................................. 3 GramMatrix......................................... 4 Hankel............................................ 5 integrate-methods...................................... 6 MatrixPower........................................ 6 orthogonalize-methods................................... 7 OrthogonalizeBasis..................................... 7 OuterProdSecondDerivative................................ 8 SplineBasis......................................... 8 SplineBasis-class...................................... 9 Index 12 1

2 expand.knots orthogonalsplinebasis-package A Matrix Representation for Spline Basis Functions This package provides functions for manipluation of spline basis functions. A matrix representation for the basis fucntions is at the center of the functions. The matrix representation simplifies the process of orthogonalization as well as differention and integration. Andrew Redd Maintainer: Andrew Redd <aredd at stat.tamu.edu> evaluate-methods Generic evaluate method Methods for function evaluate. Methods object = "SplineBasis", x = "numeric" Evaluates a SplineBasis object for the spline basis curves at points x. See SplineBasis expand.knots Expands knots for appropriate number of knots in bsplines This function is for conveinience of specifying knots for B-splines. Since the user usually only want to specify the interval that they are interested in the end knots are usually duplicated. This function interprets the first and last knots as the end points and duplicates them. expand.knots(interior, order = 4) interior order The knots including all interior and endpoitn knots the order of the splines that the knots are to be used with. Defaults to 4, being cubic splines

fitls 3 A vector of knots with the order specified as an attribute Andrew Redd See Also SplineBasis, ~~~ Examples (knots<-expand.knots(1:10)) plot(obasis(knots)) fitls Fitting splines with penalized least squares. Estimates the control vector for a spline fit by penalized least squares. The penalty being the penalty parameter times the functional inner product of the second derivative of the spline curve. fitls(object, x, y, penalty = 0) object x y penalty The SplineBasis object ot be used to make the fit predictor variable. response variable. The penalty multiplier. Details For numeric vector y, and x, and a set of basis functions, represented in object, defined on the knots (k 0,..., k m ). The likelihood is defined by The fucntion estimates µ. n (y i b(x i )µ) + i=1 k m k 0 µ T b (t) T b (t)µdt

4 GramMatrix a vector of the control points. Andrew Redd <aredd at stat.tamu.edu> See Also SplineBasis Examples knots<-c(0,0,0,0:5,5,5,5) base<-splinebasis(knots) x<-seq(0,5,by=.5) y<-exp(x)+rnorm(length(x),sd=5) fitls(base,x,y) GramMatrix Computing the Gram Matrix for a set of Spline Basis Function for computing the Gram matrix of a spline basis. GramMatrix(object) object a SplineBasis object Details Compute the Gram Matrix. If object denotes the basis functions b(t) = {b 1 (t),..., b J (t)} then the Gram Matrix is, G = b T (t)b(t)dt a matrix as defined above.

Hankel 5 Hankel Generating a Hankel Matrix Functions to generate a Hankel matrix. Hankel(x, nrow = length(x)%/%2, ncol = length(x)%/%2) x nrow ncol numeric vector to specify the entries of the matrix. Should have an even number of entries. integer, must be at most length(x) integer, must be at most length(x) Details Computes a Hankel matrix. If we denote the vector x = (x 1,..., x n ) the Hankel matrix is defined and formed as x 1 x 2 x 3 x 1/2 x 2 x 3.. H = x 3...... x 1/2 x n a matrix as defined above. Andrew Redd <aredd at stat.tamu.edu> Examples Hankel(1:6)

6 MatrixPower integrate-methods Methods for Function integrate Methods for function integrate. integrate integrates generic objects for which an integral is defined. Methods object = "SplineBasis" Returns a new SplineBasis object for the integral of the basis functions. See SplineBasis MatrixPower Matrix Power Performs the matrix power opperation. MatrixPower(A, n) A n A square matrix. An integer telling the exponent. Details Only well defined for integers the matrix power opperation is a convenience function to multipy a matrix, A, with itself n times. A matrix of the same dimention as A. Andrew Redd <aredd at stat.tamu.edu>

orthogonalize-methods 7 Examples A<-rbind(0,cbind(diag(1:5),0)) #a nilpotent matrix A MatrixPower(A,3) MatrixPower(A,5) MatrixPower(A,6) #Gets to a zero matrix orthogonalize-methods Methods for Function orthogonalize A generic function for orthogonalizing an object and returning the orthogonal object Methods object = "SplineBasis" orthogonalizes the spline basis functions. See SplineBasis OrthogonalizeBasis Orthogonalize a Spline Basis Specific function for orthogonalizing the functions in a SplineBasis object. OrthogonalizeBasis(object,...) object A SplineBasis object... ignored An OrthogonalSplineBasis object. Andrew Redd <aredd at stat.tamu.edu> See Also OrthogonalSplineBasis, SplineBasis,orthogonalize

8 SplineBasis OuterProdSecondDerivative Outer Product of Second Derivatives of Spline Bases Provides the functional outer product of second derivatives of a set of basis functions in a SplineBasis object. It a convenient form for forming a penalty on curve smoothness when fitting a spline curve. OuterProdSecondDerivative(basis) basis A SplineBasis object A square matrix of order nrow(basis). Andrew Redd <aredd at stat.tamu.edu> See Also SplineBasis,fitLS SplineBasis Creating and SplineBasis Objects. The function to create SplineBasis and OrthogonalSplineBasis Objects SplineBasis(knots, order=4, keep.duplicates=false) OrthogonalSplineBasis(knots,...) OBasis(...)

SplineBasis-class 9 knots The full set of knots used to define the basis functions. order Order of the spline fit.(degree= order-1) keep.duplicates Should duplicate interior knots that could cause computation problem be kept or removed. Defaults to false, which removes duplicate knots with a warning if duplicate interior knots are found.... Other arguments either ignored or passed onto other functions. Details SplineBasis produces an object representing the basis functions used in spline fitting. Provides a compact easily evaluated representation of the functions. Produces a class of object SplineBasis. OrthogonalSplineBasis is a shortcut to obtain a set of orthogonalized basis functions from the knots. OBasis is an alias for OrthogonalSplineBasis. Both provide an object of class OrthogonalSplineBasis. The class OrthogonalSplineBasis inherits directly from SplineBasis meaning all functions that apply to SplineBasis functions also apply to the orthogonalized version. Object of class SplineBasis or OrthogonalSplineBasis References General matrix representations for Bsplines KaihuaiQin, The Visual Computer 2000 16:177 186 See Also SplineBasis, spline, orthogonalsplinebasis-package Examples knots<-c(0,0,0,0:10,10,10,10) plot(splinebasis(knots)) obase<-obasis(knots) plot(obase) dim(obase)[2] #number of functions evaluate(obase, 1:10-.5) SplineBasis-class Classes "SplineBasis" and "OrthogonalSplineBasis" Contains the matrix representation for spline basis functions. The OrthongonalSplineBasis class has the basis functions orthogonalized.

10 SplineBasis-class Objects from the Class Slots Objects can be created by calls of the form SplineBasis(knots, order) or to generate orthogonal spline basis functions directly OrthogonalSplineBasis(knots, order) or the short version OBasis(knots,order). transformation: Object of class "matrix" Only applicable on OrthogonalSplineBasis Class, shows the transformation matrix use to get from regular basis functions to orthogonal basis functions. knots: Object of class "numeric" order: Object of class "integer" Matrices: Object of class "array" Methods deriv signature(expr = "SplineBasis"): Computes the derivative of the basis functions. Returns an object of class SplineBasis. dim signature(x = "SplineBasis"): gives the dim as the order and number of basis functions. Returns numeric of length 2. evaluate signature(object = "SplineBasis", x = "numeric"): Evaluates the basis functions and the points provided in x. Returns a matrix with length(x) rows and dim(object)[2] columns. integrate signature(object = "SplineBasis"): computes the integral of the basis functions x defined by b(t)dt where k 0 is the first knot. Returns an object of class SplineBasis. k 0 orthogonalize signature(object = "SplineBasis"): Takes in a SplinesBasis object, computes the orthogonalization transformation and returns an object of class OrthogonalSplineBasis. plot signature(x = "SplineBasis", y = "missing"): Takes an object of class SplineBasis and plots the basis functions for the domain defined by the knots in object. plot signature(x = "SplineBasis", y = "vector"): Interprets y as a vector of coefficients and plots the resulting curve. plot signature(x = "SplineBasis", y = "matrix"): Interprets y as a matrix of coefficients and plots the resulting curves. Andrew Redd <aredd at stat.tamu.edu> References See Also General matrix representations for Bsplines Kaihuai Qin, The Visual Computer 2000 16:177 186 SplineBasis

SplineBasis-class 11 Examples showclass("splinebasis") knots<-c(0,0,0,0:5,5,5,5) (base <-SplineBasis(knots)) (obase<-obasis(knots)) plot(base) plot(obase)

Index Topic algebra MatrixPower, 6 SplineBasis, 8 Topic array Hankel, 5 MatrixPower, 6 OuterProdSecondDerivative, 8 Topic classes OrthogonalizeBasis, 7 SplineBasis-class, 9 Topic hplot SplineBasis, 8 SplineBasis-class, 9 Topic math GramMatrix, 4 integrate-methods, 6 OuterProdSecondDerivative, 8 Topic methods evaluate-methods, 2 integrate-methods, 6 orthogonalize-methods, 7 Topic package orthogonalsplinebasis-package, 2 Topic smooth fitls, 3 Topic utilities expand.knots, 2 deriv,splinebasis-method dim,splinebasis-method evaluate (evaluate-methods), 2 evaluate,splinebasis,numeric-method evaluate-methods, 2 expand.knots, 2 GramMatrix, 4 Hankel, 5 integrate (integrate-methods), 6 integrate,splinebasis-method integrate-methods, 6 MatrixPower, 6 OBasis, 10 OBasis (SplineBasis), 8 orthogonalize, 7 orthogonalize (orthogonalize-methods), 7 orthogonalize,splinebasis-method orthogonalize-methods, 7 OrthogonalizeBasis, 7 OrthogonalSplineBasis, 7, 10 OrthogonalSplineBasis (SplineBasis), 8 orthogonalsplinebasis (orthogonalsplinebasis-package), 2 OrthogonalSplineBasis-class orthogonalsplinebasis-package, 2, 9 OuterProdSecondDerivative, 8 plot,splinebasis,matrix-method plot,splinebasis,missing-method plot,splinebasis,vector-method spline, 9 SplineBasis, 2 4, 6 8, 8, 9, 10 SplineBasis-class, 9 fitls, 3, 8 12