Stata notes and programs
LOCF
input a
1
2
.
3
.
4
end
**suppose I want to replace each missing observation by the observation preceding it
replace a = a[_n-1] if missing(a)
. l
+---+
| a |
|---|
1. | 1 |
2. | 2 |
3. | 2 |
4. | 3 |
5. | 3 |
|---|
6. | 4 |
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment