⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pca.hlp

📁 是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到
💻 HLP
📖 第 1 页 / 共 2 页
字号:
displays the PCA results in a matrix/table style.  You can specify {cmd:novce}
during estimation in combination with {cmd:vce(normal)}.  More likely, you
will want to use {cmd:novce} during replay.

{phang}{opt means}
displays summary statistics of the variables over the estimation sample.
This option is not available with {cmd:pcamat}.

{dlgtab:Advanced}

{phang}{opt tol(#)}
is an advanced, rarely used option and is available only in combination with
{cmd:vce(normal)}.  An eigenvalue {it:ev_i} is classified as being close-to-zero
if {bind:{it:ev_i} < {it:tol} * max({it:ev})}.  Two eigenvalues {it:ev_1} and
{it:ev_2} are "close" if {bind:abs({it:ev_1}-{it:ev_2}) < tol*max({it:ev})}.
The default is {cmd:tol(1e-5)}. See option {cmd:ignore} and
{help pca##remarks:Remarks} below.

{phang}{opt ignore}
is an advanced, rarely used option and is available only in combination with
{cmd:vce(normal)}.  It continues the computation of standard errors and tests
even if some eigenvalues are suspiciously close to 0 or suspiciously close to
other eigenvalues, violating crucial assumptions of the asymptotic theory used
to estimate standard errors and tests.  See {help pca##remarks:Remarks} below.

{pstd}
The following option is available with {cmd:pca} and {cmd:pcamat} but is not
shown in the dialog box:

{phang}{opt norotated}
displays the unrotated principal components even if rotated components are
available.  This option may only be specified when replaying results.


{title:Options unique to pcamat}

{dlgtab:Model}

{phang}{opt shape(shape_arg)}
specifies the shape (storage mode) for the covariance or correlation
matrix {it:matname}.  The following shapes are supported:

{p 8 12 2}{cmd:full} specifies that the correlation or covariance structure
of k variables is stored as a symmetric k x k matrix.  Specifying
{cmd:shape(full)} is optional in this case.

{p 8 12 2}{cmd:lower} specifies that the correlation or covariance
structure of k variables is stored as a vector with k(k+1)/2 elements
in rowwise lower-triangular order:

{p 16 20 2}
C(11) C(21) C(22) C(31) C(32) C(33) ... C(k1) C(k2) ... C(kk)

{p 8 12 2}{cmd:upper} specifies that the correlation or covariance
structure of k variables is stored as a vector with k(k+1)/2 elements
in rowwise upper-triangular order:

{p 16 20 2}
C(11) C(12) C(13) ... C(1k) C(22) C(23) ... C(2k) ...
C(k-1 k-1) C(k-1 k) C(kk)

{phang}{opt names(namelist)}
specifies a list of k different names, which are used to document output and
to label estimation results and are used as variable names by {cmd:predict}.
By default, {cmd:pcamat} verifies that the row and column names of
{it:matname} and the column or row names of {it:matname2} and {it:matname3}
from the {opt sds()} and {opt means()} options are in agreement.  Using the
{opt names()} option turns off this check.

{phang}{opt n(#)}
is required and specifies the number of observations.

{phang}{opt sds(matname2)}
specifies a k x 1 or 1 x k matrix with the standard deviations of the
variables.  The row or column names should match the variable names unless
the {opt names()} option is specified.  {cmd:sds()} may only be specified if
{it:matname} is a correlation matrix.

{phang}{opt means(matname3)}
specifies a k x 1 or 1 x k matrix with the means of the variables.  The row or
column names should match the variable names unless the {opt names()} option
is specified.  Specify {cmd:means()} if you have variables in your dataset and
want to use {cmd:predict} after {cmd:pcamat}.


{marker remarks}{...}
{title:Remarks}

    {bf:Technical Note:}

{pstd}
{cmd:pca} and {cmd:pcamat} with the {cmd:vce(normal)} option assume that

{p 8 13 2}
(A1) the variables are multivariate normal distributed, and

{p 8 13 2}
(A2) the variance-covariance matrix of the observations has all distinct
and strictly positive eigenvalues.

{pstd}
Under assumptions A1 and A2, the eigenvalues and eigenvectors of the sample
covariance matrix can be seen as maximum likelihood estimates for the
population analogues and they are asymptotically (multivariate) normal
distributed.  Be cautious in interpreting since
the asymptotic variances are rather sensitive to violations of assumption A1
(and A2).  Wald tests of hypotheses that are in conflict with assumption A2
(e.g., testing that the first and second eigenvalue are the same) produce
incorrect p-values.

{pstd}
Because the statistical theory for a PCA of a correlation matrix is much more
complicated, {cmd:pca} and {cmd:pcamat} compute standard errors and tests of a
correlation matrix as if it were a covariance matrix.  This will usually lead
to some underestimation of standard errors, but we believe that this problem
is smaller than the consequences of deviations from normality.

{pstd}
We suggest that you conduct tests for marginal normality of the variables (see
{helpb sktest} and {helpb swilk}), but recall that marginal normality does not
imply multivariate normality.


{title:Examples}

    Standard PCA for descriptive use

{tab}{cmd:. pca trunk weight length headroom}
{tab}{cmd:. pca trunk weight length headroom, comp(2) covariance}

    PCA assuming multivariate normality of the data

{tab}{cmd:. pca x1-x4, comp(1) vce(normal)}
{tab}{cmd:. test [Comp1]x1 = [Comp1]x2 = [Comp1]x3 = [Comp1]x4}

    After estimation of PCA (see {help pca postestimation})

{tab}{cmd:. predict s1 s2, score}
{tab}{cmd:. predict q, qstd}

{tab}{cmd:. estat residual}

{tab}{cmd:. rotate, quartimax}

{tab}{cmd:. screeplot, ci(normal)}

    PCA of a covariance or correlation matrix

        First enter the covariance matrix and set the rownames

{space 12}{cmd:. matrix S = ( 10.167, 22.690,  2.040  \ ///}
{space 12}{cmd:               22.690, 56.949,  3.788  \ ///}
{space 12}{cmd:                2.040,  3.788,  0.688  ) }

{p 12 20 2}
{cmd:. matrix rownames S = visual hearing taste}

{pmore}
Note that elements within a row are separated by a comma, rows are
separated by a backslash {cmd:\}, and {cmd:///} continues lines.
Next invoke {cmd:pcamat}, with the number of observations as {cmd:n()},

{p 12 20 2}
{cmd:. pcamat S, n(979) comp(2)}

{pmore}
Equivalently, one may just enter the upper triangle of the covariance
matrix {cmd:S} as a vector, i.e., a matrix with one row or column

{space 12}{cmd:. matrix S = ( 10.167, 22.690, 2.040, ///}
{space 12}{cmd:                       56.949, 3.788, ///}
{space 12}{cmd:                               0.688 )}

{pmore}
Note that all elements are separated by a comma; indentation and the use of
three lines are just done for checking input.  One might just as well have
typed

{p 12 23 2}
{cmd:. matrix S = ( 10.167, 22.690, 2.040, 56.949, 3.788, 0.688 )}

{pmore}
Next, we use {cmd:pcamat}, specifying the storage model {cmd:shape(upper)}
and the variable names via the option {cmd:names()}

{p 12 20 2}
{cmd:. pcamat S, n(979) shape(upper) comp(2) names(visual hearing taste)}


{title:Also see}

{psee}
Manual: {bf:[MV] pca}

{psee}
Online:  {help pca postestimation};{break}
{helpb alpha},
{helpb canon},
{helpb factor},
{helpb sktest},
{helpb swilk},
{helpb tetrachoric}
{p_end}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -