📄 cluster_generate.hlp
字号:
{smcl}
{* 05apr2005}{...}
{bf:help cluster generate} {right:dialog: {bf:{dialog cluster_generate:cluster generate}}}
{hline}
{title:Title}
{p2colset 5 30 32 2}{...}
{p2col :{bf:[MV] cluster generate} {hline 2}}Generate summary and grouping variables from a cluster analysis{p_end}
{p2colreset}{...}
{title:Syntax}
INCLUDE help cluster_generate_optstab
{title:Description}
{pstd}
The {cmd:cluster generate} command generates summary or grouping variables
from a cluster analysis. What is produced depends on the function. See
{helpb cluster} for information on available cluster analysis commands.
{pstd}
The {cmd:groups(}{it:numlist}{cmd:)} function generates grouping variables,
giving the grouping for the specified numbers of clusters from a
hierarchical cluster analysis. If a single number is given,
{it:newvarname} is produced with group numbers going from 1 to the number of
clusters requested. If more than one number is specified, a new variable is
generated for each number using the provided {it:stub} name appended with the
number. For instance,
{center:{cmd:cluster gen xyz = groups(5/7), name(myclus)}}
{pstd}
creates variables {hi:xyz5}, {hi:xyz6}, and {hi:xyz7}, giving the five,
six, and seven groups obtained from the cluster analysis named {hi:myclus}.
{pstd}
The {cmd:cut(}{it:#}{cmd:)} function generates a grouping variable
corresponding to cutting the dendrogram (see {helpb cluster dendrogram})
of a hierarchical cluster analysis at the specified (dis)similarity value.
{pstd}
Additional {cmd:cluster generate} functions may be added; see
{help cluster programming}.
{title:Options}
{phang}
{cmd:name(}{it:clname}{cmd:)} specifies the name of the cluster
analysis to use in producing the new variables. The default is the latest
performed cluster analysis, which can be reset using the {cmd:cluster use}
command; see {help cluster utility}.
{phang}
{cmd:ties(}{cmd:error} | {cmd:skip} | {cmd:more} | {cmd:fewer}{cmd:)}
indicates what to do in the case of ties with the {cmd:groups()} function. A
hierarchical cluster analysis has ties when multiple groups are generated at a
particular (dis)similarity value. For example, you might have the case where
you can uniquely create two, three, and four groups, but the next possible
grouping produces eight groups due to ties.
{pmore}
{cmd:ties(error)}, the default, produces an error message and does not
generate the requested variables.
{pmore}
{cmd:ties(skip)} indicates that the offending requests are to be
ignored. No error message is produced, and only the requests that produce
unique groupings will be honored. With multiple values specified in the
{cmd:groups()} function, {cmd:ties(skip)} allows the processing of those
that produce unique groupings, ignoring the rest.
{pmore}
{cmd:ties(fewer)} produces the results for the largest number of groups
less than or equal to your request. In the example above with
{cmd:groups(6)} and using {cmd:ties(fewer)}, you would get the same result as
you would by using {cmd:groups(4)}.
{pmore}
{cmd:ties(more)} produces the results for the smallest number of groups
greater than or equal to your request. In the example above with
{cmd:groups(6)} and using {cmd:ties(more)}, you would get the same result as
you would by using {cmd:groups(8)}.
{title:Examples}
{phang}{cmd:. cluster generate g2 = groups(2), name(L2clnk)}{p_end}
{phang}{cmd:. cluster gen g2cut = cut(227.3)}{p_end}
{phang}{cmd:. cluster gen gp = gr(3/12), name(myclus)}{p_end}
{phang}{cmd:. cluster gen more4 = gr(4), ties(more)}{p_end}
{phang}{cmd:. cluster gen less4 = gr(4), ties(fewer)}{p_end}
{phang}{cmd:. cluster gen group = gr(4/20), ties(skip)}
{title:Also see}
{psee}
Manual: {bf:[MV] cluster generate}
{psee}
Online: {helpb cluster}, {helpb clustermat};
{helpb cluster averagelinkage},
{helpb cluster centroidlinkage},
{helpb cluster completelinkage},
{helpb cluster dendrogram},
{helpb cluster medianlinkage},
{helpb cluster notes},
{help cluster programming},
{helpb cluster singlelinkage},
{helpb cluster stop},
{help cluster utility},
{helpb cluster wardslinkage},
{helpb cluster waveragelinkage}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -