Dear forum members,
I am new to Stata and having a problem that I can't seem to find a straightforward answer to. I'm dealing with a data set that has mix of many string and numeric variables. So when I do a code such as "gen X = Y-Z", I get a type mismatch error. So then I try to encode the string variable, it goes through without an error but the actual number in X is not correct (not actual Y-Z calculation outcome). It seems to be a constant problem whenever I use a variable created from "encode" command.
Could you please advise how to resolve this?
I appreciate your help.
Best,
Nathan
Related Posts with Problem with Gen & string/numeric variable conversion
Regression output does not show all coefficientsHi, I have a quick question: When I enter the following code for a regression with 1 independent v…
Difference in difference with a single groupI may be misunderstanding something and need some help So I am looking at inheritances and want to …
Time taken by estimation?Hi everyone, I want to calculate the time gained by a maximum likelihood estimator in coming up wit…
classified after XT models - invalid subcommand classificationHello, I am using 4 binomial models. Logit, xtlogit re, xtlogit pa, and xtlogit fe. After logit I us…
how to do propensity score matchinghi everyone I m trying to do psm test but i do not what the wrong is this command correct or not? …
Subscribe to:
Post Comments (Atom)
0 Response to Problem with Gen & string/numeric variable conversion
Post a Comment