Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: downloading .ado file from personal directory

From   Katie Farrin <>
Subject   Re: st: downloading .ado file from personal directory
Date   Fri, 24 May 2013 22:08:22 -0400

Thanks very much, Sergiy and Dimitriy.  Your suggestions were very
helpful - I was able to get ivqreg in by taking the files only (not
the folder) to the personal file.

Unfortunately, now I'm having another problem with the code.  I've
looked at the command syntax but am still getting an error saying I am
trying to define a variable I have already created when I am actually
trying to indicate (according to the syntax) that the variable is
endogenous and I am instrumenting for it.  For example:

ivqreg ln_dietarydiversity male married hh_bus_profits tobacco_profits
tot_livestock_sales value_maize age_hh_head remit
> tances other_income (d_t = dist_urban_center), robust

When I run this code I get error "dhat already defined" - r(110).  I
know this program isn't from Stata so it might work differently than
Stata's other commands for IV regression (where you use the syntax
(varlist2 = varlist_iv)), but I can't figure out what I'm doing wrong.
 If anyone has experience with IV quantile regression and can point me
in the right direction that would be wonderful.

Thanks so much!

On Fri, May 24, 2013 at 6:11 PM, Dimitriy V. Masterov
<> wrote:
> I ran into this problem a while back. If you put the whole ivqrstata/
> folder into ~/ado/personal it will not work, but if you put the folder
> contents into ~/ado/personal, it should work nicely.
> On Fri, May 24, 2013 at 3:03 PM, Sergiy Radyakin <> wrote:
>> Katie,
>> it's best to let Stata install the programs for you using the way it
>> is designed:
>> net install foobar, from(foobarsite)
>> Not all authors provide their code in the format that would be
>> compatible for the above deployment. Stata's developers explained what
>> needs to be done here:
>> If you downloaded the files to your computer manually using a browser
>> (Internet Explorer, Firefox, Opera or something else) you are likely
>> to find the downloaded files in your user's download folder. If you
>> 'save-ed as..', then you need to recall where you've saved the files.
>> Once you know in which folder the files are placed on your computer
>> you need to tell Stata:
>> adopath ++ myfolder
>> e.g
>> adopath ++ C:\Users\Katie\Downloads\
>> If the distribution contained any *.mlib files you need to issue a command:
>> mata mata mlib index
>> The error message that you quote tells us that a command is
>> unrecognized. Stata however does not tell WHICH command it does not
>> recognize. This is not necessarily the same command you typed. It
>> could be that this command has DEPENDENCIES - other user-written
>> commands that it needs to function properly. This can be established
>> by either consulting the author, or more quickly by examining the
>> trace. See
>> You can also ask Stata:
>>  which commandname
>> (write the name of your command you type instead of commandname above).
>> If it tells
>> command commandname not found as either built-in or ado-file
>> then Stata does not SEE the command implementation file, otherwise it
>> will show the path where the file is located and it is a dependency
>> problem.
>> See for details
>> Best, Sergiy Radyakin
>> On Fri, May 24, 2013 at 5:39 PM, Katie Farrin <> wrote:
>>> I had previously had trouble using findit to locate the user-written
>>> program ivqreg, for quantile instrumental variables regression (I
>>> still cannot locate it searching within Stata).  However, I found a
>>> file of program code (.ado file with several accompanying .mo file
>>> extensions and a pdf of the undated Stata Journal article explaining
>>> the code) through an outside search.  My problem now is that I cannot
>>> get Stata to download the code from my computer.  I have never added
>>> user-generated programs from outside of Stata, so it is likely that I
>>> am doing something wrong.
>>> If I use the adopath command and see the folder that stores personal
>>> .ado files on my C drive and copy the relevant files to the personal
>>> folder, what then must I do for Stata to run the program?  I am still
>>> getting the error code r(199) for unrecognized command.
>>> Thanks very much!
>>> Katie
>>> *
>>> *   For searches and help try:
>>> *
>>> *
>>> *
>> *
>> *   For searches and help try:
>> *
>> *
>> *
> *
> *   For searches and help try:
> *
> *
> *
*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index