Hello Everyone,
Again a very basic question.
dataex:
v1 v2 v3
1 12 1
1 13 2
1 15 3
2 13 4
2 14 5
2 16 6
2 17 21
2 19 22
3 12 23
3 13 24
3 17 25
1 12
1 15
2 13
2 17
2 19
3 12
3 13
3 17
In above data example, how can I replace missing values of v3 based on values which are not missing. For example, missing value of v3 where v1=1 and v2=12 should be replaced with 1 based on first observation (where v1=1, v2=12 and v3=1 is given). I want to replace all missing values in one go.
Best
Amit
Related Posts with Replace missing values of a variable based on another previous values
interpreting Modified ADFHi All, I have performed the modified ADF on my variable using the Code: dfgls At level I get this…
generating experience variable based on 2 date variablesDear Statalist, I have a dataset that contains the entry dates of a certain investor (unique Invest…
Calculation of RCA (Revealed Comparative Advantage)Dear Statalist, I am trying to calculate RCA(Revealed Comparative Advantage) to use in my thesis. I…
Panel Data: Table with ranks of medians over groupsHi together, i use stata 16.0 and have a panel dataset with monthly average temperature (tavg) from…
Am I using the correct code for running the models separately for each industry?Hi all, I have an unbalanced panel data, 11 industries and 21 years. After doing the main regressi…
Subscribe to:
Post Comments (Atom)
0 Response to Replace missing values of a variable based on another previous values
Post a Comment