TABLE OF CONTENTS
curveUpdate/updatespline [ Functions ]
NAME
updatespline --- update the curve's spline parameters
FUNCTION
Update a curve with new spline parameters. This simply consists of copying the parameters into the curve structure and re-evaluating it using evalspline.
SYNOPSIS
2059 updatespline <- function(curve, spline.par)
INPUTS
curve an RCurve structure spline.par a new set of parameters for the spline component
OUTPUTS
curve the input curve with the spline component updated to the new parameters.
SOURCE
2062 { 2063 if(!curve$hasspline) return(curve) 2064 # For the frailty, make sure that the parameter at the fixed index is 0 2065 if(curve$name == "frailty") spline.par <- spline.par - spline.par[curve$spline.fixedind] 2066 # copy new parameters into the curve 2067 curve$spline.par <- spline.par 2068 # evaluate the curve 2069 curve <- evalspline(curve) 2070 return(curve) 2071 }