Announcement

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

  • How to control the format to export discriminant analysis results to word by using asdoc ?

    Hello,

    I want to export the results of a discriminant analysis by using asdoc in stata.

    I want to show as follows.

    1. three Three Decimal Digits.
    2. compress the table to fit into a page of the word.

    However, the format of the results is horrible. I use dec(3) but not working. I read the "help asdoc" in Stata, but it all about regression.

    Does anyone know how to export the total results of discriminant analysis to Word with a nice format?

    Thank you in advance.

    The following is the sample code and asdoc code that I use.

    input area Revenue age child_number grocery_expense credit_card exercise_week social_week
    1 99336 76 1 22453 5 3 1
    1 59092 75 4 16995 6 1 3
    1 68614 49 0 37709 0 7 5
    1 84805 55 3 21642 0 3 1
    1 66138 41 3 10490 2 4 7
    1 90238 43 2 30254 5 6 4
    1 60466 49 2 18136 1 0 4
    1 46575 64 0 25053 6 6 7
    2 97811 40 4 36925 4 6 5
    2 61862 40 0 14480 5 5 6
    2 58071 73 0 24754 4 0 1
    2 42539 66 2 19903 3 1 6
    2 62074 56 3 12560 3 3 7
    2 71619 34 2 24523 6 3 6
    2 51281 74 2 23625 4 6 3
    3 40990 25 3 38943 4 7 4
    3 44567 73 2 39898 1 4 7
    3 73586 42 2 20159 0 2 3
    3 44907 44 3 31378 1 1 6
    3 79352 20 3 39968 6 6 1
    3 55647 50 1 27122 0 3 6
    3 80943 43 1 15177 2 7 4
    3 88892 77 2 22537 4 2 7
    4 91735 74 3 27505 0 5 2
    4 61224 60 5 12374 5 1 0
    4 72192 68 4 36817 2 6 1
    4 87486 59 0 34846 6 5 1
    4 53131 52 4 12584 5 1 1
    4 49083 33 5 30652 3 0 5
    4 47408 49 0 28938 1 6 0
    4 74647 52 2 15291 0 5 6
    5 81643 37 0 37993 2 4 2
    5 42371 46 1 33436 6 5 4
    5 74074 24 3 16618 5 6 7
    5 63502 34 3 19887 1 4 3
    5 86779 31 5 37290 6 3 4
    5 45842 45 5 20383 2 1 5
    5 59835 42 5 30708 4 2 1
    5 60486 38 2 36167 3 6 2
    5 49099 58 0 13157 4 3 7
    5 71692 37 5 36317 4 6 3
    5 91406 45 5 12451 5 7 1
    6 42742 48 1 39088 5 2 0
    6 54538 21 2 19657 0 7 3
    6 49323 69 4 37173 5 5 5
    6 50053 54 4 32193 2 7 7
    6 99139 48 1 14647 4 4 1
    6 97908 26 0 14319 6 1 4
    6 46504 27 1 39478 4 6 2
    6 92330 28 3 23676 1 3 0
    6 93926 34 3 10871 1 3 3
    6 81890 51 2 16914 1 0 1
    6 86679 79 1 35967 2 7 6
    6 43783 67 2 31009 2 5 0
    6 76770 66 5 13220 6 6 7
    6 91160 67 2 29346 6 0 3
    end

    asdoc candisc Revenue age child_number grocery_expense credit_card exercise_week social_week , group (area) dec(3)

    Last edited by Terence Tien; 22 Aug 2020, 07:05.

  • #2
    Cross-posted at https://stackoverflow.com/questions/...to-word-by-usi

    Please note our policy on cross-posting, which is that you should tell us about it.

    Comment


    • #3
      There is no specific routine for candisc in asdoc. In such a case, asdoc applies one of its generic routine and tries to make some table from the Stata output. If you have some format in which the analysis can be reported, we can use asdocx to make a clean table from candisc command.
      Regards
      --------------------------------------------------
      Attaullah Shah, PhD.
      Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
      FinTechProfessor.com
      https://asdocx.com
      Check out my asdoc program, which sends outputs to MS Word.
      For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

      Comment


      • #4
        Hello Nick. Thanks for the reminder. I will do that next time.

        Hello Attaullah. Thanks for the information.

        Comment

        Working...
        X