Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: a program that can define variable used


From   Austin Nichols <austinnichols@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: a program that can define variable used
Date   Wed, 6 Jul 2011 16:17:01 -0400

Zhi Su <su.zh@husky.neu.edu>:
From
http://www.stata.com/help.cgi?program
:
See [U] 17 Ado-files for an explanation of ado-files.
See [U] 18 Programming Stata for a description of programs.

Also see
http://ideas.repec.org/p/boc/usug05/16.html
http://ideas.repec.org/b/tsj/spbook/isp.html

On Wed, Jul 6, 2011 at 4:06 PM, Zhi Su <su.zh@husky.neu.edu> wrote:
> Dear Statalists,
>
>  I want to write my own ado file.
>  program define NHreg, rclass
>  .
>  .
>  .
>  regress Y X,robust
>  end
>
>  I want the NHreg.ado to be used in the way that I can change the
> independent variable "Y" in the program. For example, if I type
>  NHreg T1
>  then the program return results from command "regress T1 X, robust"
>
>  If I type
>  NHreg T2
>  then the program return results from command "regress T2 X, robust"
>
>  How can I make it?

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index