Skip to content

Commit 071f618

Browse files
committed
Updated makeids to 2021
1 parent 48399ab commit 071f618

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

R/makeids.r

+9-6
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#' @details this function hardcodes the PSID variable names of "interview number" from both family and individual file for each wave, as well as "sequence number", "relation to head" and numeric value x of that variable such that "relation to head" == x means the individual is the head. Varies over time.
66
makeids <- function(){
77

8-
id.list <- data.table(year=c(1968:1997,seq(1999,2019,by=2)))
8+
id.list <- data.table(year=c(1968:1997,seq(1999,2021,by=2)))
99
id.list$ind.interview <- c("ER30001","ER30020","ER30043","ER30067",
1010
"ER30091","ER30117","ER30138","ER30160",
1111
"ER30188","ER30217","ER30246","ER30283",
@@ -15,15 +15,16 @@ makeids <- function(){
1515
"ER30733","ER30806","ER33101","ER33201",
1616
"ER33301","ER33401","ER33501","ER33601",
1717
"ER33701","ER33801","ER33901","ER34001",
18-
"ER34101","ER34201","ER34301","ER34501","ER34701")
18+
"ER34101","ER34201","ER34301","ER34501",
19+
"ER34701", "ER34901")
1920

2021
id.list$ind.seq <- c(NA,"ER30021","ER30044","ER30068","ER30092","ER30118","ER30139",
2122
"ER30161","ER30189","ER30218","ER30247","ER30284","ER30314",
2223
"ER30344","ER30374","ER30400","ER30430","ER30464","ER30499",
2324
"ER30536","ER30571","ER30607","ER30643","ER30690","ER30734",
2425
"ER30807","ER33102","ER33202","ER33302","ER33402","ER33502",
2526
"ER33602","ER33702","ER33802","ER33902","ER34002","ER34102",
26-
"ER34202","ER34302","ER34502","ER34702")
27+
"ER34202","ER34302","ER34502","ER34702", "ER34902")
2728

2829
# name of variable "relationship to head"
2930
id.list$ind.head <- c("ER30003",
@@ -66,10 +67,11 @@ makeids <- function(){
6667
"ER34203",
6768
"ER34303",
6869
"ER34503",
69-
"ER34703")
70+
"ER34703",
71+
"ER34903")
7072

7173
# numeric code for "i am the head"
72-
id.list$ind.head.num <- c(rep(1,15),rep(10,26))
74+
id.list$ind.head.num <- c(rep(1,15),rep(10,27))
7375

7476
id.list$fam.interview <- c("V3" , "V442" , "V1102" , "V1802" , "V2402" , "V3002" ,
7577
"V3402" , "V3802" , "V4302" , "V5202" , "V5702" ,
@@ -78,7 +80,8 @@ makeids <- function(){
7880
"V16302" , "V17702" , "V19002" , "V20302" , "V21602" ,
7981
"ER2002" , "ER5002" , "ER7002" , "ER10002" , "ER13002" ,
8082
"ER17002" , "ER21002" , "ER25002" , "ER36002" , "ER42002" ,
81-
"ER47302" , "ER53002" , "ER60002" , "ER66002" , "ER72002")
83+
"ER47302" , "ER53002" , "ER60002" , "ER66002" , "ER72002" ,
84+
"ER78002")
8285
id.list$stratum <- rep("ER31996",nrow(id.list))
8386
setkey(id.list,year)
8487
return(id.list)

0 commit comments

Comments
 (0)