The 'Micro' dataset data is created directly within the SAS script using a `datalines` statement in a `DATA STEP` block. Variables `t1` and `t2` represent time intervals, and `f` is a frequency variable.
1 Code Block
DATA STEP Data
Explanation : This `DATA STEP` block is responsible for creating the 'Micro' dataset. It reads three numeric variables: `t1` (start time or lower event time), `t2` (end time or upper event time) and `f` (frequency or weight). The data is provided directly in the script via the `datalines` statement.
Explanation : This block executes the `LIFEREG` procedure to fit a lifetime regression model to the 'Micro' dataset survival data. The `ods graphics on;` statement enables graphic generation. The `model` statement specifies `t1` and `t2` as time variables and assumes a lognormal distribution (`d=lognormal`), with initial values for the intercept (`intercept=25`) and the scale parameter (`scale=5`). The `f` variable is used as a weighting factor. The `probplot` subcommand generates probability plots with several options: `pupper` sets the upper limit of the axis, `itprintem` displays EM iterations, `printprobs` displays probabilities, `maxitem` controls the maximum number of items displayed, and `ppout` writes the plot values to a new dataset. The `inset` statement adds an inset to the graph.
model ( t1 t2 ) = / d=lognormal intercept=25 scale=5;
4
weight f;
5
probplot
6
pupper = 10
7
itprintem
8
printprobs
9
maxitem = (1000,25)
10
ppout;
11
inset;
12
RUN;
13
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.