Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
IPS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ben Anderson
IPS
Commits
21bb4002
Commit
21bb4002
authored
10 years ago
by
Ben Anderson
Browse files
Options
Downloads
Patches
Plain Diff
updated birth cohorts
parent
74b52f5a
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
UK-IPS-time-series-extract.do
+3
-2
3 additions, 2 deletions
UK-IPS-time-series-extract.do
with
3 additions
and
2 deletions
UK-IPS-time-series-extract.do
+
3
−
2
View file @
21bb4002
...
...
@@ -237,14 +237,15 @@ if `do_extracts' {
/* create a birth cohort variable
Birth year Age in 2000 Age in 2010 1900-1909 90-100 1910-1919 80-90 90-100 1920-1929 70-80 80-90 1930-1939 60-70 70-80 1940-1949 50-60 60-70 1950-1959 40-50 50-60
1960-1969 30-40 40-50
*/
* remember these are based on age groups
* set the minimum age they could be
recode
ba_age
(
0
=
0
)
(
1
=
1
5
)
(
2
=
25
)
(
3
=
35
)
(
4
=
45
)
(
5
=
55
)
(
6
=
65
),
gen
(
ba_min_age
)
recode
ba_age
(
0
=
0
)
(
1
=
1
6
)
(
2
=
25
)
(
3
=
35
)
(
4
=
45
)
(
5
=
55
)
(
6
=
65
),
gen
(
ba_min_age
)
* subtract that from the survey year to give a VERY rough birth year (minimum)
gen
ba_birthyear
=
year
-
ba_min_age
* create a birth cohort variable
* NB: fix for young children
* NB: fix for young children
& use of min age
recode
ba_birthyear
(
1900
/
1909
=
1
"1900-1909"
)
(
1910
/
1919
=
2
"1910-1919"
)
(
1920
/
1929
=
3
"1920-1929"
)
///
(
1930
/
1939
=
4
"1930-1939"
)
(
1940
/
1949
=
5
"1940-1949"
)
(
1950
/
1959
=
6
"1950-1959"
)
///
(
1960
/
1969
=
7
"1960-1969"
)
(
1970
/
1979
=
8
"1970-1979"
)
(
1980
/
1989
=
9
"1980-1989"
)
///
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment