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
Comparing two interaction terms using "test"Hello, I have two interaction terms, which I would like to compare statistically. Say, some variabl…
Variable __000000 already definedHi, I do have a puzzling problem. I am computing gini coefficients using the bootstrap command to g…
bar chart width of barsHi i created this bar chart using the bar chart option within the data tab in stata and i produced t…
Help with code for confidence bonds for QQplot of residualsHi guys, I am running a multiple linear regression model and to check the assumption of normality o…
Including an extra independent variable in a panel regression reports missing t-statistics/std. errorsHello everyone, I have a panel dataset, where the panel variable is industry code (I am doing an in…
Subscribe to:
Post Comments (Atom)
0 Response to Creating variable based on conditions of two variables using matrix
Post a Comment