PLANVARS Subcommand (CSPLAN command)
PLANVARS
is used to name planwise variables to be created when a sample is
extracted or used as input to the selection or estimation process.
ANALYSISWEIGHT. Final sample weights for each unit to be used by Complex
Samples analysis procedures in the estimation process. ANALYSISWEIGHT
is required
if an analysis design is specified. It is ignored with a warning if
a sample design is specified.
SAMPLEWEIGHT. Overall sample weights that will be generated when the sample design is executed using CSSELECT. A final sampling weight is created automatically when the sample plan is executed.
-
SAMPLEWEIGHT
is honored only if a sampling design is specified. It is ignored with a warning if an analysis design is specified. - Sample weights are positive for selected units. They take into account all stages of the design as well as previous sampling weights if specified.
- If
SAMPLEWEIGHT
is not specified, a default name (SampleWeight_Final_) is used for the sample weight variable.
PREVIOUSWEIGHT. Weights to be used in computing final sampling weights in a multistage design.
PREVIOUSWEIGHT
is honored
only if a sampling design is specified. It is ignored with a warning
if an analysis design is specified.
Typically, the previous weight variable is produced in an earlier
stage of a stage-by-stage sample selection process. CSSELECT
multiplies previous weights with
those for the current stage to obtain final sampling weights.
For example, suppose that you want to sample individuals within
cities but only city data are available at the outset of the study.
For the first stage of extraction, a design plan is created that specifies
that 10 cities are to be sampled from the active file. The PLANVARS
subcommand specifies that sampling
weights are to be saved under the name CityWeights.
CSPLAN SAMPLE
/PLAN FILE='/survey/city.csplan'
/PLANVARS SAMPLEWEIGHT=CityWeights
/DESIGN CLUSTER=city
/METHOD TYPE=PPS_WOR
/MOS VARIABLE=SizeVar
/SIZE VALUE=10.
This plan would be executed using CSSELECT
on an active file in which each case is a city.
For the next stage of extraction, a design plan is created that
specifies that 50 individuals are to be sampled within cities. The
design uses the PREVIOUSWEIGHT
keyword to specify that sample weights generated in the first stage
are to be used when computing final sampling weights for selected
individuals. Final weights are saved to the variable FinalWeights.
CSPLAN SAMPLE
/PLAN FILE='/survey/individuals.csplan'
/PLANVARS PREVIOUSWEIGHT=CityWeights
SAMPLEWEIGHT=FinalWeights
/DESIGN STRATA=city
/METHOD TYPE=SIMPLE_WOR
/SIZE VALUE=50.
The plan for stage 2 would be executed using CSSELECT
on an active file in which cases represent individuals
and both city and CityWeights are recorded for each individual.
Note that city is identified as
a stratification variable in this stage, so individuals are sampled
within cities.