To<statalist@hsphsun2.harvard.edu> SubjectRE: st: Re: replace a string variable DateMon, 9 May 2005 16:57:38 +0100 This makes it a little difficult to keep track of what has not yet been identified as OK. See my earlier posting for another way to do it. Nick n.j.cox@durham.ac...
To statalist@hsphsun2.harvard.edu Subject Re: st: Re: replace a string variable Date Mon, 9 May 2005 11:19:03 -0400what about replace vend = "STRYKER" if index(vend,"STRYKER") replace vend = "ZIMMER" if index(vend,"ZIMMER") replace vend = "SULZER" if index(vend,"SULZER") then...
This option may be used only when generating one variable. missing specifies that observations containing variables with missing values not be eliminated from the estimation sample. Remarks For a thorough discussion of ml, see the third edition of Maximum Likelihood Estimation with Stata, (Gould, ...
my dates go in as string variables and I can convert them into Stata dates using something like this: generate double diagdate2 = date(dx, "YMDhms") format %td diagdate2 Which gives my data a numeric value and applies some sort of variable label. I'm familiar with how to substract/ad...
To statalist@hsphsun2.harvard.edu Subject st: Replace one variable when other variable contains certain characters Date Mon, 19 Dec 2005 12:55:05 +0900Dear all, Suppose we have string variable Y, and we would like to replace variable X when variable Y contains certain characters such as "...
hi, I have a fairly simple problem for which I am sure STATA has an easy solution but I can't seem to find it. I am hoping you can help me. Here is what I need to do: I have a string variable called company_name which has names like "microsoft ltd." What I need to do ...
To convert integer dates such as 20011201 in a variable -ndate- to Stata daily dates in a variable -sdate- you need something like gen sdate = date(string(ndate, "%12.0f"), "YMD") format sdate %td Then years are just gen year = year(sdate) Nick njcoxstata@gmail.com On 12 ...
FromPhil Clayton <philclayton@internode.on.net> Tostatalist@hsphsun2.harvard.edu SubjectRe: st: Is there a way to replace a variable with a missing value without knowing if it is numeric or string? DateFri, 26 Jul 2013 18:14:59 +1000...