Merges strata prior to survey analysis (S.D. Langton).
|Controls printed output (
||Factor defining the original strata|
||Factor to save the merged strata|
||Labels of strata to merge|
||Label for merged stratum|
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
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
NEWLABEL parameter supplies the name of the merged stratum for the
NEWLABEL can be set to an existing label of
OLDFACTOR, but only if it is also included in the list of
Printed output is controlled by the
||summary of merges,|
||table of counts for original factor,|
||table of counts for merged factor, and|
||two-way table of counts for original and merged factors.|
By default, the summary is printed.
SVMERGE uses the
The merging process ignores any restrictions but, when this has been completed, any restriction on
OLDFACTOR is applied to
Commands for: Survey analysis.
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