Dear everyone
I'm trying to create a variable based on matrix conditions of two other variable.
I acknowledge that the the screenshoot is not the best way to show you the data but this is my starting point:
On stata, I have the variable a and b and I need to create the variable c based on the values of a and b (below the conditions)
For instance if 0<=a<0.1 and 0<=b<10, then c = 0.005
Do you have any advice on how to approach it that is best time-efficient (i.e. without manually including all conditions with if/or commands)?
Array
Related Posts with Creating variable based on conditions of two variables using matrix
clustering error in gravity modelHi stata users, Currently, I'm researching for my thesis about the impact of non-tariff measures on…
Rubustness Check in Panel Data Modelling: Sensitivity Analysis Modifying the Level of AggregationDear Statalist participants, I am running a panel data modeling in the municipality level of aggreg…
Dummy trap(intercept) removal in stata. xtreg (AB9 Dne9* Dnr9* Dpe9* Dnr9*) note: Dnr9 omitted because of collinearity Random-effects GLS…
S-GMM interpretationHello everyone! I'm confused by my Stata-output. I'm doing a system-GMM estimation with bank risk a…
Diff-in-diff with dynamic treatment timeHi, I am trying to investigate the effect of an in-hospital intervention on: 1) Time to emergency …
Subscribe to:
Post Comments (Atom)
0 Response to Creating variable based on conditions of two variables using matrix
Post a Comment