📄 biplot.hlp
字号:
{smcl}
{* *! version 1.0.0 16jun2005}{...}
{cmd:help biplot} {right:dialog: {bf:{dialog biplot}}}
{hline}
{title:Title}
{p2colset 5 20 22 2}{...}
{p2col :{hi:[MV] biplot} {hline 2}}Biplots{p_end}
{p2colreset}{...}
{title:Syntax}
{phang2}
{cmd:biplot}
{varlist}
{ifin}
[{cmd:,} {it:options} ]
{synoptset 24 tabbed}{...}
{synopthdr}
{synoptline}
{syntab:Main}
{synopt:{opt dim(# #)}}two dimensions to be displayed; default
{cmd:dim(2 1)}{p_end}
{synopt:{opt std}}use standardized instead of centered variables{p_end}
{synopt:{opt alp:ha(#)}}row weight={it:#}; column weight=1-{it:#}; default
is 0.5{p_end}
{synopt:{opt mah:alanobis}}approximate Mahalanobis distance; implies
{cmd:alpha(0)}{p_end}
{synopt:{opt st:retch(#)}}stretch the column (variable) arrows{p_end}
{synopt:{opt norow}}suppress row points{p_end}
{synopt:{opt nocol:umn}}suppress column arrows{p_end}
{synopt:{opt xneg:ate}}negate the data relative to the {it:x}-axis{p_end}
{synopt:{opt yneg:ate}}negate the data relative to the {it:y}-axis{p_end}
{synopt:{opt negc:ol}}include negative column (variable) arrows{p_end}
{synopt:{opt auto:aspect}}adjust aspect ratio based on the data; default
aspect ratio is 1{p_end}
{synopt:{opt sep:arate}}produce separate plots for rows and columns{p_end}
{synopt:{opt nog:raph}}suppress graph{p_end}
{synopt:{opt tab:le}}display tables with biplot coordinates{p_end}
{syntab:Rows}
{synopt:{opt row:opts(row_options)}}affect rendition of rows (observations){p_end}
{syntab:Columns}
{synopt:{opt col:opts(col_options)}}affect rendition of columns (variables){p_end}
{synopt:{opt negcol:opts(col_options)}}affect rendition of negative columns (variables){p_end}
{syntab:Y-Axis, X-Axis, Title, Caption, Legend, Overall}
{synopt:{it:{help twoway_options}}}any options other than {opt by()} documented in
{bind:{bf:[G] {it:twoway_options}}}{p_end}
{synoptline}
{synopthdr:row_options}
{synoptline}
{syntab:Rows}
{synopt:{opt nolabel}}remove the default row (observation) label from the graph{p_end}
{synopt:{opt name(name)}}override the default name given to rows (observations){p_end}
{synopt:{it:{help marker_options}}}change look of markers (color, size, etc.){p_end}
{synopt:{it:{help marker_label_options}}}change look or position of marker labels{p_end}
{synoptline}
{synopthdr:col_options}
{synoptline}
{syntab:Columns}
{synopt:{opt nolabel}}remove the default column (variable) label from the graph{p_end}
{synopt:{opt name(name)}}override the default name given to columns (variables){p_end}
{synopt:{it:{help twoway_pcarrow:pcarrow_options}}}affect the rendition of paired-coordinate arrows{p_end}
{synoptline}
{p2colreset}{...}
{title:Description}
{pstd}
{cmd:biplot} displays a two-dimensional biplot of a dataset. A biplot
simultaneously displays the observations (rows) and the relative positions of
the variables (columns). Marker symbols (points) are displayed for
observations and arrows are displayed for variables. Observations are
projected to two dimensions such that the distance between the observations is
approximately preserved. The cosine of the angle between arrows approximates
the correlation between the variables.
{title:Options}
{dlgtab:Main}
{phang}{opt dim(# #)}
identifies the dimensions to be displayed. For instance, {cmd:dim(3 2)}
plots the third dimension (vertically) versus the second dimension
(horizontally). The dimension numbers cannot exceed the number of variables.
The default is {cmd:dim(2 1)}.
{phang}{opt std}
produces a biplot of the standardized variables instead of the centered
variables.
{phang}{opt alpha(#)}
specifies that the variables are scaled by lambda^{it:#} and the observations
by lambda^(1-{it:#}), where lambda are the singular values. It is required
that 0 <= {it:#} <= 1. The most common values are 0, 0.5, and 1. The default
is {cmd:alpha(0.5)}, and is known as the symmetrically scaled biplot or
symmetric factorization biplot. The result with {cmd:alpha(1)} is the
principal component biplot also called the RPM (row preserving metric) biplot.
The biplot with {cmd:alpha(0)} is referred to as the CPM (column preserving
metric) biplot.
{phang}{opt mahalanobis}
implies {cmd:alpha(0)} and additionally scales the positioning of points
(observations) by sqrt(n-1) and positioning of arrows (variables) by
1/sqrt(n-1). This additional scaling causes the distances between
observations to change from being approximately proportional to the
Mahalanobis distance to instead being approximately equal to the Mahalanobis
distance. Also, the inner products between variables approximate their
covariance.
{phang}{opt stretch(#)}
causes the length of the arrows to be multiplied by {it:#}. {cmd:stretch(1)}
would leave the arrows the same length, {cmd:stretch(2)} would double their
length, and {cmd:stretch(0.5)} would halve their length.
{phang}{opt norow}
suppresses plotting of row points.
{phang}{opt nocolumn}
suppresses plotting of column arrows.
{phang}{opt xnegate}
specifies that dimension-one ({it:x}-axis) values are to be negated
(multiplied by negative one).
{phang}{opt ynegate}
specifies that dimension-two ({it:y}-axis) values are to be negated
(multiplied by negative one).
{phang}{opt negcol}
includes negative column (variable) arrows on the plot.
{phang}{opt autoaspect}
specifies that the aspect ratio is to be automatically adjusted based on the
range of the data to be plotted. This option can make some biplots more
readable. By default, {cmd:biplot} uses an aspect ratio of one, producing a
square plot. Some biplots will have little variation in the {it:y}-axis
direction, and use of the {opt autoaspect} option will better fill the
available graph space while preserving the equivalence of distance in the
{it:x}- and {it:y}-axes.
{pmore}
As an alternative to {opt autoaspect}, the {it:twoway_option}
{help aspect_option:aspectratio()} can be used to override the default
aspect ratio. {cmd:biplot} accepts the {cmd:aspectratio()} option as a
suggestion only, and will override
it when necessary to produce plots with balanced axes, i.e., distance on the
{it:x}-axis equals distance on the {it:y}-axis.
{pmore}
{it:{help twoway_options}} such as {cmd:xlabel()},
{cmd:xscale()}, {cmd:ylabel()}, and {cmd:yscale()} should be used with
caution. These options are accepted, but may have unintended side effects on
the aspect ratio.
{phang}{opt separate}
produces separate plots for the row and column categories.
The default is to overlay the plots.
{phang}{opt nograph}
suppresses displaying the graph.
{phang}{opt table}
displays tables with the biplot coordinates.
{dlgtab:Rows}
{phang}{opt rowopts(row_options)}
affect the rendition of the points plotting the rows (observations). The
following {it:row_options} are allowed:
{phang2}
{opt nolabel}
removes the the default row label from the graph.
{phang2}
{opt name(name)}
overrides the default name given to rows.
{phang2}
{it:marker_options}
affect the rendition of markers drawn at the plotted points, including
their shape, size, color, and outline; see {it:{help marker_options}}.
{phang2}
{it:marker_label_options}
specify if and how the markers are to be labeled; see
{it:{help marker_label_options}}.
{dlgtab:Columns}
{phang}{opt colopts(col_options)}
affect the rendition of the arrows and points plotting the columns
(variables). The following {it:col_options}
are allowed:
{phang2}
{opt nolabel}
removes the default column label from the graph.
{phang2}
{opt name(name)}
overrides the default name given to columns.
{phang2}
{it:pcarrow_options}
affect the rendition of paired-coordinate arrows; see
{it:{help twoway_pcarrow:pcarrow_options}}.
{phang}{opt negcolopts(col_options)}
affect the rendition of the arrows and points plotting the negative
columns (variables). The {it:col_options} allowed are given above.
{dlgtab:Y-Axis, X-Axis, Title, Caption, Legend, Overall}
{phang}{it:twoway_options}
are any of the options documented in {it:{help twoway_options}} excluding
{cmd:by()}. See {opt autoaspect} above for a warning against using options
such as {cmd:xlabel()}, {cmd:xscale()}, {cmd:ylabel()}, and {cmd:yscale()}.
{title:Examples}
{phang}{cmd:. biplot v1 v2 v3 v4}
{phang}{cmd:. biplot composition-expression, alpha(1) stretch(10) table}
{cmd:rowopts(name(painter) mlabel(painter))}
{cmd:colopts(name(attribute))}
{cmd:title(Renaissance painters and their descriptions)}
{phang}{cmd:. biplot mpg-gear if foreign, std}
{phang}{cmd:. biplot mpg-gear if foreign, std dim(3 2)}
{phang}{cmd:. biplot mpg-gear if foreign, std rowopts(nolabel name(Obs.) msymbol(triangle))}
{phang}{cmd:. biplot mpg-gear if foreign, std colopts(alcolor(red))}
{phang}{cmd:. biplot mpg trunk turn, negcol negcolopts(alcolor(red))}
{title:Also see}
{psee}
Manual: {bf:[MV] biplot}
{psee}
Online: {helpb ca}, {helpb mds}, {helpb pca}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -