Dear statalists, I have a string variable X as follows: X Y aabb 2 bbdd 0 cdba 1 dxbaa 2 dxaa 2 I want to generate a variable Y to stand for the number of certain characters, such as "aa" and replace these characters with other characters, such as "zz". How to do it ? Th...
I would be very grateful for any advice as to how I can turn my datevariable into a variable Stata10 can recognise, The date (and string) functions in Stata are powerful, so they areworth learning. However, to use them correctly, there really is nosubstitute for reading the help files ...
Just so you know, there are already community-contributed commands to do this and to do it more flexibly than we will. Typesearch normalize variablein Stata, and you will see one of those commands. (You will see things about other types of normalization that have nothing to do with normali...
To him, programming is like a time-saving wizard, making data manipulation, file handling, and internet interactions a breeze. His skill set extends to SPSS, STATA, Deep Neural Networks, and Machine Learning. Holding a B.Sc in Leather Engineering from Khulna University of Engineering & ...
Loop over columns to generate multiple prop.table How to check missing days in datasets in R Problem with Installing ggplot2 Need to open H5 files Error: Discrete value supplied to continuous scale on RSTUDIO how to run social network analysis phtest error: Error in solve.defaul...
@stataq wrote: Hello, How can I refer a macro variable and its value in a data step? for example, if I have a dataset that have 3 variables A1 B2 and C3. If I set marco variable "%letr colvar=A1"., how can I utilized &colvar. to get a filter that macro variable col...
in panel data where subject id and date or wave are often needed to uniquely identify an observation. In order for Stata to merge the datasets, the id variable, or variables, will have to have the same name across all files. Additionally, if the variable is a string in one dataset, it...
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 ...
TitleHow to add factor-variable support to a command AuthorTheresa Boswell, StataCorp Question: Why is my command not working with factor-variable syntax and/or collinear variables in Stata 11? Answer: As of Stata 11, variables are no longer dropped because of collinearity. Instead, these varia...
> > I have tried using capture to ignore the error. > > How can I restrict the command to numeric variables only? > > By the way, is there a way to keep the variable label which is lost when I use generate. > * * For searches and help try: * http://www.stata.com/help.cgi...