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

st: RE: using _rmcoll


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: using _rmcoll
Date   Thu, 8 Jan 2004 18:29:55 -0000

I am not clear why you have a problem. 

program define myprog
	syntax varlist
	_rmcoll `varlist'
	local varlist `r(varlist)' 
	... 
end

seems to work OK. 

Nick 
[email protected] 

P.S. why do you want to -tokenize-? 

> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of Matthew L
> Dobra
> Sent: 08 January 2004 18:15
> To: [email protected]
> Subject: st: using _rmcoll
> 
> 
> Dear Statalisters,
> 
> Consider this simple program:
> 
> program define myprog
> syntax varlist
> _rmcoll `varlist'
> local varlist r(varlist)
> tokenize `varlist'
> ...
> do things
> ...
> end
> 
> The simple idea is to take the varlist input, remove any collinear 
> variables, replace the initial varlist with the 
> noncollinear varlist, and
> then tokenize the noncollinear varlist to proceed with the 
> things to be
> done.  This works fine, so long as I don't have  a lot of 
> variables in
> varlist.  If I do, then r(varlist) gets cut off at 244 
> characters.  Is
> there a way to do what I want when the varlist is long?  
> 
> Thanks,
> 
> Matt Dobra
> 
> *
> *   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/



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