Announcement

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

  • ssc install tostring error

    I am trying to produce summary statistics by year for a sample of variables using this code:

    sort filing_year issue_year

    ssc install asdoc
    bys filing_year: asdoc tabstat patent_num cpc scheme_code xi_nominal xi_real cites, replace stat(N mean sd min max)


    But, when I run the command I get this outcome: "command tostring is unrecognized"

    And when I try to install tostring using: "ssc install tostring"
    It gives me this error:
    ssc install: "tostring" not found at SSC, type search tostring
    (To find all packages at SSC that start with t, type ssc describe t)
    r(601);


    Can anyone help me?

    Thanks!

  • #2
    tostring is an official command added within version 8. It doesn't need to be installed. There has never been a version on SSC.

    However, I don't know why asdoc should give you this error.

    Comment


    • #3
      Thanks for your answer Nick.

      Could it be linked to the type of the year variable?

      describe filing_year

      storage display value
      variable name type format label variable label
      --------------------------------------------------------------------------------------------
      filing_year float %9.0g


      Thanks

      Comment


      • #4
        I don't see that as a problem. Still true that I have no idea why asdoc is apparently giving you this error. asdoc requires Stata 11, so tostring must be available in any version of Stata that would run asdoc.

        You can confirm that tostring is part of your Stata by asking outside of asdoc

        Code:
        help tostring
        If you can't see results from that, then your copy of Stata is corrupt somehow. Otherwise, you could try

        Code:
        set trace on 
        set tracedepth 1
        before running asdoc. You may need to bump up the trace depth. That would show where the command fails.

        Comment


        • #5
          Thanks Nick. Thanks for the answer.

          The aim of this code is to produce the summary statistics by year for a set of variables.
          Can I have guidance on how I could extrapolate the table in excel instead of word as I am not able in word for the above motivation?

          Thanks.

          Comment


          • #6
            You didn't answer any of the questions in #4.

            I am no kind of expert on export to Excel, so I leave that open.

            Comment


            • #7
              Thanks Nick,
              I have tried again and now I am able to run the original code without getting the error.

              Comment

              Working...
              X