gen temp=hv104 if hvidx==hv003
list hv001 hv002 hv003 hvidx hv104 temp if _n<=100, table clean
egen hhresp_hv104=min(temp), by(hv001 hv002)
drop temp
list hv001 hv002 hv003 hvidx hv104 hhresp* if _n<=100, table clean
The "list" lines will show you how the gen and egen lines work. You can extend this to copy other characteristics of the household respondent onto every every person in the household.local cdvars sh148 sh149 sh150 sh151 sh152 sh153 sh154 sh155 sh156 sh157 sh158 sh159 sh160 sh161
list hv001 hv002 hvidx hv105 sh148-sh152 if _n<=100, table clean
foreach cdvar of local cdvars {
replace `cdvar'=. if hvidx~=sh148
}
list hv001 hv002 hvidx hv105 sh148-sh152 if _n<=100, table clean
Again, the "list" lines are just for checking.