Hello, I am doing a job for my university and I need help, could you give it to me? I am new to stata, I would like to know how I can filter a variable by its third digit. Basically I need to create a new variable that is, for example, equal to 1 if the third digit of the variable X is equal to 9, equal to 2, if the third digit of the variable X is equal to 5, etc. Thank you.
PS: the variable on which I must filter is numeric and has a total of 5 digits.
Related Posts with Help please
Problem grouping hierarchical data into subset of the dataHello I am new to Stata and I am struggling to find the best command /code to the below data. I am …
Randomly removing observations from this dataset Oxford Knee scoreHi Any help would be appreciated. The data below is a small sample of a larger dataset. It has th…
Test of equality for sibling correlations across groups mixedDear all, I am estimating sibling correlation using Stata's mixed command via REML for different gr…
Regression with Categorical Dummy VariableDear all, I would like to conduct the following regression: y = a + x1*(1-D) + x2*D + x3*(1-D) + x…
Problem with fweight and bar graphsThis is probably an extremely elementary question and I am so sorry in advance. I have a dataset of …
Subscribe to:
Post Comments (Atom)
0 Response to Help please
Post a Comment