Announcement

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

  • Discriminate analysis using stata

    Hello everyone ;
    i need to apply 'Discriminate analysis' on stata , how can i apply it and get both the standardized and unstandardized Discriminate function coefficients with structure matrix
    I'm supposed to do like the pic
    Attached Files

  • #2
    The discrim command seems likely to be what you need to use, and reading the output of help discrim should start you along your path.

    Comment


    • #3
      I have tried all option under Discriminate analysis menu they only show the "prirors"

      Comment


      • #4
        One of the features of Stata is that the estimation commands (like discrim lda if you were using linear discriminant analysis) are accompanied by "postestimation" commands that give additional results.

        It appears you are using Stata's menus do to your analysis. So - assuming you were doing linear discriminant analysis - you started by clicking Statistics > Multivariate Analysis > Discriminant Analysis > Linear (LDA) to run your discriminant analysis. Then the next thing you do is click Statistics > Postestimation which takes you to the menu of postestimation commands relevant to the estimation command.

        Below is an example using the Stata commands directly to achieve the results that you will get by using Stata's menus to create the commands.
        Code:
        . sysuse auto, clear
        (1978 Automobile Data)
        
        . discrim lda weight length mpg, group(foreign) notable
        
        . estat loadings, standardized unstandardized
        
        Canonical discriminant function coefficients
        
                         | function1
            -------------+-----------
                  weight |  .0016967
                  length |  .0155535
                     mpg |  .0921333
                   _cons | -10.00831
        
        Standardized canonical discriminant function coefficients
        
                         | function1
            -------------+-----------
                  weight |  1.069307
                  length |  .2864726
                     mpg |  .4934496
        
        . estat structure
        
        Canonical structure
        
                         | function1
            -------------+-----------
                  weight |  .9500428
                  length |  .8957762
                     mpg | -.5522397
        
        .
        The following help commands give Stata's documentation.
        Code:
        help discrim
        help discrim lda
        help discrim lda postestimation
        but in the output of help discrim you can just click on "discrim lda" to see its help file, and from that you can just click on "discrim lda postestimation" to see the postestimation commands and their documentation.
        Last edited by William Lisowski; 01 Jan 2020, 12:36.

        Comment


        • #5
          I can't thank you enough, that's helpt a lot

          Comment

          Working...
          X