Announcement

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

  • -ffind- requires generate()?

    I am using Stata 16.0. Please see the error message below when I use ffind. It is strange as the option generate() is not mentioned anywhere in the help file. The command and help file are available from the link below.

    https://sites.google.com/site/judsoncaskey/data

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input int sic
    3829
    6531
    6726
    7374
    2836
    end
    . ffind sic, newvar(ffi12) type(12)
    option generate() required
    r(198);


  • #2
    ffind appears to be a command from https://sites.google.com/site/judsoncaskey/data Please note the request in the FAQ Advice



    If you are using community-contributed (also known as user-written) commands, explain that and say where they came from: the Stata Journal, SSC, or other archives. This helps (often crucially) in explaining your precise problem, and it alerts readers to commands that may be interesting or useful to them.
    I suggest that you keep a log and go

    Code:
    set trace on 
    set traced 1 
    before you run ffind and show us where it fails.

    Comment


    • #3
      Actually, when I download ffiind.ado from the link given above, I cannot reproduce the error.

      However, when I look further down the list of results of a search for "stata ffind.ado" using DuckDuckGo (my preferred search engine) I find that a version of ffind.ado is hosted at

      https://gist.github.com/mgao6767/56e...5ce4a33f421d2f

      and an inspection of the code shows that the newvar() option was renamed as the generate() option. This version credits the original source, with modification by Malcolm Wardlaw in 2011, but the github site is hosted by yet a third person.

      A comparison of the two versions shows that replacing newvar with generate, and allowing the generate and type options to be abbreviated to as little as g and t, apparently constitute the only changes.
      Last edited by William Lisowski; 09 Jul 2019, 14:26.

      Comment


      • #4
        Thanks Nick, William.

        I can confirm that using generate() instead of newvar() solves the issue. In hindsight, I should have experimented with it myself before posting the question. Thanks also for introducing me to a new search engine.

        Nick, for the future, I would like to know how I should have cited the reference as I am not clear from the FAQ Advice you sent.

        Comment


        • #5
          Profound apologies. There in #1 you did exactly what we ask in explaining provenance of the code. So I have no idea why I didn't see that. My best guess is that I was writing a reply when part of your post was off-screen but even then I just didn't read the post carefully enough, Sorry!

          Comment

          Working...
          X