Bookmark and Share

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


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

st: selectvars and factor variables


From   A Loumiotis <antonis.loumiotis@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: selectvars and factor variables
Date   Wed, 26 Jan 2011 14:44:31 +0200

Hi,
I would like to use the package selectvars written by Nick Cox but my
variable list contains factor variables and selectvars does not allow
factor variables.  So I would like to substitute in my variable list
the factor variables with the dummy variables that "xi:" creates and
then run selectvars on my expanded variable list.  How can I do that?

For example:

local myvarlist var1 var2 i.var3 // where var3 is categorical with
four categories
local myevarlist var1 var2 Ivar3_2-4
selectvars `myevarlist', min(2) max(2)

My question is how to create myevarlist from myvarlist?

Thanks,

Antonis Loumiotis
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index