📄 pca_postestimation.hlp
字号:
{smcl}
{* 06apr2005}{...}
{cmd:help pca postestimation} {...}
{right:dialogs: {bf:{dialog pca_p:predict} {dialog pca_estat:estat} {dialog rotate:rotate}}{space 10} }
{right:{bf:{dialog loadingplot} {dialog scoreplot} {dialog screeplot}}}
{right:also see: {bf:{helpb pca}}{space 30}}
{hline}
{title:Title}
{p 4 33 2}
{hi:[MV] pca postestimation} {hline 2} Postestimation tools for {cmd:pca} and
{cmd:pcamat}
{title:Description}
{pstd}
The following postestimation commands are of special interest after
{cmd:pca} and {cmd:pcamat}:
{synoptset 22 tabbed}{...}
{p2coldent:command}description{p_end}
{synoptline}
{synopt:{helpb pca postestimation##anti:estat anti}}anti-image correlation and
covariance matrices{p_end}
{synopt:{helpb pca postestimation##kmo:estat kmo}}Kaiser-Meyer-Olkin measure
of sampling adequacy{p_end}
{synopt:{helpb pca postestimation##loadings:estat loadings}}component loading
matrix in one of several normalizations{p_end}
{synopt:{helpb pca postestimation##residuals:estat residuals}}matrix of
correlation or covariance residuals{p_end}
{synopt:{helpb pca postestimation##rotatecomp:estat rotatecompare}}compare
rotated and unrotated components{p_end}
{synopt:{helpb pca postestimation##smc:estat smc}}squared multiple
correlations between each variable and the rest{p_end}
{p2coldent:+ {helpb pca postestimation##summarize:estat summarize}}display
summary statistics over the estimation sample{p_end}
{synopt:{helpb scoreplot:loadingplot}}plot component loadings{p_end}
{synopt:{helpb rotate}}rotate component loadings{p_end}
{synopt:{helpb scoreplot}}plot score variables{p_end}
{synopt:{helpb screeplot}}plot eigenvalues{p_end}
{synoptline}
{p2colreset}{...}
{p 4 6 2}
+ Not available after {cmd:pcamat}.
{p_end}
{pstd}
In addition, the following standard postestimation commands are available:
{synoptset 22 tabbed}{...}
{p2coldent:command}description{p_end}
{synoptline}
{p2coldent:+ {helpb estat}}examine the VCE matrix{p_end}
INCLUDE help post_estimates
{p2coldent:* {helpb lincom}}point estimates, standard errors, testing, and
inference for linear combinations of coefficients{p_end}
{p2coldent:* {helpb nlcom}}point estimates, standard errors, testing, and
inference for nonlinear combinations of coefficients{p_end}
{synopt:{helpb pca postestimation##predict:predict}}score variables,
predictions, and residuals{p_end}
{p2coldent:* {helpb predictnl}}point estimates, standard errors, testing, and
inference for generalized predictions{p_end}
{p2coldent:* {helpb test}}Wald tests for simple and composite linear
hypotheses{p_end}
{p2coldent:* {helpb testnl}}Wald tests of nonlinear hypotheses{p_end}
{synoptline}
{p2colreset}{...}
{p 4 6 2}
+ Available after both {cmd:pca} and {cmd:pcamat} with the {cmd:vce(normal)}
option.
{p_end}
{p 4 6 2}
* Available only after {cmd:pca} with the {cmd:vce(normal)} option.
{p_end}
{title:Special-interest postestimation commands}
{pstd}
{cmd:estat anti}
displays the anti-image correlation and anti-image covariance matrices. These
are minus the partial covariance and minus the partial correlation of all
pairs of variables, holding all other variables constant.
{pstd}
{cmd:estat kmo}
displays the Kaiser-Meyer-Olkin measure of sampling adequacy. KMO takes
values between 0 and 1, with small values indicating that overall the
variables have too little in common to warrant a factor analysis.
Heuristically, the following labels are often given to values of KMO,
0.00 to 0.49 unacceptable
0.50 to 0.59 miserable
0.60 to 0.69 mediocre
0.70 to 0.79 middling
0.80 to 0.89 meritorious
0.90 to 1.00 marvelous
{pstd}
{cmd:estat loadings}
displays the component loading matrix in one of several normalizations of the
columns (eigenvectors).
{pstd}
{cmd:estat residuals}
displays the difference between the observed correlation or covariance matrix
and the fitted (reproduced) matrix using the retained factors.
{pstd}
{cmd:estat rotatecompare}
displays the unrotated (principal) components next to the most recent rotated
components.
{pstd}
{cmd:estat smc}
displays the squared multiple correlations between each variable and all other
variables. SMC is a theoretical lower bound for communality, and so an upper
bound for the unexplained variance.
{pstd}
{cmd:estat summarize}
displays summary statistics of the variables in the principal component
analysis over the estimation sample. This subcommand is not available after
{cmd:pcamat}.
{pstd}
{cmd:rotate}
rotates the loading matrix {cmd:e(L)}, the columns of which are the retained
components. The total variance explained by the rotated components is the
same as the variance explained by the unrotated (principal) components, but
distributed differently over the components. See {helpb rotate} for details.
{marker predict}{...}
{title:Syntax for predict}
{p 8 16 2}
{cmd:predict} {dtype} {newvar:list} {ifin}
[{cmd:,} {it:statistic} {it:options} ]
{synoptset 21 tabbed}{...}
{p2coldent:statistic {space 3} {sf:# vars}}description
({it:k} = # orig vars; {it:f} = # components){p_end}
{synoptline}
{syntab:Main}
{synopt:{opt sc:ore} {space 5} 1,...,{it:f}}scores based on the components; the
default{p_end}
{synopt:{opt f:it} {space 7} {it:k}}fitted values using the retained
components{p_end}
{synopt:{opt res:idual} {space 2} {it:k}}raw residuals from the fit using the
retained components{p_end}
{synopt:{opt q} {space 9} 1}residual sum of squares{p_end}
{synoptline}
{synopthdr}
{synoptline}
{syntab:Main}
{synopt:{opt norot:ated}}use unrotated results, even when rotated results
are available{p_end}
{synopt:{opt cen:ter}}base scores on centered variables{p_end}
{synopt:{opt notab:le}}suppress table of scoring coefficients{p_end}
{synopt:{opth for:mat(%fmt)}}format for displaying the scoring
coefficients{p_end}
{synoptline}
{p2colreset}{...}
{title:Options for predict}
{pstd}
Note on {cmd:pcamat}: {cmd:predict} requires that variables with the correct
names be available in memory. Apart from centered scores, {opt means()}
should have been specified with {cmd:pcamat}. If you used {cmd:pcamat}
because you only have access to the correlation or covariance matrix, you
cannot use {cmd:predict}.
{dlgtab:Main}
{phang}
{opt score} calculates the scores for components 1, ..., {it:#}, where
{it:#} is the number of variables in {it:newvarlist}.
{phang}
{opt fit} calculates the fitted values, using the retained components, for
each of the variables. The number of variables in {it:newvarlist} should
equal the number of variables in the {it:varlist} of {helpb pca}.
{phang}
{opt residual} calculates for each of the variables the raw residuals
(residual = observed - fitted), with the fitted values computed using the
retained components.
{phang}
{opt q} calculates the Rao-statistics (i.e., the sum of squares of the omitted
components) weighted by the respective eigenvalues. This equals the residual
sum of squares between the original variables and the fitted values.
{phang}
{opt norotated}
uses unrotated results, even when rotated results are available.
{phang}
{opt center}
bases scores on centered variables. This option is only relevant for a PCA of
a covariance matrix, in which the scores are based on uncentered variables
by default. Scores for a PCA of a correlation matrix are always based on the
standardized variables.
{phang}
{opt notable}
suppresses the table of scoring coefficients.
{phang}
{opt format(%fmt)}
specifies the display format for scoring coefficients. The default is
{cmd:format(%8.4f)}.
{title:Syntax for estat}
{marker anti}{...}
{pstd}
Display the anti-image correlation and covariance matrices
{p 8 14 2}
{cmd:estat} {cmd:anti}
[{cmd:,} {opt nocorr} {opt nocov} {opth for:mat(%fmt)} ]
{marker kmo}{...}
{pstd}
Display the Kaiser-Meyer-Olkin measure of sampling adequacy
{p 8 14 2}
{cmd:estat} {cmd:kmo}
[{cmd:,} {opt nov:ar} {opth for:mat(%fmt)} ]
{marker loadings}{...}
{pstd}
Display the component-loading matrix
{p 8 14 2}
{cmd:estat} {cmdab:loa:dings}
[{cmd:,} {cmdab:cn:orm(}{cmdab:u:nit}|{cmdab:e:igen}|{cmdab:i:nveigen}{cmd:)}
{opth for:mat(%fmt)} ]
{marker residuals}{...}
{pstd}
Display the differences in matrices
{p 8 14 2}
{cmd:estat} {cmdab:res:iduals}
[{cmd:,} {opt o:bs} {opt f:itted} {opth for:mat(%fmt)} ]
{marker rotatecomp}{...}
{pstd}
Display the unrotated and rotated components
{p 8 14 2}
{cmd:estat} {cmdab:rot:atecompare} [{cmd:,} {opth for:mat(%fmt)} ]
{marker smc}{...}
{pstd}
Display the squared multiple correlations
{p 8 14 2}
{cmd:estat} {cmd:smc} [{cmd:,} {opth for:mat(%fmt)} ]
{marker summarize}{...}
{pstd}
Display the summary statistics
{p 8 14 2}
{cmd:estat} {cmdab:su:mmarize}
[{cmd:,} {opt l:abel} {opt nohea:der} {opt nowei:ghts}]
{title:Options for estat}
{dlgtab:Main}
{phang}
{opt nocorr},
an option of {cmd:estat anti}, suppresses the display of the anti-image
correlation matrix, i.e., minus the partial correlation matrix of all pairs
of variables, holding constant all other variables.
{phang}
{opt nocov},
an option of {cmd:estat anti}, suppresses the display of the anti-image
covariance matrix, i.e., minus the partial covariance matrix of all pairs of
variables, holding constant all other variables.
{phang}
{opt format(%fmt)}
specifies the display format. The defaults differ between the subcommands.
{phang}
{opt novar},
an option of {cmd:estat kmo},
suppresses the Kaiser-Meyer-Olkin measures of sampling adequacy for the
variables in the principal component analysis, displaying the overall KMO
measure only.
{phang}
{cmd:cnorm(unit}|{cmd:eigen}|{cmd:inveigen)},
an option of {cmd:estat loadings}, selects the normalization of the
eigenvectors, the columns of the principal-component loading matrix. The
following normalizations are available,
{p 12 24 2}{cmd:unit} {space 6} ssq(column) = 1 (default){p_end}
{p 12 24 2}{cmd:eigen} {space 5} ssq(column) = eigenvalue{p_end}
{p 12 24 2}{cmd:inveigen} {space 2} ssq(column) = 1/eigenvalue
{pmore}
with ssq(column) the sum-of-squares of the elements in a column, and
eigenvalue the eigenvalue associated with the column (eigenvector).
{phang}
{opt obs},
an option of {cmd:estat residuals}, displays the observed correlation or
covariance matrix for which the PCA was performed.
{phang}
{opt fitted},
an option of {cmd:estat residuals}, displays the fitted (reconstructed)
correlation or covariance matrix based on the retained components.
{phang}
{opt label}, {opt noheader}, and {opt noweights}
are the same as for the generic {cmd:estat summarize} command; see
{helpb estat}.
{title:Examples}
Statistics
{cmd:. estat res, fitted}
{cmd:. estat load, cnorm(eigen)}
{cmd:. estat vce}
Scree plot of the eigenvalues
{cmd:. screeplot, }
{cmd:. screeplot, ci(normal) }
Plots of component loadings and scores
{cmd:. loadingplot, comp(3)}
{cmd:. scoreplot, comp(3) mlabel(country)}
Rotation of loadings
{cmd:. rotate}
{cmd:. rotate, varimax}
{cmd:. rotate, oblimin(0.5) oblique}
Individual scores for the components are obtained via {cmd:predict}
{cmd:. predict f1}
{cmd:. predict f1 f2}
{cmd:. predict t, q}
{title:Also See}
{psee}
Manual: {bf:[MV] pca postestimation}
{psee}
Online: {helpb pca};{break}
{helpb rotate},
{helpb scoreplot},
{helpb screeplot}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -