Description Usage Arguments Details Value Author(s) References See Also Examples
Fit a survival model using either a semiparametric approach (penalized likelihood with an approximation of the hazard function by linear combination of Msplines) or a parametric approach (specifying a Weibull distribution on the hazard function). Lefttruncated, rightcensored, and intervalcensored data are allowed.
1 2 3 
formula 
a formula object with the response on the left of a \texttildelow operator, and the terms on the right. The response must be a survival object or Hist object as returned by the 'Surv' or 'Hist' function. 
data 
a data frame in which to interpret the variables named
in the 
eps 
a vector of length 3 for the convergence criteria (criterion for parameters, criterion for likelihood, criterion for second derivatives). The default is 'c(5,5,3)' and corresponds to criteria equals to 10^{5}, 10^{5} and 10^{3}. 
n.knots 
Argument only active for the penalized likelihood approach 
knots 
Argument only active for the penalized likelihood approach
The algorithm needs at least 5 knots and allows no more than 20 knots. 
CV 
binary variable equals to 1 when search (by approximated cross validation) of the smoothing parameter kappa and 0 otherwise. Argument for the penalized likelihood approach. The default is 0. 
kappa 
Argument only active for the penalized likelihood approach 
conf.int 
Level of confidence pointwise confidence intervals of the survival and hazard functions, i.e.,
a value between 0 and 1, the default is 
maxiter 
maximum number of iterations. The default is 200. 
method 
type of estimation method: "Splines" for a penalized likelihood approach with approximation of the hazard function by Msplines, "Weib" for a parametric approach with a Weibull distribution on the hazard function. Default is "Weib". 
print.iter 
boolean parameter. Equals to 
na.action 
how NAs are treated. The default is first, any na.action attribute of data, second a na.action setting of options, and third 'na.fail' if that is unset. The 'factoryfresh' default is na.omit. Another possible value is NULL. 
The estimated parameters are obtained using the robust Marquardt algorithm (Marquardt, 1963) which is a combination between a NewtonRaphson algorithm and a steepest descent algorithm.
call 

coef 
regression parameters. 
loglik 
vector containing the loglikelihood without and with covariate. 
modelPar 
Weibull parameters. 
N 
number of subjects. 
NC 
number of covariates. 
nevents 
number of events. 
modelResponse 
model response: 
converged 
integer equal to 1 when the model converged, 2, 3 or 4 otherwise. 
time 
times for which survival and hazard functions have been evaluated for plotting. 
hazard 
matched values of the hazard function. 
lowerHazard 
lower confidence limits for hazard function. 
upperHazard 
upper confidence limits for hazard function. 
surv 
matched values of the survival function. 
lowerSurv 
lower confidence limits for survival function. 
upperSurv 
upper confidence limits for survival function. 
RR 
vector of relative risks. 
V 
variancecovariance matrix. 
se 
standard errors. 
knots 
knots of the Msplines estimate of the hazard function. 
nknots 
number of knots. 
CV 
a binary variable equals to 1 when search of the smoothing parameter kappa by approximated crossvalidation, 1 otherwise. The default is 0. 
niter 
number of iterations. 
cv 
vector containing the convergence criteria. 
na.action 
observations deleted if missing values. 
R: Celia Touraine <Celia.Touraine@isped.ubordeaux2.fr> Fortran: Pierre Joly <Pierre.Joly@isped.ubordeaux2.fr>
D. Marquardt (1963). An algorithm for leastsquares estimation of nonlinear parameters. SIAM Journal of Applied Mathematics, 431441.
shr
, print.shr
,
summary.shr
, print.shr
,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17  # Weibull survival model
library(prodlim)
data(testdata)
fit.su < shr(Hist(time=list(l,r),id)~cov,data=testdata)
fit.su
summary(fit.su)
## Not run:
shr.spline < shr(Hist(time=list(l,r),id)~cov,data=testdata,method="splines",n.knots=6)
shr.spline
shr.spline.q < shr(Hist(time=list(l,r),id)~cov,data=testdata,
method="splines",n.knots=6,knots="quantiles")
plot(shr.spline.q)
## manual placement of knots
shr.spline.man < shr(Hist(time=list(l,r),id)~cov,data=testdata,method="splines",knots=seq(0,7,1))
## End(Not run)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.