# Parametric Shared Frailty Models- Examples

Example 1

SURVREG RECURRENT y WITH x1 BY x2

/MODEL SUBJECT=id FRAILTY=GAMMA DISTRIBUTION=WEIBULL.

• A parametric shared-frailty survival model is fitted of y on a covariate x1 and factor x2.

• Survival time is represented by a single variable y.

• The subjects are identified by the variable id.

• The survival time is assumed to follow a Weibull distribution.

• The variance of the frailty is assumed to follow a Gamma distribution.

• All valid records are used in the survival analysis.

Example 2

SURVREG RECURRENT y WITH x1 BY x2

/MODEL SUBJECT=id FRAILTY=INV_GAUSSIAN DISTRIBUTION=LOG_NORMAL INTERVAL=z.

• A parametric shared-frailty survival model is fitted of y on a covariate x1 and factor x2.

• Survival time is represented by two variables y1 and y2 denoting start and end time.

• The subjects are identified by the variable id.

• The survival time is assumed to follow a Log-normal distribution.

• The variance of the frailty is assumed to follow an inverse Gaussian distribution.

• Time intervals are defined by the variable z. For each subject, the procedure only uses the nonconflicted records and excludes from the analysis all the records after the first failure status.

Example 3

SURVREG RECURRENT y1 y2 WITH x1 BY x2(1)

/MODEL SUBJECT=id FRAILTY=INV_GAUSSIAN DISTRIBUTION=LOG_LOGISTIC

/STATUS VARIABLE=event FAILURE=1 RIGHT=0.

• A parametric shared-frailty survival model is fitted of y on a covariate x1 and factor x2. Survival

time is represented two variables y1 and y2 denoting start and end time, respectively. For the factor x2, the category “1” is designated as a baseline to be modeled.

• The subjects are identified by the variable id.

• The survival time is assumed to follow a Log-logistic distribution.

• The variance of the frailty is assumed to follow an inverse Gaussian distribution.

• The variable event is specified to define the status with 1 and 0 denoting failure and right-censoring, respectively.

Example 4

SURVREG RECURRENT y WITH x1 BY x2

/MODEL SUBJECT=id

/STATUS VARIABLE=event FAILURE=1 RIGHT=0

/PREDICT UNCONDSURVIVAL UNCONDHAZARD UNCONDCUMHAZARD

/FUNCTIONPLOT SURVIVAL HAZARD DENSITY PLOTBY(x2).

• A parametric shared-frailty survival model is fitted of y on a covariate x1 and factor x2. Survival time is represented by a single variable y.

• The subjects are identified by the variable id.

• Unconditional or population-based survival, hazard, and cumulative hazard are scored and saved to the active data set.

• Unconditional or population-based survival and hazard curves are plotted separated by the categories in x2.

Example 5

SURVREG RECURRENT y WITH x1 BY x2

/MODEL SUBJECT=id FRAILTY=GAMMA DISTRIBUTION=WEIBULL

/STATUS VARIABLE=event FAILURE=1 RIGHT=0

/ESTIMATION HCONVERGE=1e-12(RELATIVE) PCONVERGE=0 FCONVERGE=0SELECTFEATURES=TRUE PENALTY=0.01.

• A parametric shared-frailty survival model is fitted of y on a covariate x1 and factor x2. Survival time is represented by a single variable y.

• The subjects are identified by the variable id.

• The survival time is assumed to follow a Weibull distribution.

• The variance of the frailty is assumed to follow a Gamma distribution.

• The convergence criteria are based on the Hessian matrix. It uses 1e-12 as the relative convergence.

• The model includes a penalty term to control the regularization process. The penalty parameter is set to be 0.01.

Example 6

SURVREG RECURRENT y WITH x1 BY x2

/MODEL SUBJECT=id

/STATUS VARIABLE=infect FAILURE=1 RIGHT=0

/ESTIMATION MAXLINESEARCH=100 MAXITER=50 MAXSTEPHALVING=20.

• A parametric shared-frailty survival model is fitted of y on a covariate x1 and factor x2. Survival time is represented by a single variable y.

• The subjects are identified by the variable id.

• The procedure specifies the maximum number of the line search to be 100, the maximum number of iterations to be 50, and the maximum number of step-halving to be 20.