FNLStat : Sampling : Usage Notes
Usage Notes
The routines for inferences regarding proportions require only counts as the input data. The other routines described in this chapter require the actual data. Since the amount of data may be quite large, these routines allow for the data to be input in small quantities (or even to be deleted after it has already been passed to the subroutine). This is accomplished by means of the processing option parameter, IDO, and an indicator of the number of observations being passed in, NROW. IDO has the following meaning:
IDO
Action
0
This is the only invocation of the subroutine for this data set, and all the data are input at once.
1
This is the first invocation, and additional calls to the subroutine will be made. Initialization and updating for the data are performed.
2
This is an intermediate invocation of the subroutine, and updating for the data is performed.
3
This is the final invocation of the routine. Updating for the data and any wrap‑up computations are performed.
NROW can be positive or negative or zero. Its absolute value is the number of sample values being input. If NROW is negative, it is assumed that the observations being input have already been input once and now it is desired to delete them from the analysis. When IDO is 3, NROW can be set to 0. In this case, only postprocessing is performed; no accumulation of statistics is done. This allows input of summary statistics rather than the actual data. See Example 2 in the documentation for the routine SMPSR.
There are other variables used by several routines in this chapter that have a common meaning in all routines:
Y — The variable of interest.
X — The auxiliary variable.
NSAMP — The sample size.
NPOP — The population size.
CONPER — Confidence level.
STAT — Output statistics.
For stratified sampling, the following variables are often used:
NSTRAT — Number of strata.
NROWS — Vector with elements like NROW for strata.
NSAMPS — The strata sample sizes.
NPOPS — The population sizes for strata.
YBARS — The strata sample means.
YVARS — The strata sample variances.