BasisCon: Basis Construction Function

Description Usage Arguments Details Value Examples

View source: R/BasisCon.R

Description

Smooth terms in a plbpsm formula are turned into smooth specification objects of class xx.smooth.spec during processing of the formula. Each of these objects is converted to a smooth object using an appropriate BasisCon function.

Usage

1
BasisCon(object, data)

Arguments

object

is a smooth specification object or a smooth object.

data

A data frame, model frame or list containing the values of the (named) covariates at which the smooth term is to be evaluated. If it’s a list then n must be supplied.

Details

It is the wrapper function which calls basis constructing method.

Value

a list of smooth objects are returned. Many of the outputs are from b function. Other outputs include all the information related to berstein basis.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(BPST)
data("eg1pop_dat")
eg1_V2=eg1pop_dat[['V2']]
eg1_T2=eg1pop_dat[['T2']]
eg1pop_rho03=eg1pop_dat[['rho03']]
sam=eg1pop_rho03[sample(1:dim(eg1pop_rho03)[1],70),]

# bivariate spline
BI <- BasisCon(b(x1,x2,d=2,r=1,V=eg1_V2,Tr=eg1_T2),sam)
# univariate spline
BI <- BasisCon(u(z1),sam)

funstatpackages/GgAM documentation built on Nov. 4, 2019, 12:59 p.m.