FNLStat : Sampling : SMPPS
SMPPS
Computes statistics for inferences regarding the population proportion and total given proportion data from a stratified random sample.
Required Arguments
NINTS — Vector of length NSTRAT containing the observed number of units in each stratum from the class of interest. (Input)
NSAMPS — Vector of length NSTRAT containing the sample size in each stratum. (Input)
NPOPS — Vector of length NSTRAT containing the population in the strata. (Input)
If the population strata sizes are not known, estimates must be entered in their place.
PROPOR — Vector of length NSTRAT containing the within‑strata proportion estimates. (Output)
STAT — Vector of length 10 containing the resulting statistics. (Output)
These are:
I
STAT(I)
1
Estimate of the proportion.
2
Estimate of the total.
3
Variance estimate of the proportion estimate.
4
Variance estimate of the total estimate.
5
Lower confidence limit for the proportion.
6
Upper confidence limit for the proportion.
7
Lower confidence limit for the total.
8
Upper confidence limit for the total.
9
Estimate (expressed as a percentage) of the coefficient of variation of the total estimate.
10
Variance estimate of the proportion estimate assuming that sampling was simple random instead of stratified random.
Optional Arguments
NSTRAT — Number of strata into which the sample is divided. (Input)
In the vectors of length NSTRAT, the elements are all ordered in the same way.
Default: NSTRAT = size (NINTS,1).
CONPER — Confidence level for two‑sided interval estimate, in percent. (Input)
A CONPER percent confidence interval is computed; hence, CONPER must be greater than or equal to 0.0 and less than 100.0. CONPER is often 90.0, 95.0, or 99.0. For a one‑sided confidence int­erval with confidence level ONECL, set CONPER = 100.0  2.0 * (100.0  ONECL).
Default: CONPER = 95.0.
FORTRAN 90 Interface
Generic: CALL SMPPS (NINTS, NSAMPS, NPOPS, PROPOR, STAT [])
Specific: The specific interface names are S_SMPPS and D_SMPPS.
FORTRAN 77 Interface
Single: CALL SMPPS (NSTRAT, NINTS, NSAMPS, NPOPS, CONPER, PROPOR, STAT)
Double: The double precision name is DSMPPS.
Description
Routine SMPPS computes point and interval estimates for the population proportion and total from a stratified random sample. If the strata are formed so that the proportions differ greatly from one stratum to the next, considerable gain in statistical efficiency can be realized by use of stratified sampling (see Cochran 1977, page 107).
Let Nh be the number in the population in the h‑th stratum, let nh be the number in the sample from the h‑th stratum, let ah be the number of the class of interest in the sample from the h‑th stratum, let N be the population size (Σ Nh), let ph be the proportion in the h‑th stratum, ah/nh, and let L be the number of strata. Then, the estimate of the proportion is
and the estimate of the variance is
The confidence intervals are computed using a normal approximation.
Example
This example is an artificial modification of an example used in routine SMPPR, which is from Cochran (1977, page 52). A list of 3042 names and addresses was built by an experienced secretary and a part‑time student worker. The secretary entered 1838 names and addresses, and the student entered the remainder. Samples of size 100 were taken from the names entered by each. Verification of the addresses in the sample from the secretary’s work showed 12 to be wrong, and verification of the student’s sample showed 26 to be wrong. The objective is to estimate the total number of incorrect addresses.
 
USE UMACH_INT
USE SMPPS_INT
 
IMPLICIT NONE
INTEGER NSTRAT
PARAMETER (NSTRAT=2)
!
INTEGER NINTS(NSTRAT), NOUT, NPOPS(NSTRAT), NSAMPS(NSTRAT)
REAL CONPER, PROPOR(NSTRAT), SQRT, STAT(10), STDP, STDSRS, &
STDT
INTRINSIC SQRT
!
CALL UMACH (2, NOUT)
NINTS(1) = 12
NINTS(2) = 26
NSAMPS(1) = 100
NSAMPS(2) = 100
NPOPS(1) = 1838
NPOPS(2) = 1204
CONPER = 0.0
!
CALL SMPPS (NINTS, NSAMPS, NPOPS, PROPOR, STAT, CONPER=CONPER)
!
STDP = SQRT(STAT(3))
STDT = SQRT(STAT(4))
STDSRS = SQRT(STAT(10))
!
WRITE (NOUT,99999) STAT(1), STAT(2), STDP, STDT, STAT(9), STDSRS
99999 FORMAT (' Estimate of proportion bad: ', F7.3, /, &
' Estimate of total bad: ', F4.0, /, &
' Standard deviation estimate, proportion: ', F7.3, /, &
' Standard deviation estimate, total: ', F5.1, /, &
' Coefficient of variation: ', F5.1, &
'%', /, ' Std. dev. under simple random sampling: ', &
F7.3)
END
Output
 
Estimate of proportion bad: 0.175
Estimate of total bad: 534.
Standard deviation estimate, proportion: 0.025
Standard deviation estimate, total: 77.4
Coefficient of variation: 14.5%
Std. dev. under simple random sampling: 0.027
Published date: 03/19/2020
Last modified date: 03/19/2020