Hello,
I want to tell stata to create a variable giving a code of 0/1 based on around 200 variables containing string. If any values within those 200 variables contain F20 or F21 I want the new variable to be 1. Any advice greatly received. I want it to ignore any missing values but if all 200 values are missing I would want the new variable to give a missing value not a 0.
Related Posts with Create a variable (0/1) based on multiple variables containing string
Testing for difference in marginal effects at two values of same continuous independent variableHi all, and thanks in advance for any responses. I'm estimating the following model: mlogit enroll_…
XSMLE dynamic SDM where beta is constrained to = 0Dear list members, I have a special request estimating a dynamic spatial durbin model. I would like…
Using foreach for two set of groupsDear All, I am working on a bilateral data of the form; exporter importer year trade Germany Franc…
Importing variable with special characters, strings and numbersDear Stata users, I am experiencing problems in importing a variable from a csv file. This variable…
Modified Poisson Regression using GLM: missing categoriesI want to know the effect of selected background characteristics on intimate partner violence among …
Subscribe to:
Post Comments (Atom)
0 Response to Create a variable (0/1) based on multiple variables containing string
Post a Comment