Hello. In the dataset:
Suppose I want to generate an empty variable called "whatever". I want to select a specific range of observation between, say, "AMC Concord" and "Cad. Deville", the two included, to perform actions for them in the variable "watever". There is no specific pattern to know besides their position. How can I do it?
Thansk for the help.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str18 make int(price mpg rep78) float headroom int(trunk weight length turn displacement) float gear_ratio byte foreign "AMC Concord" 4099 22 3 2.5 11 2930 186 40 121 3.58 0 "AMC Pacer" 4749 17 3 3 11 3350 173 40 258 2.53 0 "AMC Spirit" 3799 22 . 3 12 2640 168 35 121 3.08 0 "Buick Century" 4816 20 3 4.5 16 3250 196 40 196 2.93 0 "Buick Electra" 7827 15 4 4 20 4080 222 43 350 2.41 0 "Buick LeSabre" 5788 18 3 4 21 3670 218 43 231 2.73 0 "Buick Opel" 4453 26 . 3 10 2230 170 34 304 2.87 0 "Buick Regal" 5189 20 3 2 16 3280 200 42 196 2.93 0 "Buick Riviera" 10372 16 3 3.5 17 3880 207 43 231 2.93 0 "Buick Skylark" 4082 19 3 3.5 13 3400 200 42 231 3.08 0 "Cad. Deville" 11385 14 3 4 20 4330 221 44 425 2.28 0 "Cad. Eldorado" 14500 14 2 3.5 16 3900 204 43 350 2.19 0 "Cad. Seville" 15906 21 3 3 13 4290 204 45 350 2.24 0 "Chev. Chevette" 3299 29 3 2.5 9 2110 163 34 231 2.93 0 "Chev. Impala" 5705 16 4 4 20 3690 212 43 250 2.56 0 end label values foreign origin label def origin 0 "Domestic", modify
Thansk for the help.
Comment