a2c: Work Function for 'smoothSurvReg'

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/convertCDA.R

Description

Compute the 'c' G-spline coefficients from 'a' G-spline coefficients.

Usage

1
a2c(acoef)

Arguments

acoef

A vector of 'a' G-spline coefficients.

Details

'c' and 'a' G-spline coefficients are related by the expression

c[j] = exp(a[j])/[exp(a[1]) + ... + exp(a[g])], j = 1, ..., g,

where a[k] = 0, k = which.zero. This function transforms the 'c' coefficients into their 'a' counterparts.

Value

A vector of same length as acoef with 'c' G-spline coefficients.

Author(s)

Arnošt Komárek arnost.komarek[AT]mff.cuni.cz

See Also

c2a

Examples

1
2
3
4
5
6
7
8
9
ccoef <- c(0.1, 0.2, 0.15, 0.3, 0.25)

### Compute 'a' counterparts
acoef <- c2a(ccoef, 1)
print(acoef)

### And back 'c', ccoef2 should be same as ccoef
ccoef2 <- a2c(acoef)
print(ccoef2)

smoothSurv documentation built on July 8, 2020, 5:46 p.m.

Related to a2c in smoothSurv...