Merges strata prior to survey analysis (S.D. Langton).
Options
PRINT = string token |
Controls printed output (summary , intable , outtable , twowaytable ); default summ |
---|---|
OLDFACTOR = factor |
Factor defining the original strata |
NEWFACTOR = factor |
Factor to save the merged strata |
Parameters
MERGELABELS = texts |
Labels of strata to merge |
---|---|
NEWLABEL = texts |
Label for merged stratum |
Description
In survey analysis it is often necessary to combine a number of strata for analysis, for example where less data are collected than anticipated. SVMERGE
does this, identifying strata using their labels, avoiding the errors that can arise when using other methods, such as the NEWLEVELS
function.
The original stratum factor is specified using the OLDFACTOR
option, and the corresponding new factor is saved using the NEWFACTOR
option. The MERGELABELS
parameter supplies a text containing the two or more stratum labels to merge from the OLDFACTOR
. The NEWLABEL
parameter supplies the name of the merged stratum for the NEWFACTOR
. The NEWLABEL
can be set to an existing label of OLDFACTOR
, but only if it is also included in the list of MERGELABELS
.
Printed output is controlled by the PRINT
option, using the following settings:
summary |
summary of merges, |
---|---|
intable |
table of counts for original factor, |
outtable |
table of counts for merged factor, and |
twoway |
two-way table of counts for original and merged factors. |
By default, the summary is printed.
Options: PRINT
, OLDFACTOR
, NEWFACTOR
.
Parameters: MERGELABELS
, NEWLABEL
.
Method
SVMERGE
uses the FACMERGE
procedure.
Action with RESTRICT
The merging process ignores any restrictions but, when this has been completed, any restriction on OLDFACTOR
is applied to NEWFACTOR
.
See also
Procedures: SVSTRATIFIED
, SVTABULATE
, FACMERGE
.
Commands for: Survey analysis.
Example
CAPTION 'SVMERGE example'; STYLE=meta SPLOAD [PRINT=*] '%GENDIR%/Data/fbs_England_merged.gsh' " a single merge " TEXT [VALUES='Part-time','Small'] oldlab TEXT [VALUES='Part-time/small'] newlab SVMERGE [PRINT=summary,twoway; OLDFACTOR=farmsize; NEWFACTOR=size2]\ MERGELABELS=oldlab; NEWLABEL=newlab " two simultaneous merges " TEXT [VALUES='Large','Very large'] oldlab2 TEXT [VALUES='(Very) large'] newlab2 SVMERGE [PRINT=summary, twoway; OLDFACTOR=farmsize; NEWFACTOR=size3]\ MERGELABELS=oldlab,oldlab2; NEWLABEL=newlab,newlab2