Hi there,
I'm working with some panel data, whereby for each subject I have multiple events (lab tests) recorded in long form. Each event is dated and I need to calculate whether two specific tests (test_id 12 and 147) are conducted within 3 months of each other (to assess whether testing/diagnostic guidelines are being followed). Subjects may have multiple instances of each test.
At this moment in time, I'm considering looping through all instances of these tests to ascertain whether the other test occurs within 3 months. Given some subjects have 100s of test records and the dataset contains 100,000s of subjects, I'm wondering whether there is a more efficient method to derive my requirements.
(I found plenty of existing threads on the topic of dates and panel data, but nothing akin to the above)
Thanks in advance,
Rob.
Related Posts with Differences between dates using panel data
Advice on which model to use with binary dependent variable and endogenous ordinal independent variableHello, I have come to a roadblock in my research. I am trying to figure out what type of model to us…
mean through several variables Hello, I have 4 different variables, each with the expression 1-5. the variables include mental he…
Margins after -gsem-Dear all, I am having some trouble with my margins command after -gsem-. Here below my data looks l…
Generate new variable by command "if"Hi I want to create a new variable (var3) using an existing variable (var2). Like the attached photo…
Probit model constant termHey I have a sample with different start ups, the funding amount, and three different investor type…
Subscribe to:
Post Comments (Atom)
0 Response to Differences between dates using panel data
Post a Comment