Hi everyone,
Hoping to get some advice on how t ocreate a graph for my longitudinal patient panel that would capture how many patients per month (count) belonged to one group (aka on stable dose) versus belonged to another group (medication dose was reduced).
The information on whether the patient is on a stable dose can be derived from the Baseline_begins variable, which is capturing the month in which the patient was on a stable dose.
THe information on the patient whose dose was reduced can be derived from the Month_Followup_begins variable.
I tried running the following code, but pretty sure I messed it up somewhere:
To count N of patients on the baseline per month
Bysort id: egen count_baseline=count(id), by(Baseline_begins)
I tried running the same code with Followup variable, but I am getting identical results:
egen count_followup=count(id), by(Followup_begins)
id Baseline_begins Followup_begins
30 83 86
30 84 87
30 85 88
30 86 89
30 99 102
30 100 103
57 26 29
57 27 30
57 30 33
57 31 34
end
[/CODE]
I would really appreciate any suggestions!
Related Posts with Creating a graph with counts of IDs using 2 different requirements
Power Calculations for 3 arm clustered randomised trialHi everyone, I need to do power calculations for a 3 arm trial (to determine minimum detectable effe…
Hausman Test: full dataset and subsamplesI am currently running FE vs RE via a Hausman test for panel data. I am then taking 3 subsamples o…
Canay's (2011) Fixed-Effect Quantile Panel Data Approach in the presence of some endogenous independent variablesDear Forum members, Let me apologize in advance if my question has been dealt with somewhere which …
Assumptions necessary for running xtabond2I want to accurately estimate a production function lnY=alpha*lnK+beta*lnL+idiosyncratic error+fixed…
Hypothesis formation for a difference in difference analysisDear all, My study is concerned with the causal effect of development aid on support for democracy …
Subscribe to:
Post Comments (Atom)
0 Response to Creating a graph with counts of IDs using 2 different requirements
Post a Comment