Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Keeping values in multiple variables


From   Rafal Raciborski <[email protected]>
To   [email protected]
Subject   Re: st: Keeping values in multiple variables
Date   Thu, 09 Jun 2005 16:14:02 -0400

It is not 'k' but `k'.  Note that the opening quote is an acute quotation mark
(usually found under the escape key together with the tilde).
rafal

Quoting [email protected]:

> Thank you for the tip, but it's stating that 'k' is an invalid name, although
> it is defined.  If you have any more ideas I would love to see them.
>
> Thank you
> Dexter E. Jason
> Quoting Felipe Salazar <[email protected]>:
>
> > If I understand correctly, you have 204 variables named mon1 mon2 mon3
> > ... mon204. I would type:
> >
> > local k=1
> > while `k'<=204 {
> >    keep if mon`k'=="3"
> >    local ++k
> > }
> >
> >
> > [email protected] escribi?:
> >
> >> I'm having one problem with a command in STATA 8.0. I have variables
> >> in which
> >> I want to keep only one case in all of them, but there's too many (204)to
> do
> >> one by one.
> >>
> >> i.e.
> >> keep if mon*=="3"
> >> keep if mon[i]=="3"
> >>
> >> But I get an "mon ambiguous abbreviation" error. Please help!!!
> >>
> >> Thanks
> >> Dexter E. Jason
> >> *
> >> *   For searches and help try:
> >> *   http://www.stata.com/support/faqs/res/findit.html
> >> *   http://www.stata.com/support/statalist/faq
> >> *   http://www.ats.ucla.edu/stat/stata/
> >>
> >>
> >>
> >
> >
> >
> > *
> > *   For searches and help try:
> > *   http://www.stata.com/support/faqs/res/findit.html
> > *   http://www.stata.com/support/statalist/faq
> > *   http://www.ats.ucla.edu/stat/stata/
> >
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>


================
Rafal Raciborski
Graduate student
Department of Political Science
Emory University
301 Tarbutton Hall
1555 Dickey Drive
Atlanta, GA 30322
404-378-9826 (home)
[email protected] (e-mail)
www.roofoos.net

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index