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 at the end of May, and its replacement, statalist.org is already up and running.


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

RE: st: RE: label the variables


From   "Miller, Daniel P" <dpmiller@bu.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   RE: st: RE: label the variables
Date   Fri, 24 Jun 2011 10:32:31 -0400

It seems like perhaps you just want to order your variables in the variables window?

If so, you can just use the order command:

order depvar expvar1 expvar2....expvar_n control1 control2...control_n

you could even create empty variable to act as placeholders in your variable window if you wanted 

e.g.:

gen DEPENDENTXXXXXXXXX=.
gen EXPLANATORYXXXXXXX=.
gen CONTROLXXXXXXXXXXX=.

and then:

order DEPENDENTXXXXXXXXX  depvar EXPLANATORYXXXXXXX expvar1 expvar2....expvar_n CONTROLXXXXXXXXXXX control1 control2...control_n

Daniel P. Miller, PhD
Assistant Professor
Human Behavior Department
Boston University School of Social Work
264 Bay State Road  |  Boston, MA 02215
617-353-3752  |  617-353-5612 (fax)  |  dpmiller@bu.edu
 Please consider the environment before printing this e-mail.


-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Muhammad Anees
Sent: Friday, June 24, 2011 10:24 AM
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: RE: label the variables

Yes, it is simple, just rename-ing all your vars will do the job.

dependent*******************
ren y1 depy1
ren y2 depy2
ren y3 depy3
explanatory********************
ren x1 explx1
ren x2 explx2
ren x3 explx3
control var*****************
ren x4 contx4
ren x5 exptx5

use it into analysis, outpur will help you identify what variable you
wanted to respresent
Or you can use loop if someone can give hints on that


HTH
Anees

On Fri, Jun 24, 2011 at 1:57 PM, Nick Cox <n.j.cox@durham.ac.uk> wrote:
> I am not really clear on what you want here but it doesn't register as corresponding to  any particular command. What is clear is that you would need to specify such distinctions yourself somehow, as Stata itself doesn't stamp variables in this way.
>
> Nick
> n.j.cox@durham.ac.uk
>
> Nahla Samargandi
>
> Thank you for your help. Actually what I meant regarding label the variables into groups, that I remember there was a command give this option , but unfortunately, I cant remember it well.
> when I type
>  gen helper= var helper*********************
> it gives me this massage
> var not found
> r(111);
>
> I want to put my variables into groups to be easy to choose among them when I run the regression
> ,
> for example
> dependent*******************
> y1
> y2
> y3
> explanatory********************
> x1
> x2
> x3
> control var*****************
> x4
> x5
>
> could you help me to find the command for this.
>
> Meany thanks,
> N
>
> it let your variabls apper like this
>
> *
> *   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/
>



-- 
Muhammad Anees
MSc & MS in Economics

*
*   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/

*
*   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