a.to.c {smoothSurv} | R Documentation |
Compute the 'c' G-spline coefficients from 'a' G-spline coefficients.
a.to.c(acoef)
acoef |
A vector of 'a' G-spline coefficients. |
'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.
A vector of same length as acoef
with 'c' G-spline coefficients.
Arnost Komarek arnost.komarek@med.kuleuven.ac.be
ccoef <- c(0.1, 0.2, 0.15, 0.3, 0.25) ### Compute 'a' counterparts acoef <- c.to.a(ccoef, 1) print(acoef) ### And back 'c', ccoef2 should be same as ccoef ccoef2 <- a.to.c(acoef) print(ccoef2)