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
Zero Iteration when using nl regression !Dear Stata users, In order to estimate the following logistic equation using nonlinear regression (…
Mixed model coefficient?Hello, Beginner question. How do you interpret the coefficients of a mixed model (Multilevel mixed…
Reshape increases frequency of observationsHi I am working on a simple data set transformation that I have not found a solution to after searc…
Univariate analysis on structural break in StataDear Statalisters, I am doing univariate time series analysis using GDP quarterly data for 30 count…
Interactions of an Endogenous and Exogenous VariableHello, We are running the following regression: Y = aX1 + bX2 + cX1#X2 + `XVars' + error Our depe…
Subscribe to:
Post Comments (Atom)
0 Response to Replace missing values of a variable based on another previous values
Post a Comment