Hi, I'm working with trade data and I want to get a substring from a numeric code that includes the code of the country of origin, destiny and type of product. But I keep getting the type mismatch error. Here's my code:
gen code1 = real(substr(code,1,3))
Related Posts with Type mismatch when trying to get substring
Creating huge number of fixed effectsHi everyone, I have a large firm level panel with 1 million units over 20 years. I want to run a di…
Handling addresses in STATAHi! address in the dataset is in the following format: 59 NORTH STREET, PLAINFIELD, MASSACHUSETTS, 0…
Using Predict after suest in logit regressionHi, I have used 3 logit equation and used "suest" command to combine parameter estimate and covaria…
Labeling Graphs after "Separate" and "Collapse"Hello, I have the following code: Code: preserve separate income, by(gender) collapse(…
Importing CSV with multiine text dataI am trying to import a CSV file in which some of the columns contain multiline text data. See below…
Subscribe to:
Post Comments (Atom)
0 Response to Type mismatch when trying to get substring
Post a Comment