cn: Control Nets

Description Usage Arguments Details Value Author(s)

Description

Generate the control net for a uni-variable B-spline

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
cn(x, ...)

## S3 method for class 'cpr_bt'
cn(x, theta, ...)

## S3 method for class 'formula'
cn(formula, data, method = stats::lm, ...,
  keep_fit = FALSE, check_rank = TRUE)

## S3 method for class 'cpr_cn'
print(x, ...)

## S3 method for class 'cpr_cn'
summary(object, ...)

Arguments

x

a cpr_bs object

...

arguments passed to the regression method

theta

a vector of (regression) coefficients, the ordinates of the control net.

formula

a formula that is appropriate for regression method being used.

data

a required data.frame

method

the regression method such as lm, glm, lmer, geeglm, ...

keep_fit

(logical, defaults to FALSE). If TRUE the regression model fit is retained and returned in the the fit element. If FALSE the regression model is not saved and the fit element will be NA.

check_rank

(logical, defaults to TRUE) if TRUE check that the design matrix is full rank.

object

a cpr_cn object

Details

cn generates the control net for the given B-spline function. There are several methods for building a control net.

Value

a cpr_cn object. This is a list with the following elements. Some of the elements are omitted when the using the cn.cpr_bt method.

cn

the control net, data.frame with each row defining a vertex of the control net

bspline_list

A list of the marginal B-splines

call

the call

keep_fit

logical, indicates if the regression models was retained

fit

if isTRUE(keep_fit) then the regression model is here, else NA.

coefficients

regression coefficients, only the fixed effects if a mixed effects model was used.

vcov

The variance-covariance matrix for the coefficients

loglik

The log-likelihood for the regression model

rmse

The root mean squared error for the regression models

Author(s)

Peter DeWitt dewittpe@gmail.com


cpr documentation built on May 1, 2019, 10:46 p.m.