Hi all,
I've recently moved to STATA from more point-and-click interfaces (i.e. SPSS), and am having trouble adapting to syntax use. I've recently came across an issue while running a simple loop. It's been an aggravating couple of hours.
Specifically, I am trying to replace the values in 'rows' 166, 185, 198, 205, etc... with the word "missing".
Please see:
foreach x in 166 185 {
2. replace example_variable_1_text = "missing" in "`x'"
3. }
'"166' invalid observation number
r(198);
Many thanks,
Shawn
Related Posts with Coding Loops
Text size option no longer works when graphing after updating to macOS MontereyHi there! Ever since updating to macOS Monterey, I've seemingly lost the ability to alter text size…
Issues with Two-way graph labelsI would be grateful for some advice. I think something trivia is wrong with my codes but I can't see…
Drawing graphs to show subsets of sampleWould be grateful for some advice on how to add an extra layer of code to this existing one below if…
GLM Family = Gamma Link = Identitygamma distributions yield different forms based on two parameters: shape parameter and scale paramet…
Missing bin in histogramHelp! I don't know why I am missing a bin in my histogram; only 2 are showing up. There are 3 catego…
Subscribe to:
Post Comments (Atom)
0 Response to Coding Loops
Post a Comment