Please help! How can I write a command in Stata so that..... for each individual ID_number, I uniformly drop the "HbA1c_date" (the date when a lab test was done / study participants) if the "HbA1c_date" was obtained > 90 days AFTER or BEFORE the "ADQresponse_date" (the date when a child or parent in the study filled out a questionnaire called the ADQ)? Thank you in advance for your sage advice.
* Example generated by -dataex-. For more info, type help dataex
clear
input str4 ID_number long ADQresponsedate float(meanADQscore__child meanADQscore_parent HbA1c_date HbA1c_mmolmol)
"0001" 18032 . 5.0 18057 57.3
"0002" 18058 . 4.7 18063 47.5
"0003" 18024 . 4.3 18042 55.2
"0004" 18065 . 4.5 18081 73.7
"0005" 18036 . 4.8 . 18064 63.9
"0005" 17951 5.0 5.0 17952 51.9
"0006" 18026 5.5 4.7 18029 59.5
"0007" 18025 5.9 4.3 18031 51.9
"0008" 18044 5.7 . 18030 54.1
"0009" 18087 . 4.7 18087 53.0
"0010" 18084 4.7 4.6 18059 61.7
Related Posts with Drop observations for date A if > 90 days before or after date B
Escape code tags?\ Code: \ …
Convergence not achieved with xtlogit, fe, but it does converge with xtlogit, reI am using xtlogit on the following data: input str2 st int date byte club float(combo l ca com) by…
error obtaining starting values; try fitting a marginal model in order to diagnose the problemHi Statalist First time poster, long time reader here. I have searched the list and online for answ…
Conditioning for values within a variable while using foreachHi everyone! I'm new to the forum, but here it goes. I have the following code, where I'm just tryin…
Test of difference - unpaired 2 proportion survey data w/ clusteringHi there, I am trying to develop tests of difference for 2 unpaired sets of data from cross-section…
Subscribe to:
Post Comments (Atom)
0 Response to Drop observations for date A if > 90 days before or after date B
Post a Comment