Hello, I recently started using STATA however I have a datset with approximately 7 million observations and about 30 variables, resulting from a merge of two datasets.
I would like to update / replace the values of some observations that have been matched from Var1 according to the values of another variable Var2.
As an example, imagine that for observation 1, the value of Var1 = 0.5 to Var2 = 10, however, I wanted to change it to Var1 = 2.55 to Var2 = 10.
I emphasize that Var2 is a string and although I have done "encode" and try to use the resulting Var3 = 10 with the replace command it appears "(0 real changes made)". When I use "update Var1 = 2.55 if Var3 == 10" the error r (198) - invalid syntax appears.
I would appreciate any help or tips. Thank you!
Related Posts with Change observations values
problem with backtick in a stringI am trying to destring a variable which occasionally contains the backtick ` symbol. I am just not …
Difference-in-Hansen tests of exogeneity of instrument subsets:Hello and Greetings from India! For my current study on analysis of market share of insurance compa…
Using absorb to create dummy variablesHello I have firm-pair-quarter panel data where firm-pairs are not repeated or duplicated (i.e., if…
Can somebody explain this Regression command to me ?Hello i hope all of yopu have a great Evening at least in Germany it is, I am researching for my Ba…
PPML and OLS Estimation with time-fixed effectsHello, I would like to analyse a gravity model using OLS and PPML methods. I am going to emphasize f…
Subscribe to:
Post Comments (Atom)
0 Response to Change observations values
Post a Comment