Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Principal component analysis

    Hi,
    I am using panel data for my study. I want to use principal component analysis (PCA). As a read few article related to it, I come to know that the PCA will be a effective only when the nature of the variable is interval or ratio. Since the variable I am using in my analysis are categorical variable (ordered and dichotomous variable both). So using PCA will be not efficient in that scenario. After I go through with some literature, I come to know about categorical principal component analysis or nonlinear PCA. I does not get more information related to categorical principal component analysis in STATA. Kindly guide me further how to perform categorical principal component analysis in STATA or there is any other method I can use for my analysis??

  • #2
    Unfortunately, you're likely better off with Python here. Stata's PCA capabilities are rather limited, in my opinion.


    Note that I don't use PCA often, so perhaps there's a better way I don't know of.

    Comment


    • #3
      Might try something like this.
      Code:
      polychoric x1 x2 x3 x4 
      matrix r = r(Rho)
      scalar nobs = r(N)
      factormat r , n(`=scalar(nobs)')  pcf factors(1) forcepsd

      Comment


      • #4
        Thank you Mr. Ford and Mr. Greathouse for reply. I tried the command mentioned by Mr. Ford, But it showing error "matrix r has missing values" while running the last command (factormat r). Sir is there any other method available in STATA apart from categorical principal component analysis? I am having 32 binary and ordinal variables, so if there is any other method, which I can use to make different factor. Kindly suggest me.

        Thanking You

        Comment

        Working...
        X