@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...
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...
If you import("myfile.csv"), it knows to use a function to read a CSV file. import("myspreadsheet.xlsx") works the same way. In fact, rio handles more than two dozen formats including tab-separated data (with the extension .tsv), JSON, Stata, and fixed-width format data (.fwf)....
I have got a dataset which contain dates of birth for individuals andthese dates of birth look as follows: 19560413 and I am trying to turnthem into date variables Stata can recognise. It is a numeric variable and I have turned it into string. ...
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...