.-
help for ^stpyear^                                           
.-

Calculation of person-years, incidence rates and SMR
----------------------------------------------------

  ^stpyear^ [^if^ exp]^,^ ^at(^numlist^)^ [^trim^ ^smr(^groupvar ratevar^)^ ^per(^#^)^ ^l^evel^(^#^)^
	                         ^u^sing^(^filename^)^ ^out^put^(^filename[,^replace^]^)^ ]

^stpyear^ is for use with survival-time data; see help @st@.  You must
^stset^ your data before using this commands; see help @stset@.


Description
-----------

^stpyear^ calculates person-years, incidence rates or SMR per time intervals 
specified by ^at(^numlist^)^. 
 
^stpyear^ also implements computation of SMR's, after merging the data with a
suitable file of "standard" rates specified with the ^using()^ option.

Optionally a summary dataset may be saved in a file specified using ^output()^.


Options 
-------

^at(^numlist^)^ is not optional.  It specifies the time intervals during which 
    person-years are to be computed.  The intervals are specified in 
    analysis-time t units.

^trim^ specifies that observations less than the minimum or greater than the 
    maximum value listed in ^at()^ be excluded from the calculations.

^per(^#^)^ defines the time units in which the rate will be reported.  For example,
    if the analysis time is in years, specifying per(1000) results in rates per
    1000 person-years.

^smr(^groupvar ratevar^)^ specifies two variable in the using() data. groupvar
    identifies the age-group variable name and ratevar a variable containing 
    the appropriate reference rates.  The program then calculates SMR's rather
    than incidence rates.

^output(^filename [^,replace^]^)^ saves a summary dataset in filename.  The file
    contains counts of failures and person-time, rates (or SMR's), confidence
    limits, and all the categorical variables in the varlist.

^level(^#^)^ specifies the confidence level, in percent, for confidence intervals.
    The default is ^level(95)^ os as set by ^set level^; see help @level@.

^noshow^ prevents ^stpyear^ from displaying the identities of the key st variables
    above its output.  If this appeals to you, consider typing "^stset, noshow^"
    to make noshow the default for all st commands; see help ^stset^.

Examples
--------

	. ^stpyear, at(20(5)60)^
	. ^stpyear, at(20(5)50) smr(agegrp rate) using(reffile)^

Also see
--------

On-line:  help for @st@, @stset@, @stsplit@, @strate@
