I've been trying to use these three codes to create a depression score. One of the members helped me with these codes. My Stata shows "command inlist is unrecognizable". I don't know how to fix this problem. Is there a particular order for entering these codes? Please help.
inlist(D1, 2, 3) & inlist(D2, 2, 3)
egen third = anycount(D3-D8), values(2 3)
gen major = inlist(D1, 2, 3) & inlist(D2, 2, 3) & third >= 5
inlist(D1, 2, 3) & inlist(D2, 2, 3)
egen third = anycount(D3-D8), values(2 3)
gen major = inlist(D1, 2, 3) & inlist(D2, 2, 3) & third >= 5
Comment