To: "statalist" <statalist@hsphsun2.harvard.edu> Sent: Thursday, October 13, 2005 9:32 AM Subject: Re: st: How to cope with string when transfrom from Epidata to Stata Additionally, when I run - . destring v1, generate(vv1) float I was informed that v1 contains non-numeric char...
Re: st: How to insert decimal point? From: Nick Cox <njcoxstata@gmail.com> References: st: How to insert decimal point? From: Lucie Vlach <Lucie.Vlach@albertahealthservices.ca> Re: st: How to insert decimal point? From: Richard Goldstein <richgold@ix.netcom.com> Prev by Date: Re...
this is sometimes desirable, as for example when you need to read and append several files and want to make certain that no data are lost due to appending a numeric variable onto a string variable (or vice versa). In cases where this is not desirable, a single call to -destring- is a...
To statalist@hsphsun2.harvard.edu Subject Re: st: How to apply a command to numeric variables only Date Tue, 29 May 2012 08:27:33 +0100Similar questions arise often on this list. In your case one solution is to -destring- the string variables before the loop, but then the loop will...
The -destring- line could easily be omitted, without loss of functionality... HTH Martin ---Ursprüngliche Nachricht--- Von: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Michael McCulloch...
To statalist@hsphsun2.harvard.edu Subject Re: st: How to apply a command to numeric variables only Date Tue, 29 May 2012 21:58:42 +0100These are the results: . ds srhcareactivity1-srhcareactivity6 , has(type numeric) srhcareact~4 srhcareact~5 srhcareact~6 . foreach var in `r...
To statalist@hsphsun2.harvard.edu Subject Re: st: How to apply a command to numeric variables only Date Wed, 30 May 2012 09:00:28 +0100Note that you had > . foreach var of varlist srhcareactivity1-srhcareactivity6{ > 2. capture decode `var', generate(str) > 3. if _rc == ...
Prev by Date: Re: st: destring ignores more than what specified in ignore() Next by Date: Re: st: margins after oprobit with interactions Previous by thread: st: FW: dynamic panel - how to get indiviual result for each cross section? Next by thread: st: FW: dynamic panel - how...
(use -help destring- to read about it, or you can access it via the menu Data -> Create or change data -> Other variable-transformation commands -> Convert variables from string to numeric) The Stata documentation is very good; you could for example answer this question by typing: search...
To <statalist@hsphsun2.harvard.edu> Subject st: RE: how to split a variable? Date Wed, 7 Mar 2007 12:05:46 +1100Hi Yu-Jin, try this (I'll assume your variable is called "var"): gen house_no = substr(var,1,4) gen indiv_no = substr(var,5,2) destring house_no, replace ...